There are known issues with data type mismatches and casting errors when syncing data from Google Ads to Postgres using Airbyte. These issues often arise during the normalization step, where Airbyte attempts to cast fields from the raw JSON data into the destination table's schema. If the source data type does not match the expected destination type, the sync can fail with casting errors.
Known Issues: - Users have reported that certain fields from Google Ads (such as label names) are mapped incorrectly (e.g., as INT64 instead of STRING), leading to casting errors in the destination database. This has been observed in both BigQuery and Postgres destinations, and is often due to incorrect type inference or schema mapping in the connector or normalization process. For example, string fields being mapped as integers cause failures when the data contains non-numeric values, resulting in errors like "Bad int64 value" or failed normalization steps. The root cause is often a mismatch between the inferred type and the actual data in the raw tables, as seen in community reports and GitHub issues [Forum: Google ads, breaking 3 tables for invalid data type](
https://discuss.airbyte.io/t/457) [Forum: Normalization Failed during Google Ads to Postgres 14 replication](
https://discuss.airbyte.io/t/1597). - There have also been reports that upgrading Postgres (e.g., from version 12 to 14) can introduce new normalization failures, which may be related to changes in how types are handled or stricter casting rules in newer Postgres versions. In one case, upgrading Airbyte to the latest version resolved the issue, suggesting that bugs in older Airbyte versions may contribute to these problems [Forum: Normalization Failed during Google Ads to Postgres 14 replication](
https://discuss.airbyte.io/t/1597).
Setting Destination Column Types: Currently, Airbyte does not provide a built-in UI feature to manually set or override destination column types for each field during sync. The type mapping is handled automatically based on the source schema and Airbyte's internal type inference. There is an open feature request to allow users to specify type conversions in the UI, but this is not yet available [Github Issue: Allow choosing data type conversion from source to destination](
https://github.com/airbytehq/airbyte/issues/2390). However, you can influence type casting and normalization behavior using the schema normalization options in the Connector Builder UI: -
Default: Enables type casting and normalization according to the declared schema. This is the standard behavior and will attempt to cast fields to the expected types. -
None: Disables schema normalization, passing records through without type casting. This can help avoid casting errors, but the destination will receive the raw data as-is, which may not be ideal for downstream processing [Cast Record Fields to Schema Types](
https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/record-processing#cast-record-fields-to-schema-types).
Recommendations: - Ensure you are using the latest version of Airbyte and the connectors, as some casting and normalization bugs have been fixed in newer releases. - If you encounter persistent casting errors, consider setting schema normalization to "None" to bypass type casting, though this will result in less structured data in your destination. - Review the raw tables to identify which fields are causing casting errors and adjust your source schema or transformation logic if possible. - Monitor the Airbyte GitHub issues and forums for updates on the feature request to allow manual type mapping. If you need more granular control over destination types, you may need to implement post-processing scripts or transformations outside of Airbyte until this feature is supported natively. If you have specific error messages or logs, sharing them can help diagnose the exact fields and types causing the issue.