Pipeline: Writing the Results of a Twitter Query to a File

On this Page

Scenario

I want to query Twitter for information about my company and write it to a file. 

Requirements

Snaps Used

For this scenario, the following Snaps are used:

  • Twitter Query
  • JSON Formatter
  • File Writer

Other Requirements

  • A Twitter account configured in SnapLogic Manager. See Accounts for more information on configuring an account.


Configuration


  1. Create a new pipeline by clicking the (+) tab.
     
  2. 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.
       
  3. 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.
     
  4. 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.

 
Twitter pipelie
 
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.