Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
- Added support for getting info only on specified relations to improve performance of gathering metadata ([486](https://github.com/databricks/dbt-databricks/pull/486))
- Added support for getting freshness from metadata ([481](https://github.com/databricks/dbt-databricks/pull/481))

### Fixes

- Node info now gets added to SQLQuery event ([494](https://github.com/databricks/dbt-databricks/pull/494))

### Under the Hood

- Added required adapter tests to ensure compatibility with 1.7.0 ([487](https://github.com/databricks/dbt-databricks/pull/487))
Expand Down
16 changes: 14 additions & 2 deletions dbt/adapters/databricks/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,13 @@ def add_query(
if abridge_sql_log:
log_sql = "{}...".format(log_sql[:512])

fire_event(SQLQuery(conn_name=cast_to_str(connection.name), sql=log_sql))
fire_event(
SQLQuery(
conn_name=cast_to_str(connection.name),
sql=log_sql,
node_info=get_node_info(),
)
)
pre = time.time()

cursor = cast(DatabricksSQLConnectionWrapper, connection.handle).cursor()
Expand Down Expand Up @@ -815,7 +821,13 @@ def _execute_cursor(
with self.exception_handler(log_sql):
cursor: Optional[DatabricksSQLCursorWrapper] = None
try:
fire_event(SQLQuery(conn_name=cast_to_str(connection.name), sql=log_sql))
fire_event(
SQLQuery(
conn_name=cast_to_str(connection.name),
sql=log_sql,
node_info=get_node_info(),
)
)
pre = time.time()

handle: DatabricksSQLConnectionWrapper = connection.handle
Expand Down