You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The feature adds the ability to automatically generate SQL column comments in Databricks Delta Live Tables (DLT). Specifically, it updates the CREATE STREAMING TABLE SQL generation to include column comments using the COMMENT clause, which can be pulled from the dbt column description metadata.
This allows users to define meaningful metadata for their columns directly in dbt models and have those automatically applied as SQL column comments when creating streaming tables in Databricks.
Describe alternatives you've considered
Manual Column Commenting: One alternative is manually adding comments in SQL when defining the table schema. This approach, however, can be prone to inconsistencies and might result in duplicate efforts if the comments are already defined in dbt models.
The code leverages dbt metadata (node.columns) to automatically generate column comments during table creation. This ensures consistency and reduces manual overhead for managing schema documentation.
Who will this benefit?
This feature will benefit:
Data engineers who use Databricks and dbt for building streaming tables, allowing them to include meaningful column descriptions directly from dbt models.
Teams working with large data sets where maintaining schema documentation is critical. This ensures schema changes and documentation are kept in sync automatically.
Example Use Case: A team might have a dbt model that defines columns with descriptions. When they deploy this model to a Databricks Delta Live Table, the column comments would automatically be included, helping others understand the purpose and meaning of each column.
Additionally, we can also pull column constraints.
Are you interested in contributing this feature?
Yes, I'm interested in contributing to this feature. Please let me know if additional steps are required to prepare it for contribution or if any changes are needed. I am happy to discuss the implementation further.
The text was updated successfully, but these errors were encountered:
This was initially not implemented due to issues I was having with materialized views and column comments; maybe this is no longer the case, and either way, I think it should work fine with STs. If you are interested in adding this, we would need to follow the pattern we use for other components of MV/ST so that we can detect when the dbt project changes relative to what is stored in Databricks.
Describe the feature
The feature adds the ability to automatically generate SQL column comments in Databricks Delta Live Tables (DLT). Specifically, it updates the
CREATE STREAMING TABLE
SQL generation to include column comments using theCOMMENT
clause, which can be pulled from the dbt column description metadata.This allows users to define meaningful metadata for their columns directly in dbt models and have those automatically applied as SQL column comments when creating streaming tables in Databricks.
Describe alternatives you've considered
Additional context
Here's an example of the newly implemented code:
The code leverages dbt metadata (
node.columns
) to automatically generate column comments during table creation. This ensures consistency and reduces manual overhead for managing schema documentation.Who will this benefit?
This feature will benefit:
Example Use Case: A team might have a dbt model that defines columns with descriptions. When they deploy this model to a Databricks Delta Live Table, the column comments would automatically be included, helping others understand the purpose and meaning of each column.
Additionally, we can also pull column constraints.
Are you interested in contributing this feature?
Yes, I'm interested in contributing to this feature. Please let me know if additional steps are required to prepare it for contribution or if any changes are needed. I am happy to discuss the implementation further.
The text was updated successfully, but these errors were encountered: