Syncs data for all forms if no form ID is provided in config.
Currently, tap fails with an following error when there are no questions associated with a form. Handles this scenario by logging a statement and continues to sync data for other streams.
Updates unittests
CRITICAL 'fields'
Traceback (most recent call last):
File "/Users/Documents/project/taps/tap-typeform/tap_typeform/__init__.py", line 54, in <module>
main()
File "/Users/Documents/project/taps/tap-typeform/typeform-venv/lib/python3.9/site-packages/singer_python-5.10.0-py3.9.egg/singer/utils.py", line 229, in wrapped
return fnc(*args, **kwargs)
File "/Users/Documents/project/taps/tap-typeform/tap_typeform/__init__.py", line 51, in main
_sync(client, config, args.state, catalog.to_dict(), valid_forms)
File "/Users/Documents/project/taps/tap-typeform/typeform-venv/lib/python3.9/site-packages/tap_typeform-2.0.1-py3.9.egg/tap_typeform/sync.py", line 76, in sync
stream_obj.sync_obj(client, state, catalog['streams'], form, config["start_date"],
File "/Users/Documents/project/taps/tap-typeform/typeform-venv/lib/python3.9/site-packages/tap_typeform-2.0.1-py3.9.egg/tap_typeform/streams.py", line 176, in sync_obj
for record in response[self.data_key]:
KeyError: 'fields'
Manual QA steps
Tested without having forms field in config and noticed data being extracted for all the forms.
Tested with forms field value as "" and None and noticed data being extracted for all the forms.
Tested with single valid form_id in config and noticed data being extracted only for that single form id.
Tested with multiple valid form_ids which are comma separated in config and noticed data being extracted only for those form IDs
Created a form with no questions and made sure tap logs a statement which reads There are no questions associated with form without failing.
Risks
Low, all the existing connections should be having forms field configured. This changes will not have any impact on them
Description of change
Handles/Fixes:
Manual QA steps
forms
field in config and noticed data being extracted for all the forms.forms
field value as""
andNone
and noticed data being extracted for all the forms.form_id
in config and noticed data being extracted only for that single form id.form_ids
which are comma separated in config and noticed data being extracted only for those form IDsThere are no questions associated with form
without failing.Risks
forms
field configured. This changes will not have any impact on themRollback steps