microsoft/dbt-synapse

auto-dispatch to dbt-sqlserver?

dataders opened this issue · 3 comments

v0.20.0 removes the need for this repeated dispatching... right @jtcohen6? I could be overgeneralizing the macro dispatch changes to also include adapter-level dispatch changes. My understanding is that we wouldn't need the below anymore.

https://github.com/dbt-msft/dbt-synapse/blob/2004b7da6560fbe381b020680988f91c137b6029/dbt/include/synapse/macros/adapters.sql#L1-L3

Correct! Among other changes to dispatch, we're now including parent adapters in the search order. So dbt will look for:

  1. synapse__information_schema_name
  2. sqlserver__information_schema_name
  3. default__information_schema_name

Where previously it only looked for:

  1. synapse__information_schema_name
  2. default__information_schema_name

@jtcohen6 is there anything needed in this repo to specify that dbt-synapse inheirits from dbt-sqlsever? Or, will dbt-core do this automatically based on the Python class inheritance?

Or, will dbt-core do this automatically based on the Python class inheritance?

This! Here's where the magic happens:

https://github.com/dbt-msft/dbt-synapse/blob/2004b7da6560fbe381b020680988f91c137b6029/dbt/adapters/synapse/__init__.py#L9-L14