Skip to content

Commit

Permalink
Remove unused rows_affected column in test_executions #195
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma Down committed Sep 13, 2023
1 parent 7a8ae8b commit 9182fdc
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 14 deletions.
1 change: 0 additions & 1 deletion macros/get_column_name_lists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@
compile_started_at,
query_completed_at,
total_node_runtime,
rows_affected,
failures,
message,
adapter_response
Expand Down
5 changes: 1 addition & 4 deletions macros/upload_test_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
{{ adapter.dispatch('column_identifier', 'dbt_artifacts')(9) }},
{{ adapter.dispatch('column_identifier', 'dbt_artifacts')(10) }},
{{ adapter.dispatch('column_identifier', 'dbt_artifacts')(11) }},
{{ adapter.dispatch('column_identifier', 'dbt_artifacts')(12) }},
{{ adapter.dispatch('parse_json', 'dbt_artifacts')(adapter.dispatch('column_identifier', 'dbt_artifacts')(13)) }}
{{ adapter.dispatch('parse_json', 'dbt_artifacts')(adapter.dispatch('column_identifier', 'dbt_artifacts')(12)) }}
from values
{% for test in tests -%}
(
Expand Down Expand Up @@ -63,7 +62,6 @@
{% endif %}

{{ test.execution_time }}, {# total_node_runtime #}
null, {# rows_affected not available in Databricks #}
{{ 'null' if test.failures is none else test.failures }}, {# failures #}
'{{ test.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(test.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
Expand Down Expand Up @@ -117,7 +115,6 @@
{% endif %}

{{ test.execution_time }}, {# total_node_runtime #}
null, {# rows_affected not available in Databricks #}
{{ 'null' if test.failures is none else test.failures }}, {# failures #}
'{{ test.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') | replace("\n", "\\n") }}', {# message #}
{{ adapter.dispatch('parse_json', 'dbt_artifacts')(tojson(test.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"')) }} {# adapter_response #}
Expand Down
1 change: 0 additions & 1 deletion models/fct_dbt__test_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ test_executions as (
compile_started_at,
query_completed_at,
total_node_runtime,
rows_affected,
failures,
message
from base
Expand Down
2 changes: 0 additions & 2 deletions models/fct_dbt__test_executions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ models:
description: '{{ doc("node_id") }}'
- name: query_completed_at
description: '{{ doc("query_completed_at") }}'
- name: rows_affected
description: '{{ doc("rows_affected") }}'
- name: status
description: '{{ doc("status") }}'
- name: test_execution_id
Expand Down
1 change: 0 additions & 1 deletion models/sources/test_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ select
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_int() }}) as failures,
cast(null as {{ type_string() }}) as message,
cast(null as {{ type_json() }}) as adapter_response
Expand Down
2 changes: 0 additions & 2 deletions models/sources/test_executions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ models:
description: '{{ doc("query_completed_at") }}'
- name: total_node_runtime
description: '{{ doc("total_node_runtime") }}'
- name: rows_affected
description: '{{ doc("rows_affected") }}'
- name: failures
description: '{{ doc("failures") }}'
- name: message
Expand Down
1 change: 0 additions & 1 deletion models/staging/stg_dbt__test_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ enhanced as (
compile_started_at,
query_completed_at,
total_node_runtime,
rows_affected,
failures,
message
from base
Expand Down
2 changes: 0 additions & 2 deletions models/staging/stg_dbt__test_executions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ models:
description: '{{ doc("node_id") }}'
- name: query_completed_at
description: '{{ doc("query_completed_at") }}'
- name: rows_affected
description: '{{ doc("rows_affected") }}'
- name: run_started_at
description: '{{ doc("run_started_at") }}'
- name: status
Expand Down

0 comments on commit 9182fdc

Please sign in to comment.