SDK failed to get the query_id

Hi everyone,

I am using SDK to generate PNG from visualization which custom filters applied on this. While working with SDK, I'm facing a weird situation which is in some dashboard (all are UDD), there are:

1. All the charts do not have the query_id

lennonbuiCLV_0-1717662232325.png

2. Some charts do not have the query_id, while others do

lennonbuiCLV_1-1717662251786.png

I do some testing, such as create a new similar dashboard (UDD) with the same model, same data fields and within the same shared folder, and the SDK is successfully to get all the query_id. We are using the process of making the change from UDD -> get_lookml dashboard -> sync API to the higher environment, is there the reason of this problem?

0 3 76
3 REPLIES 3

Hello! You can pull the query_id value from the element.query.id. Alternatively, you can also use the query.slug value and pass that slug into the same endpoints that accept query_id. Hope that helps!

hi @Sharon_Z,

I really appreciate your response. However, I do check and it appeared to me that in my dashboard, the elements do not return any query attribute (please see my attached).

lennonbuiCLV_0-1718042086434.png

 

Indeed, if you don't mind please take a reference of the response of the sample of dashboard element below to help me identify what is the problem that's going on with my dash:

DashboardElement(can={'create': True, 'update': True, 'destroy': True, 'see_aggregate_table_lookml': True, 'index': True, 'show': True, 'explore': True, 'run': False, 'show_errors': True, 'find_and_replace': True}, body_text=None, body_text_as_html=None, dashboard_id='202', edit_uri=None, id='7548', look=None, look_id=None, lookml_link_id='Performance by Period', merge_result_id=None, note_display=None, note_state=None, note_text=None, note_text_as_html=None, query=None, query_id=None, refresh_interval=None, refresh_interval_to_i=None, result_maker=ResultMakerWithIdVisConfigAndDynamicFields(id='78173', dynamic_fields=None, filterables=[ResultMakerFilterables(model='oneforce', view='account_plan', name='', listen=[ResultMakerFilterablesListen(dashboard_filter_name='Calendar Year', field='of_sales_week_master.calendar_year'), ResultMakerFilterablesListen(dashboard_filter_name='Fiscal Year', field='of_sales_week_master.fiscal_year'), ResultMakerFilterablesListen(dashboard_filter_name='Sales Month', field='of_sales_week_master.sales_month'), ResultMakerFilterablesListen(dashboard_filter_name='Sales Week', field='of_sales_week_master.sales_week'), ResultMakerFilterablesListen(dashboard_filter_name='Trade', field='of_consolidated.svc_scp_grp_cd'), ResultMakerFilterablesListen(dashboard_filter_name='DOM /Non-DOM', field='of_consolidated.dominant_flg'), ResultMakerFilterablesListen(dashboard_filter_name='Service Lane (Rev)', field='of_consolidated.slane_cd'), ResultMakerFilterablesListen(dashboard_filter_name='Customer Segmentation', field='of_customer_group.key_acct_tp_cd'), ResultMakerFilterablesListen(dashboard_filter_name='Group Customer Country', field='of_customer_group.key_acct_cnt_name'), ResultMakerFilterablesListen(dashboard_filter_name='Show / Hide CM', field='of_consolidated.show_or_hide_cm'), ResultMakerFilterablesListen(dashboard_filter_name='Show / Hide Target', field='of_consolidated.show_or_hide_target'), ResultMakerFilterablesListen(dashboard_filter_name='Timeline Granularity', field='of_sales_week_master.timeframe_picker'), ResultMakerFilterablesListen(dashboard_filter_name='Contract Length', field='of_svc_contract.ctrt_dur_tp_cd'), ResultMakerFilterablesListen(dashboard_filter_name='CIF/FOB', field='of_consolidated.gsym_cif_fob'), ResultMakerFilterablesListen(dashboard_filter_name='Revenue VVD', field='of_consolidated.rev_vvd'), ResultMakerFilterablesListen(dashboard_filter_name='AP Submission Office', field='of_consolidated.ctrt_scp_srep_ofc_cd'), ResultMakerFilterablesListen(dashboard_filter_name='Contract (Header)', field='of_consolidated.ctrt_prop_ofc_cd'), ResultMakerFilterablesListen(dashboard_filter_name='Loading Office', field='of_consolidated.ob_sls_ofc_cd'), ResultMakerFilterablesListen(dashboard_filter_name='Via ONE Quote', field='of_consolidated.is_one_quotation'), ResultMakerFilterablesListen(dashboard_filter_name='SC/RFA Owner', field='of_user.full_name'), ResultMakerFilterablesListen(dashboard_filter_name="SC/RFA Owner's Office", field='of_customer_owner.office_code'), ResultMakerFilterablesListen(dashboard_filter_name='SC/RFA No', field='of_consolidated.svc_cont_no'), ResultMakerFilterablesListen(dashboard_filter_name='Booking Status', field='of_consolidated.bkg_sts_filter'), ResultMakerFilterablesListen(dashboard_filter_name="SC/RFA Owner's RHQ", field='of_consolidated.owner_regional_head_office'), ResultMakerFilterablesListen(dashboard_filter_name='Group Customer Region', field='of_consolidated.key_acct_rgn_cd'), ResultMakerFilterablesListen(dashboard_filter_name='Customer Group', field='of_customer_group.cust_grp_and_name_filtered')])], sorts=['of_sales_week_master.Timeline'], merge_result_id=None, total=False, query_id='1260267', sql_query_id='', query=Query(model='oneforce', view='account_plan', can={'run': True, 'see_results': True, 'explore': True, 'create': True, 'show': True, 'cost_estimate': True, 'index': True, 'see_lookml': True, 'see_aggregate_table_lookml': True, 'see_derived_table_lookml': True, 'see_sql': True, 'save': True, 'generate_drill_links': True, 'download': True, 'download_unlimited': True, 'use_custom_fields': True, 'edit_custom_fields': True, 'edit_table_calculations': True, 'schedule': True, 'render': True}, id='1260267', fields=['of_sales_week_master.Timeline', 'of_consolidated.total_target_teu', 'of_consolidated.total_plan_teu', 'of_consolidated.total_booking_teu'], pivots=None, fill_fields=None, filters=None, filter_expression=None, sorts=['of_sales_week_master.Timeline'], limit='100', column_limit='50', total=None, row_total=None, subtotals=None, vis_config={'x_axis_gridlines': True, 'y_axis_gridlines': True, 'show_view_names': False, 'show_y_axis_labels': True, 'show_y_axis_ticks': True, 'y_axis_tick_density': 'default', 'y_axis_tick_density_custom': 5, 'show_x_axis_label': True, 'show_x_axis_ticks': True, 'y_axis_scale_mode': 'linear', 'x_axis_reversed': False, 'y_axis_reversed': False, 'plot_size_by_field': False, 'trellis': '', 'stacking': '', 'limit_displayed_rows': False, 'legend_position': 'center', 'point_style': 'circle_outline', 'show_value_labels': True, 'label_density': 25, 'x_axis_scale': 'auto', 'y_axis_combined': True, 'show_null_points': True, 'interpolation': 'monotone', 'type': 'looker_line', 'color_application': {'collection_id': 'one-theme', 'palette_id': 'one-theme-categorical-0', 'options': {'steps': 5, 'reverse': False, '__FILE': 'oneforce/dashboards/enterprise_dashboards/account_plan.dashboard.lookml', '__LINE_NUM': 59}}, 'size_by_field': '', 'limit_displayed_rows_values': {'show_hide': 'show', 'first_last': 'first', 'num_rows': 0}, 'hide_legend': False, 'series_types': {'of_consolidated.total_plan_teu': 'area'}, 'series_colors': {'Actual - of_consolidated.total_teu': '#BD0F72', 'Booking - of_consolidated.total_teu': '#00506D', 'Plan - of_consolidated.total_teu': '#F39200', 'Target - of_consolidated.total_teu': '#340335', 'of_consolidated.total_target_teu': '#340335', 'of_consolidated.total_plan_teu': '#F39200', 'of_consolidated.total_booking_teu': '#00506D', 'of_consolidated.total_actual_teu': '#BD0F72'}, 'series_labels': {'Actual - of_consolidated.total_teu': 'Lifting', 'of_consolidated.total_target_teu': 'Target', 'of_consolidated.total_plan_teu': 'Plan', 'of_consolidated.total_booking_teu': 'Booking', 'of_consolidated.total_actual_teu': 'Lifting'}, 'series_point_styles': {'of_consolidated.total_target_teu': 'triangle'}, 'swap_axes': False, 'show_row_numbers': True, 'transpose': False, 'truncate_text': True, 'hide_totals': False, 'hide_row_totals': False, 'size_to_fit': True, 'table_theme': 'white', 'enable_conditional_formatting': False, 'header_text_alignment': 'left', 'header_font_size': 12, 'rows_font_size': 12, 'conditional_formatting_include_totals': False, 'conditional_formatting_include_nulls': False, 'defaults_version': 1}, filter_config=None, visible_ui_sections=None, slug='X95CtdN', dynamic_fields=None, client_id='G9QVdKdCHz1kpTBOyPrJQ8', share_url='https://onelinedev.cloud.looker.com/x/G9QVdKdCHz1kpTBOyPrJQ8', expanded_share_url='https://onelinedev.cloud.looker.com/explore/oneforce/account_plan?fields=of_sales_week_master.Timeline,of_consolidated.total_target_teu,of_consolidated.total_plan_teu,of_consolidated.total_booking_teu&sorts=of_sales_week_master.Timeline&limit=100&column_limit=50&vis=%7B%22x_axis_gridlines%22%3Atrue%2C%22y_axis_gridlines%22%3Atrue%2C%22show_view_names%22%3Afalse%2C%22show_y_axis_labels%22%3Atrue%2C%22show_y_axis_ticks%22%3Atrue%2C%22y_axis_tick_density%22%3A%22default%22%2C%22y_axis_tick_density_custom%22%3A5%2C%22show_x_axis_label%22%3Atrue%2C%22show_x_axis_ticks%22%3Atrue%2C%22y_axis_scale_mode%22%3A%22linear%22%2C%22x_axis_reversed%22%3Afalse%2C%22y_axis_reversed%22%3Afalse%2C%22plot_size_by_field%22%3Afalse%2C%22trellis%22%3A%22%22%2C%22stacking%22%3A%22%22%2C%22limit_displayed_rows%22%3Afalse%2C%22legend_position%22%3A%22center%22%2C%22point_style%22%3A%22circle_outline%22%2C%22show_value_labels%22%3Atrue%2C%22label_density%22%3A25%2C%22x_axis_scale%22%3A%22auto%22%2C%22y_axis_combined%22%3Atrue%2C%22show_null_points%22%3Atrue%2C%22interpolation%22%3A%22monotone%22%2C%22type%22%3A%22looker_line%22%2C%22color_application%22%3A%7B%22collection_id%22%3A%22one-theme%22%2C%22palette_id%22%3A%22one-theme-categorical-0%22%2C%22options%22%3A%7B%22steps%22%3A5%2C%22reverse%22%3Afalse%2C%22__FILE%22%3A%22oneforce%2Fdashboards%2Fenterprise_dashboards%2Faccount_plan.dashboard.lookml%22%2C%22__LINE_NUM%22%3A59%7D%7D%2C%22size_by_field%22%3A%22%22%2C%22limit_displayed_rows_values%22%3A%7B%22show_hide%22%3A%22show%22%2C%22first_last%22%3A%22first%22%2C%22num_rows%22%3A0%7D%2C%22hide_legend%22%3Afalse%2C%22series_types%22%3A%7B%22of_consolidated.total_plan_teu%22%3A%22area%22%7D%2C%22series_colors%22%3A%7B%22Actual+-+of_consolidated.total_teu%22%3A%22%23BD0F72%22%2C%22Booking+-+of_consolidated.total_teu%22%3A%22%2300506D%22%2C%22Plan+-+of_consolidated.total_teu%22%3A%22%23F39200%22%2C%22Target+-+of_consolidated.total_teu%22%3A%22%23340335%22%2C%22of_consolidated.total_target_teu%22%3A%22%23340335%22%2C%22of_consolidated.total_plan_teu%22%3A%22%23F39200%22%2C%22of_consolidated.total_booking_teu%22%3A%22%2300506D%22%2C%22of_consolidated.total_actual_teu%22%3A%22%23BD0F72%22%7D%2C%22series_labels%22%3A%7B%22Actual+-+of_consolidated.total_teu%22%3A%22Lifting%22%2C%22of_consolidated.total_target_teu%22%3A%22Target%22%2C%22of_consolidated.total_plan_teu%22%3A%22Plan%22%2C%22of_consolidated.total_booking_teu%22%3A%22Booking%22%2C%22of_consolidated.total_actual_teu%22%3A%22Lifting%22%7D%2C%22series_point_styles%22%3A%7B%22of_consolidated.total_target_teu%22%3A%22triangle%22%7D%2C%22swap_axes%22%3Afalse%2C%22show_row_numbers%22%3Atrue%2C%22transpose%22%3Afalse%2C%22truncate_text%22%3Atrue%2C%22hide_totals%22%3Afalse%2C%22hide_row_totals%22%3Afalse%2C%22size_to_fit%22%3Atrue%2C%22table_theme%22%3A%22white%22%2C%22enable_conditional_formatting%22%3Afalse%2C%22header_text_alignment%22%3A%22left%22%2C%22header_font_size%22%3A12%2C%22rows_font_size%22%3A12%2C%22conditional_formatting_include_totals%22%3Afalse%2C%22conditional_formatting_include_nulls%22%3Afalse%2C%22defaults_version%22%3A1%7D&origin=share-expanded', url='/explore/oneforce/account_plan?fields=of_sales_week_master.Timeline,of_consolidated.total_target_teu,of_consolidated.total_plan_teu,of_consolidated.total_booking_teu&sorts=of_sales_week_master.Timeline&limit=100&column_limit=50&vis=%7B%22x_axis_gridlines%22%3Atrue%2C%22y_axis_gridlines%22%3Atrue%2C%22show_view_names%22%3Afalse%2C%22show_y_axis_labels%22%3Atrue%2C%22show_y_axis_ticks%22%3Atrue%2C%22y_axis_tick_density%22%3A%22default%22%2C%22y_axis_tick_density_custom%22%3A5%2C%22show_x_axis_label%22%3Atrue%2C%22show_x_axis_ticks%22%3Atrue%2C%22y_axis_scale_mode%22%3A%22linear%22%2C%22x_axis_reversed%22%3Afalse%2C%22y_axis_reversed%22%3Afalse%2C%22plot_size_by_field%22%3Afalse%2C%22trellis%22%3A%22%22%2C%22stacking%22%3A%22%22%2C%22limit_displayed_rows%22%3Afalse%2C%22legend_position%22%3A%22center%22%2C%22point_style%22%3A%22circle_outline%22%2C%22show_value_labels%22%3Atrue%2C%22label_density%22%3A25%2C%22x_axis_scale%22%3A%22auto%22%2C%22y_axis_combined%22%3Atrue%2C%22show_null_points%22%3Atrue%2C%22interpolation%22%3A%22monotone%22%2C%22type%22%3A%22looker_line%22%2C%22color_application%22%3A%7B%22collection_id%22%3A%22one-theme%22%2C%22palette_id%22%3A%22one-theme-categorical-0%22%2C%22options%22%3A%7B%22steps%22%3A5%2C%22reverse%22%3Afalse%2C%22__FILE%22%3A%22oneforce%2Fdashboards%2Fenterprise_dashboards%2Faccount_plan.dashboard.lookml%22%2C%22__LINE_NUM%22%3A59%7D%7D%2C%22size_by_field%22%3A%22%22%2C%22limit_displayed_rows_values%22%3A%7B%22show_hide%22%3A%22show%22%2C%22first_last%22%3A%22first%22%2C%22num_rows%22%3A0%7D%2C%22hide_legend%22%3Afalse%2C%22series_types%22%3A%7B%22of_consolidated.total_plan_teu%22%3A%22area%22%7D%2C%22series_colors%22%3A%7B%22Actual+-+of_consolidated.total_teu%22%3A%22%23BD0F72%22%2C%22Booking+-+of_consolidated.total_teu%22%3A%22%2300506D%22%2C%22Plan+-+of_consolidated.total_teu%22%3A%22%23F39200%22%2C%22Target+-+of_consolidated.total_teu%22%3A%22%23340335%22%2C%22of_consolidated.total_target_teu%22%3A%22%23340335%22%2C%22of_consolidated.total_plan_teu%22%3A%22%23F39200%22%2C%22of_consolidated.total_booking_teu%22%3A%22%2300506D%22%2C%22of_consolidated.total_actual_teu%22%3A%22%23BD0F72%22%7D%2C%22series_labels%22%3A%7B%22Actual+-+of_consolidated.total_teu%22%3A%22Lifting%22%2C%22of_consolidated.total_target_teu%22%3A%22Target%22%2C%22of_consolidated.total_plan_teu%22%3A%22Plan%22%2C%22of_consolidated.total_booking_teu%22%3A%22Booking%22%2C%22of_consolidated.total_actual_teu%22%3A%22Lifting%22%7D%2C%22series_point_styles%22%3A%7B%22of_consolidated.total_target_teu%22%3A%22triangle%22%7D%2C%22swap_axes%22%3Afalse%2C%22show_row_numbers%22%3Atrue%2C%22transpose%22%3Afalse%2C%22truncate_text%22%3Atrue%2C%22hide_totals%22%3Afalse%2C%22hide_row_totals%22%3Afalse%2C%22size_to_fit%22%3Atrue%2C%22table_theme%22%3A%22white%22%2C%22enable_conditional_formatting%22%3Afalse%2C%22header_text_alignment%22%3A%22left%22%2C%22header_font_size%22%3A12%2C%22rows_font_size%22%3A12%2C%22conditional_formatting_include_totals%22%3Afalse%2C%22conditional_formatting_include_nulls%22%3Afalse%2C%22defaults_version%22%3A1%7D', query_timezone=None, has_table_calculations=False), vis_config={'x_axis_gridlines': True, 'y_axis_gridlines': True, 'show_view_names': False, 'show_y_axis_labels': True, 'show_y_axis_ticks': True, 'y_axis_tick_density': 'default', 'y_axis_tick_density_custom': 5, 'show_x_axis_label': True, 'show_x_axis_ticks': True, 'y_axis_scale_mode': 'linear', 'x_axis_reversed': False, 'y_axis_reversed': False, 'plot_size_by_field': False, 'trellis': '', 'stacking': '', 'limit_displayed_rows': False, 'legend_position': 'center', 'point_style': 'circle_outline', 'show_value_labels': True, 'label_density': 25, 'x_axis_scale': 'auto', 'y_axis_combined': True, 'show_null_points': True, 'interpolation': 'monotone', 'type': 'looker_line', 'color_application': {'collection_id': 'one-theme', 'palette_id': 'one-theme-categorical-0', 'options': {'steps': 5, 'reverse': False, '__FILE': 'oneforce/dashboards/enterprise_dashboards/account_plan.dashboard.lookml', '__LINE_NUM': 59}}, 'size_by_field': '', 'limit_displayed_rows_values': {'show_hide': 'show', 'first_last': 'first', 'num_rows': 0}, 'hide_legend': False, 'series_types': {'of_consolidated.total_plan_teu': 'area'}, 'series_colors': {'Actual - of_consolidated.total_teu': '#BD0F72', 'Booking - of_consolidated.total_teu': '#00506D', 'Plan - of_consolidated.total_teu': '#F39200', 'Target - of_consolidated.total_teu': '#340335', 'of_consolidated.total_target_teu': '#340335', 'of_consolidated.total_plan_teu': '#F39200', 'of_consolidated.total_booking_teu': '#00506D', 'of_consolidated.total_actual_teu': '#BD0F72'}, 'series_labels': {'Actual - of_consolidated.total_teu': 'Lifting', 'of_consolidated.total_target_teu': 'Target', 'of_consolidated.total_plan_teu': 'Plan', 'of_consolidated.total_booking_teu': 'Booking', 'of_consolidated.total_actual_teu': 'Lifting'}, 'series_point_styles': {'of_consolidated.total_target_teu': 'triangle'}, 'swap_axes': False, 'show_row_numbers': True, 'transpose': False, 'truncate_text': True, 'hide_totals': False, 'hide_row_totals': False, 'size_to_fit': True, 'table_theme': 'white', 'enable_conditional_formatting': False, 'header_text_alignment': 'left', 'header_font_size': 12, 'rows_font_size': 12, 'conditional_formatting_include_totals': False, 'conditional_formatting_include_nulls': False, 'defaults_version': 1}), result_maker_id='78173', subtitle_text=None, title='Performance by Period', title_hidden=False, title_text=None, type='vis', alert_count=0, rich_content_json=None, title_text_as_html=None, subtitle_text_as_html=None, extension_id=None)