Björn Maronde
08/20/2025, 3:29 PMkapa.ai
08/20/2025, 3:29 PMclass io.airbyte.cdk.load.data.NullValue cannot be cast to class io.airbyte.cdk.load.data.TimestampWithoutTimezoneValue indicates that Airbyte is trying to cast a NULL value to a timestamp type, specifically TimestampWithoutTimezoneValue, and this is failing. This is happening in your Postgres → BigQuery sync, but only for one table, even though you have many connections with the same structure. Based on the knowledge sources, here are some relevant points and possible causes: 1. Data Type Mapping Issues: There have been several reports of issues with how Airbyte maps Postgres date/timestamp types to BigQuery types. For example, sometimes timestamp without time zone in Postgres is mapped to datetime in BigQuery, and sometimes to timestamp, depending on recent changes or bugs in Airbyte. These mappings can be inconsistent and may change between Airbyte versions or even between syncs, as seen in recent user reports. This can cause type mismatches and casting errors if the destination expects a specific type but receives NULL or a different type instead. See the discussion and logs in [this issue](https://github.com/airbytehq/airbyte/issues/45616). 2. NULL Handling: If a column in your source table contains NULL values, and Airbyte or the destination expects a non-NULL timestamp, this can trigger the error you’re seeing. This is especially likely if the table schema or normalization logic is stricter for this particular table, or if there’s a difference in how NULLs are handled for this table compared to others. 3. Inconsistent Schema or Data: Even if your connections have the "same structure," there may be subtle differences in the actual data or schema (e.g., default values, constraints, or the presence of NULLs in the problematic table but not in others). This could explain why only one table is affected. 4. Recent Airbyte Changes: There have been recent changes and some instability in how Airbyte handles timestamp types between Postgres and BigQuery, with some users reporting that the mapping can change between syncs without any connector update. This could be related to your issue if your Airbyte instance was recently updated or if there was a change in normalization logic. See user reports in [this issue](https://github.com/airbytehq/airbyte/issues/45616). What you can try: - Check the Source Data: Inspect the three problematic columns in the source Postgres table for NULL values or unusual data (e.g., out-of-range timestamps, empty strings). - Compare Table Schemas: Double-check the schema of the problematic table against the working ones, both in Postgres and in BigQuery, to see if there are any differences in type definitions or constraints. - Review Airbyte and Connector Versions: If you recently upgraded Airbyte or the connectors, consider if the issue started after an upgrade. Some users have found that downgrading the Postgres connector can resolve timestamp-related issues [see here](https://discuss.airbyte.io/t/1407). - Reset or Recreate the Connection: Sometimes, resetting the connection or recreating it can resolve schema mismatches that persist after upgrades or changes [see here](https://discuss.airbyte.io/t/2335). - Check for Known Issues: There are open issues related to timestamp handling and type mapping between Postgres and BigQuery. You may want to follow or comment on [this issue](https://github.com/airbytehq/airbyte/issues/45616) for updates. If after these checks the problem persists, you may need to provide more details (such as sample data, schema definitions, and connector versions) to the Airbyte community or support for further troubleshooting. Summary: This is a known class of issue in Airbyte, often related to how NULLs and timestamp types are handled between Postgres and BigQuery. It can be triggered by subtle data or schema differences, or by recent changes in Airbyte’s type mapping logic. Comparing the problematic table to the working ones and checking for NULLs or schema mismatches is a good next step. If needed, follow the linked issues for updates and possible fixes.