Open oscar-latorre-av opened 1 year ago
Facing the same issue here, but the change will need to be made in the repo https://github.com/singer-io/tap-deputy .
I believe 'Json': 'object'
should be added to the TYPE_MAP
referenced above.
Does anyone have a work around or anything for this so we can keep the integration going while this gets sorted? Or should I reach out to Deputy to see if they can revert the change made that introduced the Config type?
Any help would be appreciated as we use this data daily throughout the business.
Or can we adjust the tap_deputy to include this in the mapping ourselves?
Facing the same issue here, but the change will need to be made in the repo https://github.com/singer-io/tap-deputy . I believe
'Json': 'object'
should be added to theTYPE_MAP
referenced above.
Simply adding 'Json': 'object'
doesn't cut it, as the Resource API returns empty/null EmployeeAgreement.Config
s as "[]"
and singer complains that that does not match type ['object', 'null']
. Those empty objects should be somehow handled, sadly I don't know enough about singer to try that.
Thanks for your contribution @oscar-latorre-av . That makes sense to me. I will look in to the code a bit more to see if there's a way to handle those empty array values. Or hopefully someone else can help! I have opened a PR with my initial suggestion here and have linked back to this discussion in the description.
Appreciate you reaching out @P-Arnold, apologies for not seeing this issue sooner. I'll make sure this channels issues become instantly visible in future!
For now, let me start looking into this issue and see what I can get sorted for you all!
Resource
EmployeeAgreement
has a newly added field (Config
) which has a new type (Json
, as reported by the INFO endpoint). This new field type is not accounted for inTYPE_MAP
indiscover.py
, and is throwing an error every time Stitch (or singer) tries to perform an extraction.https://github.com/DeputyApp/singer-tap-deputy/blob/6126abafdd7e07613d823c61c84c06235782044f/tap_deputy/discover.py#L64-L71
Logs
``` $ tap-deputy -c config.json --dev WARNING Executing Tap in Dev mode DEBUG Starting new HTTPS connection (1): [REDACTED].eu.deputy.com:443 DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/Address/INFO HTTP/1.1" 200 208 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.2956879138946533, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/Category/INFO HTTP/1.1" 200 177 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.1277756690979004, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/Comment/INFO HTTP/1.1" 200 175 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.11403942108154297, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/Company/INFO HTTP/1.1" 200 254 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.11162185668945312, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://276be407021147.eu.deputy.com:443 "GET /api/v1/resource/CompanyPeriod/INFO HTTP/1.1" 200 166 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.09200048446655273, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/Contact/INFO HTTP/1.1" 200 215 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.10479259490966797, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/Country/INFO HTTP/1.1" 200 184 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.10700106620788574, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/CustomAppData/INFO HTTP/1.1" 200 189 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.16899871826171875, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/CustomField/INFO HTTP/1.1" 200 277 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.09703683853149414, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/CustomFieldData/INFO HTTP/1.1" 200 410 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.1805715560913086, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/Employee/INFO HTTP/1.1" 200 427 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.22699999809265137, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} DEBUG https://[REDACTED].eu.deputy.com:443 "GET /api/v1/resource/EmployeeAgreement/INFO HTTP/1.1" 200 294 INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.22404694557189941, "tags": {"endpoint": "resource_info", "http_status_code": 200, "status": "succeeded"}} CRITICAL 'Json' Traceback (most recent call last): File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "[REDACTED]\.venv\Scripts\tap-deputy.exe\__main__.py", line 7, in