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

feat: serialize query_context as json for redability #828

Merged
merged 3 commits into from
May 27, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: serialize query performance asset
Ian2012 committed May 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 557d2eb6f50d6d4e84c9753a9cff30d59525cf67
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ params:
operator: TEMPORAL_RANGE
subject: event_time
all_columns: []
annotation_layers: []
color_pn: true
extra_form_data: {}
groupby:
@@ -34,9 +35,81 @@ params:
event_time: true
time_grain_sqla: P1D
viz_type: table
query_context: '{"datasource":{"id":266,"type":"table"},"force":false,"queries":[{"filters":[{"col":"event_time","op":"TEMPORAL_RANGE","val":"No
filter"}],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":["http_user_agent","query_duration_ms","result_rows",{"timeGrain":"P1D","columnType":"BASE_AXIS","sqlExpression":"event_time","label":"event_time","expressionType":"SQL"},"memory_usage_mb","tables","query"],"metrics":[],"orderby":[],"annotation_layers":[],"row_limit":1000,"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"post_processing":[]}],"form_data":{"datasource":"266__table","viz_type":"table","slice_id":422,"query_mode":"aggregate","groupby":["http_user_agent","query_duration_ms","result_rows","event_time","memory_usage_mb","tables","query"],"time_grain_sqla":"P1D","temporal_columns_lookup":{"event_time":true},"all_columns":[],"percent_metrics":[],"adhoc_filters":[{"clause":"WHERE","comparator":"No
filter","expressionType":"SIMPLE","operator":"TEMPORAL_RANGE","subject":"event_time"}],"order_by_cols":[],"row_limit":1000,"server_page_length":10,"order_desc":true,"table_timestamp_format":"smart_date","show_cell_bars":true,"color_pn":true,"extra_form_data":{},"dashboards":[],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}'
query_context:
datasource:
id: 266
type: table
force: false
form_data:
adhoc_filters:
- clause: WHERE
comparator: No filter
expressionType: SIMPLE
operator: TEMPORAL_RANGE
subject: event_time
all_columns: []
color_pn: true
dashboards: []
datasource: 266__table
extra_form_data: {}
force: false
groupby:
- http_user_agent
- query_duration_ms
- result_rows
- event_time
- memory_usage_mb
- tables
- query
order_by_cols: []
order_desc: true
percent_metrics: []
query_mode: aggregate
result_format: json
result_type: full
row_limit: 1000
server_page_length: 10
show_cell_bars: true
slice_id: 422
table_timestamp_format: smart_date
temporal_columns_lookup:
event_time: true
time_grain_sqla: P1D
viz_type: table
queries:
- annotation_layers: []
applied_time_extras: {}
columns:
- http_user_agent
- query_duration_ms
- result_rows
- columnType: BASE_AXIS
expressionType: SQL
label: event_time
sqlExpression: event_time
timeGrain: P1D
- memory_usage_mb
- tables
- query
custom_form_data: {}
custom_params: {}
extras:
having: ''
time_grain_sqla: P1D
where: ''
filters:
- col: event_time
op: TEMPORAL_RANGE
val: No filter
metrics: []
order_desc: true
orderby: []
post_processing: []
row_limit: 1000
series_limit: 0
url_params: {}
result_format: json
result_type: full
slice_name: Query performance
uuid: bb13bb31-c797-4ed3-a7f9-7825cc6dc482
version: 1.0.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_file_name: query_log.yaml
always_filter_main_dttm: false
cache_timeout: null
columns:
- advanced_data_type: null
@@ -36,7 +37,7 @@ columns:
is_dttm: false
python_date_format: null
type: Array(LowCardinality(String))
verbose_name: null
verbose_name: Tables
- advanced_data_type: null
column_name: http_user_agent
description: null
@@ -48,7 +49,7 @@ columns:
is_dttm: false
python_date_format: null
type: LowCardinality(String)
verbose_name: null
verbose_name: Http User Agent
- advanced_data_type: null
column_name: memory_usage_mb
description: null
@@ -60,7 +61,7 @@ columns:
is_dttm: false
python_date_format: null
type: Float64
verbose_name: null
verbose_name: Memory Usage Mb
- advanced_data_type: null
column_name: query_duration_ms
description: null
@@ -72,7 +73,7 @@ columns:
is_dttm: false
python_date_format: null
type: UInt64
verbose_name: null
verbose_name: Query Duration Ms
- advanced_data_type: null
column_name: result_rows
description: null
@@ -84,7 +85,7 @@ columns:
is_dttm: false
python_date_format: null
type: UInt64
verbose_name: null
verbose_name: Result Rows
database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6
default_endpoint: null
description: null