On this Page
I want to query Twitter for information about my company and write it to a file.
For this scenario, the following Snaps are used:
- Twitter Query
- JSON Formatter
- File Writer
- A Twitter account configured in SnapLogic Manager. See Accounts for more information on configuring an account.
- Create a new pipeline by clicking the (+) tab.
- Add and configure a Twitter Query Snap.
- The the Accounts tab, select your configured Twitter account.
- For the Twitter query field, enter the query you want to use. See the Twitter documentation for more details.
- Add a Format Snap. According to the Twitter document, Things Every Developer Should Know, the Twitter API supports JSON as an output, so add the JSON Format Snap.
- Add and configure a File Writer Snap.
- For each output, set the File Name to the name of the file where you want the results written to, including a path if necessary.
If you want to only pass certain fields of information through to the file, insert a Structure Snap in between the Twitter Query and the JSON Formatter. In the Structure Snap, map the fields you want to pull to target fields with the move operation.