Open aurany opened 3 years ago
@aurany Appreciate the detailed writeup! What's the change you made in your fork to get this working? I imagine it's a tweak to _relation_from_name
here:
@jtcohen6 By overriding quote_policy before returning the values, like
My adapter (DB2) has the default False-True-True quoting setting which is configured in the adapter implementation. I am not using any other setting for quotings in the spec-file. When running the tests the quoting gets overwritten by the function _relation_from_name. So when I run with False-True-True it becomes False-True-False and the tests fails (because DB2 tries to use tables that doesn't exist).
It looks like the tables are created correctly with all lowercase names, but when some tests take place they fail. I am pretty sure the error occur in test 2 ("base") step 6 ("relation_rows") when running "select count(*) from {relation}" (see below) because the relation identifier is rendered without quoting (=> uppercase in DB2).
https://github.com/fishtown-analytics/dbt-adapter-tests/blob/a411336e9493a38c228a876e19af24d70ec53d86/pytest_dbt_adapter/spec_file.py#L453-L465
When running the tests with a forked version of this repo (_relation_from_name is only returning the default quoting) all tests pass :) My suggestion is to use the adapter default setting only. Good idea?