Comments (6)
We are seeing the same issue and just arrived at this root cause today. We were thinking along the same lines of adjusting the incremental condition. Has that worked for y'all?
from dbt_artifacts.
@davidshapir I haven't had a chance to test this but am hoping to later this week - will let you know!
from dbt_artifacts.
@timothyjang123 - Sounds good! Can you share whatever macro or other operation you use in var_row_count if it ends up working?
from dbt_artifacts.
@timothyjang123 - I'm curious if making the template dynamic with var_row_count
might suffer from the "parse time" vs "run time" issue explained in this dbt article. I was wondering if this could be done in SQL with something like:
where artifact_generated_at > (select max(artifact_generated_at, '1970-01-01 00:00:00 +0000') from {{ this }})
Note: this code is 100% untested, but I will try to look into this today. :)
context: I'm @davidshapir's coworker.
from dbt_artifacts.
Hmm I think I see what you're saying - I haven't seen that article before and I'd have to test out the differences between dbt compile/run to see how the issue would work with the change mentioned. From what I read, I think it might have unexpected behavior (strange logs) but during execution it could work as expected - partly because the dependent view is just a saved query so it wouldn't have that same ref() issue mentioned in the article.
where artifact_generated_at > (select ifnull(max(artifact_generated_at), '1970-01-01 00:00:00 +0000') from {{ this }})
Regardless, I think the above is more precise for what we're trying to do - thanks @tommyh! FYI, I modified the above a bit for my own use in Snowflake.
from dbt_artifacts.
@timothyjang123 - the edgecase to test with var_row_count
approach would be: when the fct_dbt__test_executions
does have rows in it, is the var_row_count
variable greater than 0? Because, if I'm reading that blog article correctly which I totally might not be, then var_row_count
will be 0 during "parse" time when the model gets compiled.
ifnull
- yes, that looks great!
from dbt_artifacts.
Related Issues (20)
- [Bug]: test "failures" has a misleading definition HOT 1
- [Bug]: The latest dbt_artifacts version is not compatible with dbt 1.7.0 HOT 1
- [Bug]: dbt-project.yml file of the dbt-artifacts 2.6.1 version excludes dbt versions 1.7.0 and above HOT 1
- [Bug]: ROWS_AFFECTED column in table FCT_DBT__MODEL_EXECUTIONS shows always 1 HOT 1
- [Bug]: Error creating sql incremental model dbt_artifacts.invocations
- [Feature]: Snapshots of "source" tables? HOT 1
- [Feature]: support for duckdb
- [Bug]: 'dict object' has no attribute 'raw_code' - incompatibility with other packages HOT 2
- [Bug]: Object of type date is not JSON serializable HOT 1
- [Bug]: Parsing Error in dbt Artifacts JSON Conversion of Source with Case-Sensitive Column Names in Filters for dbt freshness
- [Bug]: Syntax error while creating all staging models in dbt artifacts HOT 1
- Support dbt v1.8 HOT 2
- [Bug]: "compile_started_at" and "query_completed_at" times for test get extracted from wrong object resulting in nulls HOT 2
- [Bug]: Concurrency issue in Snowflake when running upload_results macro
- [Feature]: Include relation_name in test_executions for table reference after store-failures HOT 1
- [Bug]: Unable to write dbt_artifacts results to different dataset in Bigquery HOT 5
- Dbt Databricks
- [Feature]: Add Athena + Iceberg support HOT 1
- [Bug]: Object of type date is not JSON serializable (Databricks) HOT 1
- Add tox-based Integration Testing support for this package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt_artifacts.