<@U04S8PLJWMT> I am trying to sync records from go...
# ask-ai
o
@kapa.ai I am trying to sync records from google ads to postgres using Airbyte 1.7. Google ads source connector version is 3.13.0. Postgresql db version is 14. When I start the sync, it reads the raw data and populates raw data tables. However, pipeline fails during creation of final tables. In general, it's due to casting errors. Any known issues realted to google ads & postgres connections? Is there a way to set the destination column types so that casting does not fail?
k
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.
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 raw data into the final table schema in Postgres. For example, users have reported that fields expected to be strings are sometimes mapped as integers, leading to casting errors and sync failures. This has been observed with Google Ads label fields being incorrectly typed as INT64 instead of string, causing errors like "Bad int64 value" during normalization. The root cause is often incorrect type inference or schema mapping between the source and destination connectors, especially for complex or dynamic data sources like Google Ads. Upgrading Airbyte to the latest version has resolved some normalization bugs in the past, so ensure you are running the most recent release compatible with your connectors. If you are already on a recent version and still experiencing issues, this may be a regression or an unaddressed bug in the connector or normalization logic [Google ads, breaking 3 tables for invalid data type](https://discuss.airbyte.io/t/457) [Normalization Failed during Google Ads to Postgres 14 replication](https://discuss.airbyte.io/t/1597). Currently, Airbyte does not provide a built-in way to manually set or override destination column types directly in the UI or connection settings. There is an open feature request for allowing users to specify type conversions from source to destination, but this is not yet implemented [Allow choosing data type conversion from source to destination](https://github.com/airbytehq/airbyte/issues/2390). As a workaround, you can try the following: - Review and, if possible, adjust the source schema or custom queries to ensure fields are typed as expected. - Use the "Default" schema normalization option to enable type casting according to the declared schema, but be aware this may still fail if the inferred types are incorrect. If you want to avoid type casting errors, you can set normalization to "None" to preserve the original types, but this may not be suitable for all use cases [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). - If you encounter persistent issues, consider opening a GitHub issue with detailed logs and examples to help the Airbyte team address the specific type mapping problem. In summary, type casting issues between Google Ads and Postgres are a known challenge in Airbyte, and while there are some workarounds, there is currently no direct way to set destination column types to avoid casting failures. Upgrading Airbyte and connectors, and carefully reviewing your source schema, are your best options for now.