Comments (2)
Hi @leinemann thanks for posting this question. Hopefully I can help address all of these questions.
referring to this warning: https://github.com/fivetran/dbt_fivetran_utils#%EF%B8%8F-warning-%EF%B8%8F - am I understanding correctly that master is deprecated but new versions are still released? I can see recent release of 0.4.7 - what branch is used for latest development (as it doesn't seem to be the default branch 'master')?
- Yes that is correct, we have deprecated the
master
branch and are currently usingreleases/v0.4.latest
as the base for allv0.4.x
releases. We are hoping to adjust the default branch soon; however, some users are still using older version of our packages which rely on the default branch beingmaster
. Therefore, we cannot update the default branch until those users have migrated and is the result of thereleases/v0.4.latest
not being the default currently. We hope to update this soon.
specifically - how is this macro going to apply the cast into the given/desired datatype:
dbt_fivetran_utils/macros/fill_staging_columns.sql
{{ fivetran_utils.quote_column(column) }} as
from my understanding it's missing the cast.
- This macro does not intend to cast fields when filling them into the staging model. The casting only should occur if the staging column is not found in the source columns. You can see that casting occur here. We are setting the nonexistent field to
null
and then casting it to the appropriate datatype. If the field does exist, we do not intend to cast it. That type of intentional casting will take place in the staging model itself.
what is a replacement for the 'generate_columns_macro' macro and why is it discontinued. I.e. the latest version 4.7 doesn't seem to have: https://github.com/fivetran/dbt_fivetran_utils#generate_columns_macro-source but the documentation of fill_staging_columns still references it: https://github.com/fivetran/dbt_fivetran_utils/tree/v0.4.7#fill_staging_columns-source
- Thanks for calling out the discrepancy in the documentation. the generate_columns_macro does still exist, but we have moved it to a new repo. You can see the automation macros for our package development within the dbt_package_automations repo. We moved these automation macros here as we had a few occurrences where these macros caused compilation errors for some users when installing the fivetran utils package. Therefore, we decided to move them to a separate repo to ensure this couldn't occur, but our team could still leverage them in model development.
what is the current best practice to handle typing of staging columns?
- When developing new staging models, my team uses the staging_models_automation macro and bash commands to generate the specified macros and staging models. We then go into the models and clean up or specifically cast and rename fields in the staging models as necessary.
- As a note, this works for our team when needing to create staging models at scale. This may not be the best method for all use cases.
from dbt_fivetran_utils.
thank you so much for these extensive explanations @fivetran-joemarkiewicz , it all makes sense!
from dbt_fivetran_utils.
Related Issues (20)
- Update Union Data to properly work with identifiers when not unioning HOT 1
- Create a seed data helper for identifier variables HOT 1
- [FEATURE] - make drop_schemas_automation more flexible HOT 1
- [FEATURE] - explore/keep eyes on BQ new JSON functions HOT 1
- [FEATURE] - update_persist_pass_through_columns to include field aliasing
- Union data macro not working as expected in integration tests HOT 1
- Break out Pipeline.yml into separate components for easier maintenance HOT 1
- Optimize Integration Tests to Only Run on Relevant Changes HOT 1
- Update try_cast default dispatch to be consistent with macro name
- Maybe? Move dbt-date and dbt-expectations dependencies here HOT 2
- [FEATURE] - Support for BigQuery JSON and Redshift SUPER datatypes
- [BUG] `collect_freshness` macro override throws warning in `dbt source snapshot-freshness` command HOT 10
- Bump up integration_tests/packages.yml versioning to ensure full package coverage HOT 1
- FEATURE - Update integration tests to support dbt version >= 1.7.0 HOT 1
- [FEATURE] - Audit and mark macros for deprecation
- [FEATURE] - Apply more rigorous testing to macros
- [Deprecate] dummy_coalesce_value
- [FEATURE] - Deprecate collect_freshness macro in v0.5.0 release
- Providing reserved keyword support for `fivetran_utils.add_passthrough_columns()`
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_fivetran_utils.