Skip to content

Commit

Permalink
support sort_type (interleaved|compound) for models (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbanin authored May 22, 2017
1 parent 5f04aae commit 66636ba
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbt/contracts/graph/parsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
# adapter optional fields
Optional('sort'): Any(basestring, list),
Optional('dist'): basestring,

Optional('sort_type'): Any('compound', 'interleaved'),
}

parsed_node_contract = unparsed_node_contract.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{
config(
materialized = "table",
sort = 'first_name',
sort_type = 'compound'
)
}}

select * from "{{ target.schema }}"."seed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{
config(
materialized = "table",
sort = ['first_name', 'last_name'],
sort_type = 'interleaved'
)
}}

select * from "{{ target.schema }}"."seed"

0 comments on commit 66636ba

Please sign in to comment.