Skip to content

Commit

Permalink
add rows affected
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-cook-87 committed Nov 27, 2023
1 parent 2e61c4b commit 28e2910
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions integration_test_project/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ dbt_artifacts:
region_name: ap-southeast-2
schema: public
database: awsdatacatalog
threads: 8
seed_s3_upload_args:
ACL: bucket-owner-full-control
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
{% if query_completed_at %}cast('{{ query_completed_at }}' as timestamp(6)){% else %}cast(null as timestamp(6)){% endif %}, {# query_completed_at #}

{{ model.execution_time }}, {# total_node_runtime #}
cast(null as integer), {# rows_affected #}
cast({{ model.adapter_response.rows_affected }} as integer), {# rows_affected #}
'{{ model.node.config.materialized }}', {# materialization #}
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
{% endif %}

{{ model.execution_time }}, {# total_node_runtime #}
cast(null as integer), -- rows_affected not available {# Databricks #}
cast({{ model.adapter_response.rows_affected }} as integer), {# rows_affected #}
'{{ model.node.config.materialized }}', {# materialization #}
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
{% endif %}

{{ model.execution_time }}, {# total_node_runtime #}
cast(null as integer), {# rows_affected #}
cast({{ model.adapter_response.rows_affected }} as integer), {# rows_affected #}
'{{ model.node.config.materialized }}', {# materialization #}
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
{% endif %}

{{ test.execution_time }}, {# total_node_runtime #}
cast(null as integer), {# rows_affected not available in Databricks #}
cast(null as integer), {# rows_affected #}
{{ 'cast(null as integer)' if test.failures is none else test.failures }}, {# failures #}
'{{ test.message | replace("\'", "\'\'") }}', {# message #}
'{{ tojson(test.adapter_response) | replace("\'", "\'\'") }}' {# adapter_response #}
Expand Down

0 comments on commit 28e2910

Please sign in to comment.