dbt-database-adapter-scaffold icon indicating copy to clipboard operation
dbt-database-adapter-scaffold copied to clipboard

include boilerplate for logging adapter version to database

Open dataders opened this issue 3 years ago • 0 comments

There's a common pattern in adapters wherein the version is sent to a user_agent_string or application_name field when opening a connection that enables the underlying database's product team to have telemetry on the volume of dbt invocations that they're getting. This is normally found in the AdapterConnectionManager.open() method (e.g. DatabricksConnectionManager.open() )

If possible, it would be great to provide at least a template for adapter developers know that it's a good idea to do. Perhaps it can be mentioned in our how to guides in conjunction with unique_field(), which is used for dbt Labs's telemetry

https://github.com/dbt-labs/dbt-database-adapter-scaffold/blob/614506914bc5add23baa8b7a36aa906976804475/%7B%7Bcookiecutter.project_name%7D%7D/dbt/adapters/%7B%7Bcookiecutter.directory_name%7D%7D/connections.py#L89-L95

dataders avatar Jun 28 '22 01:06 dataders