Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

communicte what macros are not supported by tsql-utils #19

Open
dataders opened this issue Jan 8, 2021 · 3 comments
Open

communicte what macros are not supported by tsql-utils #19

dataders opened this issue Jan 8, 2021 · 3 comments

Comments

@dataders
Copy link
Contributor

dataders commented Jan 8, 2021

currently the only place where you can see what models are not supported is by looking at integration_tests/dbt_utils/dbt_project.yml (see below) which is not intuitive, but while the YAML is precise the models and tests in the integration tests don't necessarily correspond 1-1 with individual macros.

Maybe something in the README.md? Or perhaps just one issue per macro? However, dbt_utils.group_by() I know we'll never support. worth mentioning?

currently unsupported

after #17 the current macros we still could port are:
test_split_part() (not working on Synapse?)
test_date_spine()
insert_by_period materialization
generate_series()
get_column_values()
get_relations_by_pattern()
get_relations_by_prefix_and_union()
get_url_host()
get_url_parameter()
get_url_path()

models:
dbt_utils_integration_tests:
+enabled: true
cross_db_utils:
test_dateadd: &disabled
+enabled: false
test_datediff: *disabled
test_hash: *disabled
test_last_day: *disabled
test_split_part:
+enabled: "{{ target.name != 'synapse' }}"
datetime:
test_date_spine: *disabled
materializations: *disabled
schema_tests:
data_test_mutually_exclusive_ranges_no_gaps: *disabled
data_test_mutually_exclusive_ranges_with_gaps: *disabled
data_test_not_constant: *disabled
data_test_relationships_where_table_2: *disabled
data_test_unique_where: *disabled
data_test_not_null_where: *disabled
# the following work but only when
# the dbt-utils submodule macros are overwritten
data_test_at_least_one: *disabled
data_people: *disabled
data_test_expression_is_true: *disabled
data_test_not_constant: *disabled
sql:
test_generate_series: *disabled
test_get_column_values: *disabled
test_get_relations_by_pattern: *disabled
test_get_relations_by_prefix_and_union: *disabled
test_groupby: *disabled
get_query_results_as_dict: *disabled
test_surrogate_key: *disabled
test_union: *disabled
web:
test_url_host: *disabled
test_url_path: *disabled
test_urls: *disabled

@alittlesliceoftom
Copy link
Contributor

Above is (I think) the list of macros which are integration tested on dbt_utils, but don't yet work here.

There are also interesting legacy macros that are a bit behind on dbt_utils too, and not fully tested, but represent useful and interesting concepts. For instance - https://github.com/fishtown-analytics/dbt-utils/blob/master/macros/materializations/insert_by_period_materialization.sql the insert by period materialisation here is a useful idea - especially for SQL Server, but doesn't work on a first test in my local and looks like it could generally do with a spruce.

@dataders
Copy link
Contributor Author

perhaps for all the unsupported macros, we could implement sqlserver__* versions as wrappers for UnsupportedExceptions. @jtcohen6 I remember seeing an example of this somewhere but can't remember now...

@jtcohen6
Copy link
Collaborator

Many of the required adapter macros raise an exception in the default implementation, e.g. list_relations_without_caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants