Skip to content

Commit

Permalink
fix failing references to options_obj
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadolny13 committed Oct 1, 2024
1 parent c05a5f0 commit 0b38eb1
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions data/transform/models/marts/telemetry/base/project_base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ WITH first_values AS (

SELECT DISTINCT
project_id,
FIRST_VALUE(
CASE WHEN is_exec_event = TRUE THEN options_obj END
) IGNORE NULLS OVER (
PARTITION BY
project_id
ORDER BY COALESCE(started_ts, finished_ts) ASC
):elt:state::STRING AS first_elt_state,
-- FIRST_VALUE(
-- CASE WHEN is_exec_event = TRUE THEN options_obj END
-- ) IGNORE NULLS OVER (
-- PARTITION BY
-- project_id
-- ORDER BY COALESCE(started_ts, finished_ts) ASC
-- ):elt:state::STRING
NULL AS first_elt_state,
FIRST_VALUE(
CASE
WHEN cli_command != 'init'
Expand All @@ -31,13 +32,14 @@ WITH first_values AS (
project_id
ORDER BY COALESCE(started_ts, finished_ts) ASC
) AS last_meltano_version,
FIRST_VALUE(
options_obj:init:project_directory
) IGNORE NULLS OVER (
PARTITION BY
project_id
ORDER BY COALESCE(started_ts, finished_ts) ASC
) AS first_project_directory
-- FIRST_VALUE(
-- options_obj:init:project_directory
-- ) IGNORE NULLS OVER (
-- PARTITION BY
-- project_id
-- ORDER BY COALESCE(started_ts, finished_ts) ASC
-- )
NULL AS first_project_directory
FROM {{ ref('cli_executions_base') }}

),
Expand Down

0 comments on commit 0b38eb1

Please sign in to comment.