Dragos Cioata
04/29/2026, 11:54 AMkapa.ai
04/29/2026, 11:55 AMexecute_completed_at depends on your data warehouse: BigQuery Starting with dbt-bigquery >= 1.11, nanosecond-precision timestamps (9 fractional digits) began appearing in execute_completed_at in dbt_run_results, causing CAST(... AS TIMESTAMP) failures since BigQuery only supports microsecond precision (6 digits). [BigQuery timestamp fix] This was addressed in two ways in the Elementary package: 1. A normalize_artifact_timestamp_precision macro was introduced to normalize timestamp precision for execute_started_at, execute_completed_at, compile_started_at, and compile_completed_at fields in upload_run_results.sql and upload_source_freshness.sql. [BigQuery artifacts fix] 2. A bigquery__edr_cast_as_timestamp dispatch macro was added that truncates fractional seconds beyond microsecond precision (6 digits) before casting string values to TIMESTAMP. [BigQuery timestamp fix] Recommendation: Upgrade to the latest Elementary dbt package version to get these fixes automatically. Redshift A similar issue (null values in execute_completed_at and related columns) was reported after upgrading to dbt 1.8.x with Elementary 0.15.1. This was resolved in Elementary version 0.16.0. [GitHub issue] If you are on a different data warehouse or a specific version and still experiencing issues, please share your Elementary version and DWH type, as the fix may vary. The knowledge sources do not contain a manual SQL workaround you can apply yourself beyond upgrading the package. š 0 button š 0 button ā¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Dragos Cioata
04/29/2026, 11:55 AMDragos Cioata
04/29/2026, 11:56 AMDragos Cioata
04/29/2026, 11:58 AMkapa.ai
04/29/2026, 11:58 AMbigquery__edr_cast_as_timestamp dispatch macro. Here's what it does under the hood:
It uses regexp_replace to truncate fractional seconds beyond 6 digits before casting to TIMESTAMP. The pattern used is r'(.\d{6})\d+' with a '\\1' backreference ā timestamps with ā¤6 fractional digits or no fractional seconds pass through unchanged. [BigQuery timestamp fix]
The recommended approach is simply to upgrade your Elementary dbt package to the version that includes this fix, rather than manually modifying anything. The fix is already built into the package.
If you are not on BigQuery, the knowledge sources do not contain specific instructions for manually changing timestamp precision from 9 to 6 digits on other data warehouses. Could you share which data warehouse you're using? That would help narrow down the right guidance. š 0 button š 0 button ā¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Dragos Cioata
04/29/2026, 12:00 PMelementary-data==0.23.2
dbt-bigquery==1.11.1
packages:
- package: elementary-data/elementary
version: 0.23.0
dbt-fusion 2.0.0-preview.173kapa.ai
04/29/2026, 12:00 PMelementary-data==0.23.2 (CLI)
⢠elementary-data/elementary==0.23.0 (dbt package)
⢠dbt-bigquery==1.11.1
⢠dbt-fusion 2.0.0-preview.173
This matches exactly the scenario described in the knowledge sources. With dbt-bigquery >= 1.11, nanosecond-precision timestamps (9 fractional digits) appear in execute_completed_at, causing Invalid timestamp errors that block edr report and edr send-report. [BigQuery timestamp fix]
Two fixes were merged into the Elementary dbt package to address this:
1. A normalize_artifact_timestamp_precision macro to normalize precision when writing artifact timestamps. [BigQuery artifacts fix]
2. A bigquery__edr_cast_as_timestamp dispatch macro that truncates fractional seconds beyond 6 digits before casting. [BigQuery timestamp fix]
However, the knowledge sources do not explicitly confirm whether these fixes are included in version 0.23.0 of the Elementary dbt package. Since you are already on 0.23.0, I cannot say with certainty whether upgrading further would resolve the issue based on the available information.
What I'd recommend:
⢠Check if a newer version of elementary-data/elementary is available beyond 0.23.0 and upgrade to it.
⢠Reach out to the Elementary community Slack, as this exact issue (BigQuery + dbt-bigquery >= 1.11 + nanosecond timestamps) was actively being tracked and discussed there. [Slack discussion] š 0 button š 0 button ā¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Dragos Cioata
04/29/2026, 12:04 PMkapa.ai
04/29/2026, 12:04 PMbigquery__edr_cast_as_timestamp dispatch macro that Elementary uses to fix the nanosecond-to-microsecond precision issue on BigQuery: [BigQuery timestamp fix]
{% macro bigquery__edr_cast_as_timestamp(column) %}
cast(
regexp_replace({{ column }}, r'(\.\d{6})\d+', '\\1')
as timestamp
)
{% endmacro %}
This macro:
⢠Uses regexp_replace to truncate any fractional seconds beyond 6 digits (microseconds) before casting to TIMESTAMP
⢠Passes through timestamps with ā¤6 fractional digits or no fractional seconds unchanged
⢠Only affects BigQuery; all other adapters continue using the default cast(... as timestamp) path
You can place this macro in your own dbt project's macros/ directory. Since dbt prioritizes project-level macros over package macros, it will override the default behavior without modifying the Elementary package files directly.
> Note: The knowledge sources describe this macro's behavior and intent but do not show the exact full implementation code. The above is derived directly from the description in the PR. I'd recommend verifying the exact syntax against the merged PR in the Elementary repository before using it in production. š 0 button š 0 button ā¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Dragos Cioata
04/29/2026, 12:05 PMkapa.ai
04/29/2026, 12:05 PMbigquery__edr_cast_as_timestamp macro. However, following standard dbt naming conventions and the pattern described in the PR, a reasonable name would be something like edr_cast_as_timestamp.sql placed in your macros/ directory. [BigQuery timestamp fix] I'd recommend checking the Elementary repository directly to confirm the exact file name used in the merged fix. š 0 button š 0 button ā¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Dragos Cioata
04/29/2026, 12:08 PMedr_cast_as_timestamp