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.45k stars 3.98k forks source link

Source ZohoCRM: does not include Contacts modules for unknown reason #31433

Open c-schmitz opened 11 months ago

c-schmitz commented 11 months ago

Connector Name

source-zoho-crm

Connector Version

0.1.2

What step the error happened?

Configuring the streams you want to sync

Relevant information

We would like to export Contacts data (which is a ZohoCRM core module) to our DWH, but the table is just not offered. All other source data tables are offered, so I have no reasonable explanation why it does not show up. Permissions to read data from the module was fully given in the API key scope.

Relevant log output

No response

Contribute

mohabmes commented 9 months ago

The problem arises from a custom module, where it seems that the json_type attribute is not present, resulting in a failure of the entire process.

Temporarily resolving the problem involves modifying the from_dict method in airbyte-integrations/connectors/source-zoho-crm/source_zoho_crm/types.py and adding jsonobject as the default json_type.

    def from_dict(cls, dct: MutableMapping[Any, Any]) -> object:
        try:
            fields = cls._filter_by_names(dct)
            if 'json_type' not in fields:
                fields['json_type'] = "jsonobject"
            return cls(**fields)
        except Exception as error:
            logger.warning("An exception occurred: ", error)