diff --git a/src/ingestion/connectors/ai/openai/dbt/schema.yml b/src/ingestion/connectors/ai/openai/dbt/schema.yml index 654b89b7e..555ae574c 100644 --- a/src/ingestion/connectors/ai/openai/dbt/schema.yml +++ b/src/ingestion/connectors/ai/openai/dbt/schema.yml @@ -10,10 +10,16 @@ sources: # business bucket), so anchor source-level on it with the report tier; # `users` is a full-refresh roster with no bucket column, overridden to the # sync-liveness default. Confirm against live data once OpenAI is ingested. + # + # `bucket_start_time` is Unix **seconds** (an integer), not a date string — + # see the connector's own dbt models (to_ai_cost.sql / to_ai_tool_usage.sql: + # `toDate(fromUnixTimestamp(CAST(bucket_start_time AS UInt32)))`). Use the + # matching epoch conversion here; `parseDateTimeBestEffortOrNull` would fail + # on an integer. freshness: warn_after: {count: 72, period: hour} error_after: {count: 120, period: hour} - loaded_at_field: parseDateTimeBestEffortOrNull(bucket_start_time) + loaded_at_field: fromUnixTimestamp(CAST(bucket_start_time AS UInt32)) schema: bronze_openai tables: - name: users # roster — no bucket column; sync-liveness default diff --git a/src/ingestion/connectors/wiki/confluence/dbt/schema.yml b/src/ingestion/connectors/wiki/confluence/dbt/schema.yml index 8b1efd527..ee9eee7c3 100644 --- a/src/ingestion/connectors/wiki/confluence/dbt/schema.yml +++ b/src/ingestion/connectors/wiki/confluence/dbt/schema.yml @@ -17,7 +17,9 @@ sources: tables: - name: wiki_spaces - name: wiki_pages # inferred windowed/event (updated_at) - loaded_at_field: parseDateTimeBestEffortOrNull(updated_at) + # ms-precision parse to match the connector's own model convention + # (confluence__wiki_pages: parseDateTime64BestEffortOrNull(updated_at, 3)). + loaded_at_field: parseDateTime64BestEffortOrNull(updated_at, 3) freshness: warn_after: {count: 96, period: hour} error_after: {count: 168, period: hour} diff --git a/src/ingestion/connectors/wiki/outline/dbt/schema.yml b/src/ingestion/connectors/wiki/outline/dbt/schema.yml index 2f7017fe1..6214857ac 100644 --- a/src/ingestion/connectors/wiki/outline/dbt/schema.yml +++ b/src/ingestion/connectors/wiki/outline/dbt/schema.yml @@ -15,7 +15,9 @@ sources: tables: - name: wiki_spaces - name: wiki_pages # inferred windowed/event (updated_at) - loaded_at_field: parseDateTimeBestEffortOrNull(updated_at) + # ms-precision parse to match the connector's own model convention + # (outline__wiki_pages: parseDateTime64BestEffortOrNull(updated_at, 3)). + loaded_at_field: parseDateTime64BestEffortOrNull(updated_at, 3) freshness: warn_after: {count: 96, period: hour} error_after: {count: 168, period: hour}