Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initial state file example in docs #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ The following is an example of the required configuration
"customer_ids": ""}
```

For report streams, the starting date from the configuration is used in combination with the `conversion_window_days`, which is set to `-30` by default.

### Create a properties file

The properties file will indicate what streams and fields to replicate from the AdWords API. The Tap takes advantage of the Singer best practices for [schema discovery and property selection](https://github.com/singer-io/getting-started/blob/master/BEST_PRACTICES.md#schema-discovery-and-property-selection).
Expand All @@ -68,11 +70,23 @@ The properties file will indicate what streams and fields to replicate from the
You can provide JSON file that contains a date for the streams to force the application to only fetch data newer than those dates. If you omit the file it will fetch all data for the selected streams.

```json
{"campaigns_12345":"2017-01-01T00:00:00Z",
"CLICK_PERFORMANCE_REPORT_12345":"2017-01-01T00:00:00Z",
"CRITERIA_PERFORMANCE_REPORT_12345":"2017-01-01T00:00:00Z"}
{
"bookmarks": {
"campaigns_12345": {
"last_attribution_window_date": "2017-01-01T00:00:00Z"
},
"CLICK_PERFORMANCE_REPORT_12345": {
"last_attribution_window_date": "2017-01-01T00:00:00Z"
},
"CRITERIA_PERFORMANCE_REPORT_12345": {
"last_attribution_window_date": "2017-01-01T00:00:00Z"
}
}
}
```

To set the starting date of a specific stream, the bookmark of that stream can contain a key `date` instead of `last_attribution_window_date`.

### Run the Tap

`tap-adwords -c config.json -p properties.json -s state.json`
Expand Down