diff --git a/dbt/contracts/graph/parsed.py b/dbt/contracts/graph/parsed.py index 2c6af294312..aca9a43e5c9 100644 --- a/dbt/contracts/graph/parsed.py +++ b/dbt/contracts/graph/parsed.py @@ -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({ diff --git a/test/integration/001_simple_copy_test/models/compound_sort.sql b/test/integration/001_simple_copy_test/models/compound_sort.sql new file mode 100644 index 00000000000..236de4a08b9 --- /dev/null +++ b/test/integration/001_simple_copy_test/models/compound_sort.sql @@ -0,0 +1,9 @@ +{{ + config( + materialized = "table", + sort = 'first_name', + sort_type = 'compound' + ) +}} + +select * from "{{ target.schema }}"."seed" diff --git a/test/integration/001_simple_copy_test/models/interleaved_sort.sql b/test/integration/001_simple_copy_test/models/interleaved_sort.sql new file mode 100644 index 00000000000..ff4eba3c19b --- /dev/null +++ b/test/integration/001_simple_copy_test/models/interleaved_sort.sql @@ -0,0 +1,9 @@ +{{ + config( + materialized = "table", + sort = ['first_name', 'last_name'], + sort_type = 'interleaved' + ) +}} + +select * from "{{ target.schema }}"."seed"