Comments (3)
Can we get this merged? - #51
It appears to be very useful, especially for automated pipelines. I could use it to add new sources as part of a loading pipeline. Hopefully dbt is happy with multiple files describing the source, either that or we would need to merge them somehow.
from dbt-codegen.
Hi, any chance if this making it to a release?
from dbt-codegen.
Thank you @rahulj51 for implementing this feature 👏 #51 is merged and will be included in the next release.
@pixie79 thank you for affirming the value for your use-case and bringing up the topic of merging YAML files.
There's two main options for describing the source:
- Multiple files
- A single file
I think 1) is a legit option since dbt allows multiple YAML files with source info as long as the model names aren't duplicated.
However, 2) is probably the most common case, and @pixie79 correctly pointed out that they need to be merged somehow.
The merging solution I'm most attracted to is a some kind of Python script that can "full outer join" two YAML files together (and/or other types of join behavior). The thing that gives me pause:
- The two YAML libraries I've used before (ruamel.yaml and PyYAML) each left something to be desired and would possibly cause such a script to exhibit buggy behavior for the first N iterations (where N is an uncomfortably large number).
Until the magical day that such a script exists, the only remaining option is to do the merge by hand.
from dbt-codegen.
Related Issues (20)
- Allow default codegen macros to be overridden
- Include secure views in generate_source macro (via get_relations_by_pattern macro) HOT 2
- Generate source does not work on External schema in Redshift HOT 2
- dbt_project.yml version is not matching with the latest release version HOT 1
- `generate_model_yaml` with `upstream_descriptions: true` should also read descriptions from upstream `sources`.
- (Postgres) Macro generate_model_yaml does not work with Materialized Views HOT 6
- How to generate data types that include size, precision, scale, etc. HOT 2
- Sorted column support in generate_source HOT 4
- Generate basic tests in model yaml HOT 2
- Fill in model/column descriptions when available in database metadata HOT 2
- Support for preserving case in `generate_source` HOT 1
- create_base_models should accept leading_commas and case_sensitive_cols arguments
- `generate_base_model()` doesn't work across databases on Redshift
- Create a release for new features HOT 1
- get_models seems broken in 1.8 HOT 2
- Generate Source, but for external files
- generate_model_yaml: Argument for Quoted Identifiers
- On hub.getdbt.com you've got an error in arguments of generate_model_yaml (model_names not model_name) HOT 1
- Generate schema yaml macro does not retrieve upstream descriptions of versioned models
- Add generate_macro_yaml macro
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-codegen.