Giter VIP home page Giter VIP logo

Comments (8)

NiallRees avatar NiallRees commented on June 17, 2024

Hey Alex, you're right that this is confusing. Currently, joins attempt to match on either invocation_id or dbt_cloud_run_id, see here. A couple of ideas to overcome this while still being able to use the upload_dbt_artifacts run-operation:

  1. Use an environment variable which can be used to match the manifest.json to the run_results.json. You'd have to come up with a way to make sure the value was changed whenever you modified the project, and add the environment variable as an additional join key in the models. A PR would be very welcome for this, perhaps the env var could be called DBT_ENV_CUSTOM_ENV_DBT_ARTIFACTS_JOIN_KEY.
  2. (Change to dbt-core required) A new metadata key in run_results.json and manifest.json is added as a hash of the entire project. This is definitely the best solution as it wouldn't require any manually configured environment variables.

from dbt_artifacts.

jmak123 avatar jmak123 commented on June 17, 2024

Another effect of this issue is that in dbt Cloud where one job has multiple dbt runs that need to have artifacts recorded, we can't reliably identify the pairs of eg. manifest + run_results.

from dbt_artifacts.

NiallRees avatar NiallRees commented on June 17, 2024

Another effect of this issue is that in dbt Cloud where one job has multiple dbt runs that need to have artifacts recorded, we can't reliably identify the pairs of eg. manifest + run_results.

In this instance, you could actually join any of the manifest.jsons which match on the dbt_cloud_run_id, as the manifest.json generated by each dbt run command within the same dbt Cloud run will be identical. It would require a couple modifications to the package to deduplicate manifests on the dbt_cloud_run_id.

from dbt_artifacts.

alanmcruickshank avatar alanmcruickshank commented on June 17, 2024

@NiallRees - I think that #81 solves this. If you agree can you close this issue?

from dbt_artifacts.

NiallRees avatar NiallRees commented on June 17, 2024

@NiallRees - I think that #81 solves this. If you agree can you close this issue?

I'm not sure that it does, but the specific issue of the invocation ID changing can't be resolved by dbt_artifacts. I've outlined a couple of ways forward in #53 (comment), would be happy to see a follow-up issue or PR for those.

from dbt_artifacts.

NiallRees avatar NiallRees commented on June 17, 2024

@DVAlexHiggs See the linked pull request above for a proper solve!

from dbt_artifacts.

DVAlexHiggs avatar DVAlexHiggs commented on June 17, 2024

Hi! Thanks so much. I'm gonna try this out. Any idea when it will hit release?

from dbt_artifacts.

NiallRees avatar NiallRees commented on June 17, 2024

Using --no-write-json should solve the problem you were encountering today. The work going on currently should be released in the next week.

from dbt_artifacts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.