Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ptemarvelde authored Dec 13, 2023
1 parent 99de430 commit 2e74609
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dbt/adapters/clickhouse/httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def command(self, sql, **kwargs):

def columns_in_query(self, sql: str, **kwargs) -> List[ClickHouseColumn]:
try:
query_result = self._client.query(f'SELECT * FROM ({sql}) LIMIT 0', **kwargs)
query_result = self._client.query(
f"SELECT * FROM ({sql}) LIMIT 0", **kwargs
)
return [
ClickHouseColumn.create(name, ch_type.name)
for name, ch_type in zip(query_result.column_names, query_result.column_types)
Expand Down
4 changes: 3 additions & 1 deletion dbt/adapters/clickhouse/nativeclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def command(self, sql, **kwargs):

def columns_in_query(self, sql: str, **kwargs) -> List[ClickHouseColumn]:
try:
_, columns = self._client.execute(f'SELECT * FROM ({sql}) LIMIT 0', with_column_types=True)
_, columns = self._client.execute(
f"SELECT * FROM ({sql}) LIMIT 0", with_column_types=True
)
return [ClickHouseColumn.create(column[0], column[1]) for column in columns]
except clickhouse_driver.errors.Error as ex:
raise DbtDatabaseError(str(ex).strip()) from ex
Expand Down

0 comments on commit 2e74609

Please sign in to comment.