Getting Console logs through API or something similar? instead of manually downloading the logs

The problem I’m having

Is there a way to get the console log from a job using API or something similar? Instead of downloading the logs manually.

The context of why I’m trying to do this

I’m using Snowflake. I’m trying to get the runtime of each of my model, where I can store the runtimes in a table in Snowflake and from there I can see the averages and see if there are instances where a job has taken longer than usual. I’ve looked at the ‘run_results.json’ file but I don’t think the times I see there are the runtime for the creation of the models in my database (correct me if I’m wrong), but it’s for how long a node was executed.

What I’ve already tried

I’ve looked at the run_results.json file.

Edit: could Cloud Discovery API be what I’m looking for?

Hopefully everything above makes sense.

Hey @MickeyLulz!

The short answer:

Yes! Read more about it at Introducing the Discovery API and About the Discovery API | dbt Developer Hub.

Otherwise, you could also check out the dbt_artifacts package which persists run_results.json to your warehouse.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.