Can't use DB(/database) update in order to have a dataset from twitter api

Hello there,

We are struggling through the Twitter API process,
We can’t use the “DB(/database) update node” in order to have a dataset from Twitter API
We are using the “Twitter Data collection” workflow from paolotamag,
Maybe we don’t know how to use the settings right,
We just want to extract the table we have from “Twitter source” node in order to work on this data,

Thank you for your help,

Hi @Gaggio and welcome to the Knime Community.

I’m not quite getting what you are doing, particularly what the DB update node has to do with retrieving a dataset from Twitter API. In general, if you are trying to retrieve some data via an API, you would do that using a Web request, such as GET Request or POST Request.

You would then validate/manipulate the retrieved data, to then insert/update your db with the data, and that’s where you’d use the DB Update node.

Can you show us or share your workflow?

Hi @bruno29a,

Thank you for your explanation! :slight_smile:
Gaggio is referring to this workflow (Twitter Data Collection – KNIME Hub) where the nodes in the KNIME Twitter Connectors extension -in particular the Twitter API Connector – KNIME Hub and the Twitter Search – KNIME Hub - are used to connect to Twitter and retrieve tweets.

@Gaggio I have tried to execute the workflow myself and I did not encounter any problem. If you simply want to extract tweets the Tweet Search node already returns a data table. If that is not what you want, could you please provide more details concerning your problem and goal?

Sharing your workflow as bruno29a suggested is a good idea too.

Cheers!

2 Likes

Hi @roberto_cadili , thank you for sharing that workflow, I was unaware of it, and I was also unaware that Knime had dedicated nodes for Twitter which I saw from the workflow. So, no need to implement manual GET or POST Request, from what I see the Twitter Search node does that for you.

Thank you for sharing.

@Gaggio , as @roberto_cadili mentioned, you should get what you need just from the Twitter Search node - this is already returning the results in a Knime table (that’s what the black triangle in the output port means - it’s going to return data). The DB Update node in the workflow was to show how to update records in your db based on the results as it explained in the workflow page “With each execution of the workflow, tweets are collected, favorite and retweet numbers are updated in existing records in a SQLite Database”.

2 Likes