-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formatted sources and corrected snapshot_executions
- Loading branch information
1 parent
b825bdf
commit 504a683
Showing
13 changed files
with
247 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
with base as ( | ||
with | ||
base as ( | ||
|
||
select * | ||
from {{ ref('stg_dbt__snapshot_executions') }} | ||
select * | ||
from {{ ref('stg_dbt__snapshot_executions') }} | ||
|
||
), | ||
) | ||
|
||
snapshot_executions as ( | ||
, snapshot_executions as ( | ||
|
||
select | ||
snapshot_execution_id, | ||
command_invocation_id, | ||
node_id, | ||
run_started_at, | ||
was_full_refresh, | ||
thread_id, | ||
status, | ||
compile_started_at, | ||
query_completed_at, | ||
total_node_runtime, | ||
rows_affected, | ||
materialization, | ||
schema, | ||
name, | ||
alias, | ||
message | ||
from base | ||
select | ||
snapshot_execution_id | ||
, command_invocation_id | ||
, node_id | ||
, run_started_at | ||
, was_full_refresh | ||
, thread_id | ||
, status | ||
, compile_started_at | ||
, query_completed_at | ||
, total_node_runtime | ||
, rows_affected | ||
, materialization | ||
, schema | ||
, name | ||
, alias | ||
, message | ||
from base | ||
|
||
) | ||
) | ||
|
||
select * from snapshot_executions | ||
select * from snapshot_executions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
/* Bigquery won't let us `where` without `from` so we use this workaround */ | ||
with dummy_cte as ( | ||
select 1 as foo | ||
) | ||
with | ||
dummy_cte as ( | ||
|
||
select 1 as foo | ||
|
||
) | ||
|
||
select | ||
cast(null as {{ type_string() }}) as command_invocation_id, | ||
cast(null as {{ type_string() }}) as node_id, | ||
cast(null as {{ type_timestamp() }}) as run_started_at, | ||
cast(null as {{ type_string() }}) as name, | ||
cast(null as {{ type_string() }}) as type, | ||
cast(null as {{ type_json() }}) as owner, | ||
cast(null as {{ type_string() }}) as maturity, | ||
cast(null as {{ type_string() }}) as path, | ||
cast(null as {{ type_string() }}) as description, | ||
cast(null as {{ type_string() }}) as url, | ||
cast(null as {{ type_string() }}) as package_name, | ||
cast(null as {{ type_array() }}) as depends_on_nodes, | ||
cast(null as {{ type_array() }}) as tags, | ||
cast(null as {{ type_json() }}) as all_results | ||
cast(null as {{ type_string() }}) as command_invocation_id | ||
, cast(null as {{ type_string() }}) as node_id | ||
, cast(null as {{ type_timestamp() }}) as run_started_at | ||
, cast(null as {{ type_string() }}) as name | ||
, cast(null as {{ type_string() }}) as type | ||
, cast(null as {{ type_json() }}) as owner | ||
, cast(null as {{ type_string() }}) as maturity | ||
, cast(null as {{ type_string() }}) as path | ||
, cast(null as {{ type_string() }}) as description | ||
, cast(null as {{ type_string() }}) as url | ||
, cast(null as {{ type_string() }}) as package_name | ||
, cast(null as {{ type_array() }}) as depends_on_nodes | ||
, cast(null as {{ type_array() }}) as tags | ||
, cast(null as {{ type_json() }}) as all_results | ||
from dummy_cte | ||
where 1 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
/* Bigquery won't let us `where` without `from` so we use this workaround */ | ||
with dummy_cte as ( | ||
select 1 as foo | ||
) | ||
with | ||
dummy_cte as ( | ||
|
||
select 1 as foo | ||
|
||
) | ||
|
||
select | ||
cast(null as {{ type_string() }}) as command_invocation_id, | ||
cast(null as {{ type_string() }}) as dbt_version, | ||
cast(null as {{ type_string() }}) as project_name, | ||
cast(null as {{ type_timestamp() }}) as run_started_at, | ||
cast(null as {{ type_string() }}) as dbt_command, | ||
cast(null as {{ type_boolean() }}) as full_refresh_flag, | ||
cast(null as {{ type_string() }}) as target_profile_name, | ||
cast(null as {{ type_string() }}) as target_name, | ||
cast(null as {{ type_string() }}) as target_schema, | ||
cast(null as {{ type_int() }}) as target_threads, | ||
cast(null as {{ type_string() }}) as dbt_cloud_project_id, | ||
cast(null as {{ type_string() }}) as dbt_cloud_job_id, | ||
cast(null as {{ type_string() }}) as dbt_cloud_run_id, | ||
cast(null as {{ type_string() }}) as dbt_cloud_run_reason_category, | ||
cast(null as {{ type_string() }}) as dbt_cloud_run_reason, | ||
cast(null as {{ type_json() }}) as env_vars, | ||
cast(null as {{ type_json() }}) as dbt_vars, | ||
cast(null as {{ type_json() }}) as invocation_args, | ||
cast(null as {{ type_json() }}) as dbt_custom_envs | ||
cast(null as {{ type_string() }}) as command_invocation_id | ||
, cast(null as {{ type_string() }}) as dbt_version | ||
, cast(null as {{ type_string() }}) as project_name | ||
, cast(null as {{ type_timestamp() }}) as run_started_at | ||
, cast(null as {{ type_string() }}) as dbt_command | ||
, cast(null as {{ type_boolean() }}) as full_refresh_flag | ||
, cast(null as {{ type_string() }}) as target_profile_name | ||
, cast(null as {{ type_string() }}) as target_name | ||
, cast(null as {{ type_string() }}) as target_schema | ||
, cast(null as {{ type_int() }}) as target_threads | ||
, cast(null as {{ type_string() }}) as dbt_cloud_project_id | ||
, cast(null as {{ type_string() }}) as dbt_cloud_job_id | ||
, cast(null as {{ type_string() }}) as dbt_cloud_run_id | ||
, cast(null as {{ type_string() }}) as dbt_cloud_run_reason_category | ||
, cast(null as {{ type_string() }}) as dbt_cloud_run_reason | ||
, cast(null as {{ type_json() }}) as env_vars | ||
, cast(null as {{ type_json() }}) as dbt_vars | ||
, cast(null as {{ type_json() }}) as invocation_args | ||
, cast(null as {{ type_json() }}) as dbt_custom_envs | ||
from dummy_cte | ||
where 1 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
/* Bigquery won't let us `where` without `from` so we use this workaround */ | ||
with dummy_cte as ( | ||
select 1 as foo | ||
) | ||
with | ||
dummy_cte as ( | ||
|
||
select 1 as foo | ||
|
||
) | ||
|
||
select | ||
cast(null as {{ type_string() }}) as command_invocation_id, | ||
cast(null as {{ type_string() }}) as node_id, | ||
cast(null as {{ type_timestamp() }}) as run_started_at, | ||
cast(null as {{ type_boolean() }}) as was_full_refresh, | ||
cast(null as {{ type_string() }}) as thread_id, | ||
cast(null as {{ type_string() }}) as status, | ||
cast(null as {{ type_timestamp() }}) as compile_started_at, | ||
cast(null as {{ type_timestamp() }}) as query_completed_at, | ||
cast(null as {{ type_float() }}) as total_node_runtime, | ||
cast(null as {{ type_int() }}) as rows_affected, | ||
cast(null as {{ type_string() }}) as command_invocation_id | ||
, cast(null as {{ type_string() }}) as node_id | ||
, cast(null as {{ type_timestamp() }}) as run_started_at | ||
, cast(null as {{ type_boolean() }}) as was_full_refresh | ||
, cast(null as {{ type_string() }}) as thread_id | ||
, cast(null as {{ type_string() }}) as status | ||
, cast(null as {{ type_timestamp() }}) as compile_started_at | ||
, cast(null as {{ type_timestamp() }}) as query_completed_at | ||
, cast(null as {{ type_float() }}) as total_node_runtime | ||
, cast(null as {{ type_int() }}) as rows_affected | ||
{% if target.type == 'bigquery' %} | ||
cast(null as {{ type_int() }}) as bytes_processed, | ||
, cast(null as {{ type_int() }}) as bytes_processed | ||
{% endif %} | ||
cast(null as {{ type_string() }}) as materialization, | ||
cast(null as {{ type_string() }}) as schema, | ||
cast(null as {{ type_string() }}) as name, | ||
cast(null as {{ type_string() }}) as alias, | ||
cast(null as {{ type_string() }}) as message, | ||
cast(null as {{ type_json() }}) as adapter_response | ||
, cast(null as {{ type_string() }}) as materialization | ||
, cast(null as {{ type_string() }}) as schema | ||
, cast(null as {{ type_string() }}) as name | ||
, cast(null as {{ type_string() }}) as alias | ||
, cast(null as {{ type_string() }}) as message | ||
, cast(null as {{ type_json() }}) as adapter_response | ||
from dummy_cte | ||
where 1 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
/* Bigquery won't let us `where` without `from` so we use this workaround */ | ||
with dummy_cte as ( | ||
select 1 as foo | ||
) | ||
with | ||
dummy_cte as ( | ||
|
||
select 1 as foo | ||
|
||
) | ||
|
||
select | ||
cast(null as {{ type_string() }}) as command_invocation_id, | ||
cast(null as {{ type_string() }}) as node_id, | ||
cast(null as {{ type_timestamp() }}) as run_started_at, | ||
cast(null as {{ type_string() }}) as database, | ||
cast(null as {{ type_string() }}) as schema, | ||
cast(null as {{ type_string() }}) as name, | ||
cast(null as {{ type_array() }}) as depends_on_nodes, | ||
cast(null as {{ type_string() }}) as package_name, | ||
cast(null as {{ type_string() }}) as path, | ||
cast(null as {{ type_string() }}) as checksum, | ||
cast(null as {{ type_string() }}) as materialization, | ||
cast(null as {{ type_array() }}) as tags, | ||
cast(null as {{ type_json() }}) as meta, | ||
cast(null as {{ type_string() }}) as alias, | ||
cast(null as {{ type_json() }}) as all_results | ||
cast(null as {{ type_string() }}) as command_invocation_id | ||
, cast(null as {{ type_string() }}) as node_id | ||
, cast(null as {{ type_timestamp() }}) as run_started_at | ||
, cast(null as {{ type_string() }}) as database | ||
, cast(null as {{ type_string() }}) as schema | ||
, cast(null as {{ type_string() }}) as name | ||
, cast(null as {{ type_array() }}) as depends_on_nodes | ||
, cast(null as {{ type_string() }}) as package_name | ||
, cast(null as {{ type_string() }}) as path | ||
, cast(null as {{ type_string() }}) as checksum | ||
, cast(null as {{ type_string() }}) as materialization | ||
, cast(null as {{ type_array() }}) as tags | ||
, cast(null as {{ type_json() }}) as meta | ||
, cast(null as {{ type_string() }}) as alias | ||
, cast(null as {{ type_json() }}) as all_results | ||
from dummy_cte | ||
where 1 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
/* Bigquery won't let us `where` without `from` so we use this workaround */ | ||
with dummy_cte as ( | ||
select 1 as foo | ||
) | ||
with | ||
dummy_cte as ( | ||
|
||
select 1 as foo | ||
|
||
) | ||
|
||
select | ||
cast(null as {{ type_string() }}) as command_invocation_id, | ||
cast(null as {{ type_string() }}) as node_id, | ||
cast(null as {{ type_timestamp() }}) as run_started_at, | ||
cast(null as {{ type_boolean() }}) as was_full_refresh, | ||
cast(null as {{ type_string() }}) as thread_id, | ||
cast(null as {{ type_string() }}) as status, | ||
cast(null as {{ type_timestamp() }}) as compile_started_at, | ||
cast(null as {{ type_timestamp() }}) as query_completed_at, | ||
cast(null as {{ type_float() }}) as total_node_runtime, | ||
cast(null as {{ type_int() }}) as rows_affected, | ||
cast(null as {{ type_string() }}) as materialization, | ||
cast(null as {{ type_string() }}) as schema, | ||
cast(null as {{ type_string() }}) as name, | ||
cast(null as {{ type_string() }}) as alias, | ||
cast(null as {{ type_string() }}) as message, | ||
cast(null as {{ type_json() }}) as adapter_response | ||
cast(null as {{ type_string() }}) as command_invocation_id | ||
, cast(null as {{ type_string() }}) as node_id | ||
, cast(null as {{ type_timestamp() }}) as run_started_at | ||
, cast(null as {{ type_boolean() }}) as was_full_refresh | ||
, cast(null as {{ type_string() }}) as thread_id | ||
, cast(null as {{ type_string() }}) as status | ||
, cast(null as {{ type_timestamp() }}) as compile_started_at | ||
, cast(null as {{ type_timestamp() }}) as query_completed_at | ||
, cast(null as {{ type_float() }}) as total_node_runtime | ||
, cast(null as {{ type_int() }}) as rows_affected | ||
, cast(null as {{ type_string() }}) as materialization | ||
, cast(null as {{ type_string() }}) as schema | ||
, cast(null as {{ type_string() }}) as name | ||
, cast(null as {{ type_string() }}) as alias | ||
, cast(null as {{ type_string() }}) as message | ||
, cast(null as {{ type_json() }}) as adapter_responss | ||
from dummy_cte | ||
where 1 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
/* Bigquery won't let us `where` without `from` so we use this workaround */ | ||
with dummy_cte as ( | ||
select 1 as foo | ||
) | ||
with | ||
dummy_cte as ( | ||
|
||
select 1 as foo | ||
|
||
) | ||
|
||
select | ||
cast(null as {{ type_string() }}) as command_invocation_id, | ||
cast(null as {{ type_string() }}) as node_id, | ||
cast(null as {{ type_timestamp() }}) as run_started_at, | ||
cast(null as {{ type_string() }}) as database, | ||
cast(null as {{ type_string() }}) as schema, | ||
cast(null as {{ type_string() }}) as name, | ||
cast(null as {{ type_string() }}) as package_name, | ||
cast(null as {{ type_string() }}) as path, | ||
cast(null as {{ type_string() }}) as checksum, | ||
cast(null as {{ type_json() }}) as meta, | ||
cast(null as {{ type_string() }}) as alias, | ||
cast(null as {{ type_json() }}) as all_results | ||
cast(null as {{ type_string() }}) as command_invocation_id | ||
, cast(null as {{ type_string() }}) as node_id | ||
, cast(null as {{ type_timestamp() }}) as run_started_at | ||
, cast(null as {{ type_string() }}) as database | ||
, cast(null as {{ type_string() }}) as schema | ||
, cast(null as {{ type_string() }}) as name | ||
, cast(null as {{ type_string() }}) as package_name | ||
, cast(null as {{ type_string() }}) as path | ||
, cast(null as {{ type_string() }}) as checksum | ||
, cast(null as {{ type_json() }}) as meta | ||
, cast(null as {{ type_string() }}) as alias | ||
, cast(null as {{ type_json() }}) as all_results | ||
from dummy_cte | ||
where 1 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
/* Bigquery won't let us `where` without `from` so we use this workaround */ | ||
with dummy_cte as ( | ||
select 1 as foo | ||
) | ||
with | ||
dummy_cte as ( | ||
|
||
select 1 as foo | ||
|
||
) | ||
|
||
select | ||
cast(null as {{ type_string() }}) as command_invocation_id, | ||
cast(null as {{ type_string() }}) as node_id, | ||
cast(null as {{ type_timestamp() }}) as run_started_at, | ||
cast(null as {{ type_boolean() }}) as was_full_refresh, | ||
cast(null as {{ type_string() }}) as thread_id, | ||
cast(null as {{ type_string() }}) as status, | ||
cast(null as {{ type_timestamp() }}) as compile_started_at, | ||
cast(null as {{ type_timestamp() }}) as query_completed_at, | ||
cast(null as {{ type_float() }}) as total_node_runtime, | ||
cast(null as {{ type_int() }}) as rows_affected, | ||
cast(null as {{ type_string() }}) as materialization, | ||
cast(null as {{ type_string() }}) as schema, | ||
cast(null as {{ type_string() }}) as name, | ||
cast(null as {{ type_string() }}) as alias, | ||
cast(null as {{ type_string() }}) as message, | ||
cast(null as {{ type_json() }}) as adapter_response | ||
cast(null as {{ type_string() }}) as command_invocation_id | ||
, cast(null as {{ type_string() }}) as node_id | ||
, cast(null as {{ type_timestamp() }}) as run_started_at | ||
, cast(null as {{ type_boolean() }}) as was_full_refresh | ||
, cast(null as {{ type_string() }}) as thread_id | ||
, cast(null as {{ type_string() }}) as status | ||
, cast(null as {{ type_timestamp() }}) as compile_started_at | ||
, cast(null as {{ type_timestamp() }}) as query_completed_at | ||
, cast(null as {{ type_float() }}) as total_node_runtime | ||
, cast(null as {{ type_int() }}) as rows_affected | ||
, cast(null as {{ type_string() }}) as materialization | ||
, cast(null as {{ type_string() }}) as schema | ||
, cast(null as {{ type_string() }}) as name | ||
, cast(null as {{ type_string() }}) as alias | ||
, cast(null as {{ type_string() }}) as message | ||
, cast(null as {{ type_json() }}) as adapter_response | ||
from dummy_cte | ||
where 1 = 0 |
Oops, something went wrong.