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

fix: skip empty query cells when run datadoc #1217

Merged
merged 1 commit into from
Apr 7, 2023
Merged
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
7 changes: 6 additions & 1 deletion querybook/server/tasks/run_datadoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@ def run_datadoc_with_config(
# Prepping chain jobs each unit is a [make_qe_task, run_query_task] combo
for index, query_cell in enumerate(query_cells):
engine_id = query_cell.meta["engine"]
raw_query = query_cell.context

# Skip empty cells
if not raw_query or raw_query.isspace():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is context nullable? why not if len(raw_query.strip()) == 0

continue

try:
query = render_templated_query(
query_cell.context,
raw_query,
data_doc.meta_variables,
engine_id,
session=session,
Expand Down