airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
15.5k stars 3.99k forks source link

[source-freshservice] Problem with survey questions streaming #44397

Open bseniseht opened 4 weeks ago

bseniseht commented 4 weeks ago

Connector Name

Freshservice

Connector Version

1.1.0

What step the error happened?

During the sync

Relevant information

image Hi ! I`m getting this error in Satisfaction Survey Responses streaming due to some problem in the Freshservice connector. Apparently, there is some problem while parser tries to get e field that is an array in Satisfaction Survey Responses.

Relevant log output

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 120, in read
    yield from self._read_stream(
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 194, in _read_stream
    for record in record_iterator:
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 266, in _read_incremental
    message = self._get_message(record_data_or_message, stream_instance)
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 359, in _get_message
    return stream_data_to_airbyte_message(stream.name, record_data_or_message, stream.transformer, stream.get_json_schema())
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/utils/record_helper.py", line 30, in stream_data_to_airbyte_message
    transformer.transform(data, schema)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/utils/transform.py", line 184, in transform
    for e in normalizer.iter_errors(record):
  File "/usr/local/lib/python3.9/site-packages/jsonschema/validators.py", line 328, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/utils/transform.py", line 171, in normalizator
    yield from original_validator(validator_instance, property_value, instance, schema)
  File "/usr/local/lib/python3.9/site-packages/jsonschema/_validators.py", line 282, in properties
    for error in validator.descend(
  File "/usr/local/lib/python3.9/site-packages/jsonschema/validators.py", line 344, in descend
    for error in self.iter_errors(instance, schema):
  File "/usr/local/lib/python3.9/site-packages/jsonschema/validators.py", line 328, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/utils/transform.py", line 171, in normalizator
    yield from original_validator(validator_instance, property_value, instance, schema)
  File "/usr/local/lib/python3.9/site-packages/jsonschema/_validators.py", line 81, in items
    for error in validator.descend(item, items, path=index):
  File "/usr/local/lib/python3.9/site-packages/jsonschema/validators.py", line 344, in descend
    for error in self.iter_errors(instance, schema):
  File "/usr/local/lib/python3.9/site-packages/jsonschema/validators.py", line 328, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/utils/transform.py", line 162, in normalizator
    instance[k] = self.__normalize(instance[k], subschema)
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/utils/transform.py", line 83, in __normalize
    original_item = self.default_convert(original_item, subschema)
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/utils/transform.py", line 122, in default_convert
    item_types = set(subschema.get("items", {}).get("type", set()))
AttributeError: 'list' object has no attribute 'get'
2024-08-19 14:08:00 source > Marking stream satisfaction_survey_responses as STOPPED
2024-08-19 14:08:00 source > Finished syncing satisfaction_survey_responses

Contribute

marcosmarxm commented 3 weeks ago

Thanks for reporting the issue @bseniseht Freshservice is a community connector and it isn’t in the current roadmap for improvements. If you want to contribute fixing the issue please reach me out in Slack so I can provide you instructions to make the contribution.