Comments (2)
solutioin: override the dbt-core's global_project/macros/materializations/seeds/helpers.sql
's default__create_csv_table
, synapse__create_csv_table
. this new version should fetch specified configuration (and use sensible defaults) similar to how synapse__create_table_as
works.
helpers.sql
default https://github.com/dbt-labs/dbt-core/blob/0721f2c1b70eca233326cdd7d3de755924415b20/core/dbt/include/global_project/macros/materializations/seeds/helpers.sql#L6
from dbt-synapse.
PR #138
You can now create seed tables with different distribution and index strategy by providing required confiuration in dbt_project.yml file. The default choice is REPLICATE disttribution and HEAP (no indexing). If you want to override this configuration, the following sample should help.
seeds:
jaffle_shop:
index: HEAP
dist: ROUND_ROBIN
raw_customers:
index: HEAP
dist: REPLICATE
raw_payments:
dist: HASH(payment_method)
index: CLUSTERED INDEX(id,order_id)
Create a new context "seeds:" at the root followed by project name and seed name. In this case the project name is jaffle_shop and seeds are raw_customers and raw_payments. Provide index and distribution values using index and dist keys. Use replicate, round_robin, hash({column name}) as a value. Example: dist: replicate. The raw_customers seed table will be replicated a table. For hash distribution, the user need to provide the vaule HASH(payment_method). Example: dist: hash(payment_method)
To specific index, index as a key and CLUSTERED INDEX({Column1, Column2}), HEAP, CLUSTERED COLUMNSTORE INDEX as a value. Example: index: HEAP. The raw_customers seed table will use heap index strategy. For clustered index, the user need to provide one or more columns to create clustered index on. Example: index: CLUSTERED INDEX(id,order_id). The default value of index and distribution can also be set for all seeds under project name.
from dbt-synapse.
Related Issues (20)
- upgrade to support dbt-core v1.2.0 HOT 1
- upgrade to support dbt-core v1.2.0
- upgrade to support dbt-core v1.2.0
- upgrade to support dbt-core v1.2.0
- Error when using incremental models on Synapse REPLICATE table distribution HOT 4
- Incorrect syntax near 'column' error adding a New Column with on_schema_change='sync_all_columns' HOT 1
- Incorrect syntax near 'column' error renaming a Column with on_schema_change='sync_all_columns' HOT 1
- upgrade to support dbt-core v1.3.0 HOT 1
- sam, are you there?
- sam, are you there?
- Changing the distribution and index types in existing snapshots don't have any effect HOT 1
- upgrade to support dbt-core v1.4.0 HOT 2
- Stand up new CI-testing pool HOT 1
- upgrade to support dbt-core v1.5.0
- This repo is missing important files
- upgrade to support dbt-core v1.6.0
- Incremental table creation has unneccessary indexes, write temp table as a HEAP HOT 1
- Satellite problem when using case sensitive collations HOT 1
- How to load parquet files from Azure Data Lake Gen2 to dedicated pool using dbt? HOT 1
- create_nonclustered_index macro ends up in endless recursion HOT 1
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-synapse.