Skip to content

Commit

Permalink
misc(ui): improve data hierarchy query performance
Browse files Browse the repository at this point in the history
  • Loading branch information
aarthy-dk committed Nov 7, 2024
1 parent 5ce267f commit 9fa43f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testgen/ui/views/data_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ def get_selected_item(selected: str, table_group_id: str) -> dict | None:
WITH latest_profile_dates AS (
SELECT column_name,
table_name,
profiling_runs.table_groups_id,
profile_results.table_groups_id,
MAX(profiling_starttime) AS profiling_starttime
FROM {schema}.profile_results
LEFT JOIN {schema}.profiling_runs ON (
profile_results.profile_run_id = profiling_runs.id
)
GROUP BY profiling_runs.table_groups_id, table_name, column_name
GROUP BY profile_results.table_groups_id, table_name, column_name
),
latest_test_run_dates AS (
SELECT column_names,
Expand Down Expand Up @@ -366,7 +366,7 @@ def get_selected_item(selected: str, table_group_id: str) -> dict | None:
AND column_chars.column_name = profile_results.column_name
)
WHERE column_id = '{item_id}'
AND column_chars.table_groups_id = '{table_group_id}';;
AND column_chars.table_groups_id = '{table_group_id}';
"""

item_df = db.retrieve_data(sql)
Expand Down

0 comments on commit 9fa43f1

Please sign in to comment.