Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query_runner -> query_results: improve logging, handle unhandled data types #6905

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
vtatarin committed Apr 18, 2024
commit 1f4853eb1ce2c86464553df4bf4f03621b1d9c94
10 changes: 6 additions & 4 deletions redash/query_runner/query_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ def create_table(connection, table_name, query_results):
try:
connection.execute(insert_template, values)
except sqlite3.InterfaceError as exc:
raise UnsupportedTypeError("Error inserting data: %s. Template: %s. Value data types: %s",
str(exc),
insert_template,
",".join(str(type(value)) for value in values))
raise UnsupportedTypeError(
"Error inserting data: %s. Template: %s. Value data types: %s",
str(exc),
insert_template,
",".join(str(type(value)) for value in values),
)


def prepare_parameterized_query(query, query_params):
Expand Down