- Notifications
You must be signed in to change notification settings - Fork9
License
singer-io/tap-surveymonkey
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is aSinger tap that produces JSON-formatted datafollowing theSingerspec.
This tap:
Pulls raw data fromSurveyMonkey
Extracts the following resources:
- Surveys
- Responses
- Simplified Responses
- Survey Details
Outputs the schema for each resource
Incrementally pulls data based on the input state
To pull all surveys, the configuration parametersaccess_token andstart_date are required.
- To pull all responses or simplified responses or survey_details for a specific survey, the configuration parameters
access_token,start_date, andsurvey_idare required. - To pull all data of responses or simplified responses or survey_details, the configuration parameters
access_token,start_date, andsurvey_idare required.
The parameterpage_size(default: 50, max: 100) is optional to adjust the response-size for faster response times or larger batches thereby and reduced number of API-calls.
Thesurveys andresponses resources will pull data in the form described on the SurveyMonkey API docs.
The Simplified Responses resource will pull a Response schema, with an extra keysimple_text embedded in each of theanswer dictionaries,which is a human-readable form of the survey respondent's response to question. It also contains thefamily,subtype, andheading keys in thequestion object, for easy reference.
Install
Clone this repo
git clone ...We recommend using a virtualenv:
python3 -m venv ~/.virtualenvs/tap-surveymonkeysource ~/.virtualenvs/tap-surveymonkey/bin/activatepip install -e .Create a SurveyMonkey access token
Login to your SurveyMonkey account, go toSurveyMonkey app directory, and put
stitchdatain the search box to find the Stitchdata app. In there, you can authorize to get an access token.Set up your config file.
An example config file is provided in
sample_config.json, the access token and survey in that file are invalid, and will error out. Replace them with your own valid ones.Run the tap in discovery mode to get catalog.json file.
tap-surveymonkey --config config.json --discover > catalog.jsonIn the generated
catalog.jsonfile, select the streams to sync.Each stream in the
catalog.jsonfile has aschemaentry. To select a stream to sync, add"selected": true to that stream'sschemaentry. For example, to sync the survey_details stream:"tap_stream_id": "survey_details", "schema": { "selected": true, "properties": { ... } }...Run the application
tap-surveymonkey can be run with:
tap-surveymonkey --config config.json --catalog catalog.jsonTo run withStitch Import API with dry run:
tap-surveymonkey --config config.json --catalog catalog.json | target-stitch --config target_config.json --dry-run > state.json
| Config property | Required | Description |
|---|---|---|
access_token | Yes | Seehttps://developer.surveymonkey.com/api/v3/#oauth-2-0-flow |
start_date | Yes | For streams with replication methodINCREMENTAL the start date time to be used |
page_size | No, default"50" | The page size for paginated streams |
survey_id | No | In case you just want to get data for just one survey. Does not work with streamsurveys. |
- Endpoint:https://api.surveymonkey.com/v3/surveys
- Primary keys: id
- Replication strategy: INCREMENTAL
- Bookmark: date_modified (date-time)
- Endpoint:https://api.surveymonkey.com/v3/surveys/[survey_id]/details
- Primary keys: id
- Replication strategy: INCREMENTAL
- Bookmark: date_modified (date-time)
- Endpoint:https://api.surveymonkey.com/v3/surveys/[survey_id]/responses/bulk
- Primary keys: id
- Replication strategy: INCREMENTAL
- Bookmark: date_modified (date-time)
- Endpoint:https://api.surveymonkey.com/v3/surveys/[survey_id]/responses/bulk
- Primary keys: id
- Replication strategy: INCREMENTAL
- Bookmark: date_modified (date-time)
While developing the tap, run pylint to improve better code quality which is recommended bySinger.io best practices.
pylint tap_surveymonkey -d missing-docstring -d logging-format-interpolation -d too-many-locals -d too-many-argumentsTo check the tap and verify working, installsinger-tools.
tap-surveymonkey --config tap_config.json --catalog catalog.json | singer-check-tapCopyright © 2019 Stitch
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors10
Uh oh!
There was an error while loading.Please reload this page.