brooklyn-data / dbt_artifacts

A dbt package for modelling dbt metadata. https://brooklyn-data.github.io/dbt_artifacts
Apache License 2.0
331 stars 126 forks source link

[Bug]: query_completed_at timestamp comes up as null #335

Closed jvpmc closed 1 year ago

jvpmc commented 1 year ago

Overview

Hello! This may be a clarifying question instead of a bug, but I am trying to understand why the query_completed_at timestamp would be null for test executions.

How to reproduce

select *
from stg_dbt__test_executions
where query_completed_at is null
order by run_started_at desc

Expected behaviour

query_completed_at timestamp is not null in all cases

Screenshots

Environment

Results of running dbt --version:

Core:
  - installed: 1.4.5
  - latest:    1.5.0 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - snowflake: 1.4.2 - Update available!

  At least one plugin is out of date or incompatible with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Please paste the contents of your packages.yml file here:

packages:
  - package: dbt-labs/codegen
    version: 0.9.0 # renovate: depName=dbt-labs/dbt-codegen
  - package: fivetran/fivetran_log
    version: 0.7.2 # renovate: depName=fivetran/dbt_fivetran_log
  - package: fivetran/netsuite
    version: 0.7.1 # renovate: depName=fivetran/dbt_netsuite
  - package: fivetran/asana
    version: 0.7.0 # renovate: depName=fivetran/dbt_asana
  - package: fivetran/greenhouse
    version: 0.5.0 # renovate: depName=fivetran/dbt_greenhouse
  - package: calogica/dbt_expectations
    version: 0.8.3 # renovate: depName=calogica/dbt-expectations
  - package: brooklyn-data/dbt_artifacts
    version: 2.2.2 # renovate: depName=brooklyn-data/dbt_artifacts
  - package: dbt-labs/dbt_project_evaluator
    version: 0.3.0
  - package: dbt-labs/metrics 
    version: 1.4.1 
  ...
jared-rimmer commented 1 year ago

Thanks for opening the issue @jvpmc. I'm going to try and look into this over the next few days!

jared-rimmer commented 1 year ago

The logic that sets that column can be found here. It will set the value to null in the else statement or if the loop.length is 0 (Line 55)

glsdown commented 1 year ago

Hi @jvpmc it looks like this has been resolved now, so I'm going to close this issue. Please feel free to re-open it if you feel like it was closed in error and you have follow up questions.