Open topic with navigation

# Retrieve Historical Data

To create a fetch task to retrieve historical data from Gnip, follow these steps.

To create a new Fetch Task

1. Stop the connector.
2. Open the configuration file in a text editor.

3. In the `[FetchTasks]` section of the configuration file, specify the number of fetch tasks using the `Number` parameter. If you are configuring the first fetch task, type `Number=1`. If one or more fetch tasks have already been configured, increase the value of the `Number` parameter by one (1). Below the `Number` parameter, specify the names of the fetch tasks, starting from zero (0). For example:

       [FetchTasks]
       Number=1
       0=MyTask

4. Below the `[FetchTasks]` section, create a new TaskName section. The name of the section must match the name of the new fetch task. For example:

       [FetchTasks]
       Number=1
       0=MyTask

       [MyTask]

1. In the new section, set the following configuration parameters:

   `AccountName` | The name of the Gnip account that you want to retrieve historical data from. You can find your account name from https://console.gnip.com/.
   `BasicUsername` | The user name to use to access Gnip. Micro Focus recommends you encrypt the value of this parameter before adding it to the configuration file. For information about how to encrypt parameter values, see Encrypt Passwords.
   `BasicPassword` | The password to use to access Gnip. Micro Focus recommends you encrypt the value of this parameter before adding it to the configuration file. For information about how to encrypt parameter values, see Encrypt Passwords.
   `JobNamePrefix` | (Optional) Before the connector retrieves data from the Gnip Historical API it must provide a name to identify the job. The connector provides a GUID, but you can use this parameter to add a string before the GUID, to help you identify the job.
   `Rules` | A list of rules to use to select the data to retrieve from Gnip. An item is retrieved if it matches any of the rules. For information about how to construct rules, refer to the Gnip developer documentation.
   `RuleTags` | A list of tags to use to tag the rules specified by the `Rules` parameter. You must enter the same number of values that you entered for `Rules`. Each entry that is returned from the Gnip Historical API includes the tags for the rules that it matched. The connector includes these tags in document metadata so that you can determine which rule(s) caused an entry to be retrieved.
   `MaxQuoteDollars` | The maximum cost allowed for the historical job, in US Dollars (USD), in order for the connector to accept the job and proceed. If the quote for the historical job returned by Gnip exceeds this value, the connector rejects the job and the synchronize task fails.

2. Specify the time period to retrieve data from:

   - To specify a fixed time period, set the following parameters:

     `StartDate` | The start date to use when you want to retrieve data related to a fixed time period. Specify the date in the format `YYYY-MM-DD HH:NN`, and in the UTC time zone.
     `EndDate` | The end date to use when you want to retrieve data related to a fixed time period. Specify the date in the format `YYYY-MM-DD HH:NN`, and in the UTC time zone.

   - To specify a rolling time period (relative to the time when the fetch task runs), set the following parameters:

     `RelativeStartDate` | The start time of the time period that you want to retrieve data for (relative to the time when the synchronize task starts). For example, to retrieve data no older than 7 days use the value `-7 days`.
     `RelativeEndDate` | The end time of the time period that you want to retrieve data for (relative to the time when the synchronize task starts). For example, to retrieve data that is at least one day old, use the value `-1 days`.

3. (Optional) If the connector is installed on a machine that is behind a proxy server, you might also need to set some additional configuration parameters so that the connector can access the internet. For more information, see Use a Proxy Server to Access Gnip.

4. Save and close the configuration file.

© 2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm