asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandraskarshaug@gmail.com <sandraskarsh...@gmail.com>
Subject Re: Feed adapter for twitter data
Date Thu, 15 Nov 2018 09:00:02 GMT


On 2018/11/14 20:10:47, Xikui Wang <xikuiw@uci.edu> wrote: 
> Here is an example of how you would create a socket feed with a JSON parser:
> 
> create type TweetType as {
> id: int64
> };
> 
> create dataset Tweets (TweetType) primary key id;
> 
> create feed TwitterFeed with {
>   "adapter-name" : "socket_adapter",
>   "sockets" : "127.0.0.1:10001",
>   "address-type" : "IP",
>   "type-name" : "TweetType",
>   "format" : "json"
> };
> 
> connect feed TwitterFeed to dataset Tweets;
> start feed TwitterFeed;
> 
> One thing that worth noticing is JSON format has limited data types, so you
> will see the timestamps are parsed as string and points are parsed as
> arrays of doubles.
> 
> Best,
> Xikui
> 
> On Wed, Nov 14, 2018 at 8:32 AM Xikui Wang <xikuiw@uci.edu> wrote:
> 
> > Hi Sandra,
> >
> > Yes. You can create a socket feed with the JSON parser. This will allow
> > you to push JSON formatted Tweets into AsterixDB directly.
> >
> > Best,
> > Xikui
> >
> > On Wed, Nov 14, 2018 at 3:11 AM Sandra Skarshaug <
> > sandraskarshaug@gmail.com> wrote:
> >
> >> Hi!
> >>
> >> Is it possible to use the twitter feed adapter without providing consumer
> >> key and access token, but instead connecting the adapter to a socket which
> >> streams twitter data?
> >>
> >> Best regards,
> >> Sandra Skarshaug
> >>
> >
> Thanks a lot, Xikui! I really appreciate your help! 

Mime
View raw message