Problem with new update Metabase 0.42.0

Hello, I have an error in a report where I do not use the field that displays the error, a report made in the old version has the same problem, I downgraded and both worked normally. Is there anything I can do?

Hi @Mauricio-Gazato
What is "report"?
Check the logs for errors in Admin > Troubleshooting > Logs.

1 Like

would be the "question"

@Mauricio-Gazato Okay, you need to post the actual error instead of writing "displays an error".

@flamber Sorry, the error returned was the following: "ERROR: column source.Vendapromocao__id_promocao does not exist Position: 1060". And the log doesn't load, it stays on the loading screen and doesn't show anything.

@Mauricio-Gazato Post "Diagnostic Info" from Admin > Troubleshooting.
I'm guessing you are using BigQuery, then it's fixed and will be part of 0.42.1: https://github.com/metabase/metabase/issues?q=is%3Aclosed+milestone%3A0.42.1

@flamber the log you requested would be this?
{
"browser-info": {
"language": "pt-BR",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "Cp1252",
"java.runtime.name": "Java(TM) SE Runtime Environment",
"java.runtime.version": "1.8.0_321-b07",
"java.vendor": "Oracle Corporation",
"java.vendor.url": "http://java.oracle.com/",
"java.version": "1.8.0_321",
"java.vm.name": "Java HotSpot(TM) 64-Bit Server VM",
"java.vm.version": "25.321-b07",
"os.name": "Windows Server 2019",
"os.version": "10.0",
"user.language": "pt",
"user.timezone": "America/Sao_Paulo"
},
"metabase-info": {
"databases": [
"postgres"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"tag": "v0.42.0",
"date": "2022-02-08",
"branch": "release-x.42.x",
"hash": "de1264e"
},
"settings": {
"report-timezone": null
}
}
}

@Mauricio-Gazato
Upgrade Java: https://www.metabase.com/docs/latest/operations-guide/java-versions.html
Then check the log after you get the error and include the full stacktrace.

And migrate away from H2 if you are using Metabase in production:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

@flamber If I do this migration will it affect my database or my metabase in something?

@Mauricio-Gazato If you follow the guide and make sure you of course of backups first, then it will make no difference. It's a recommendation, it will not fix anything related to your current problem.

@flamber the java update I performed, the migration did not. About my problem, just wait for the new update? Do you have any predictions?

@Mauricio-Gazato Are you using BigQuery, no, so no the update will not fix anything for you.

You need to provide steps-to-reproduce and/or full stacktrace errors, so it is possible to understand why you are getting an error. See Admin > Troubleshooting > Logs for full stacktrace logs.

[d921f256-e296-453b-a1d8-3e9acd39d931] 2022-02-14T16:48:36-03:00 INFO metabase.query-processor.middleware.fetch-source-query Consulta original trazida do cartão 165:
{:source-table 365,
:filter
[:and
[:= [:field 2420 nil] false]
[:= [:field 627 {:join-alias "Vendapromocao"}] 7680 7681 7682 7683]
[:between [:field 2383 nil] "2021-10-29" "2022-01-28"]
[:>= [:field 2425 nil] 70]],
:joins
[{:fields :all,
:source-table 114,
:condition [:= [:field 2410 nil] [:field 626 {:join-alias "Vendapromocao"}]],
:alias "Vendapromocao",
:strategy :inner-join}
{:fields :all,
:source-table 1256,
:condition [:= [:field 627 {:join-alias "Vendapromocao"}] [:field 8928 {:join-alias "Promocao - ID Promocao"}]],
:alias "Promocao - ID Promocao",
:strategy :inner-join}],
:aggregation [[:sum [:field 2425 nil]]],
:breakout [[:field 2393 nil] [:field 627 {:join-alias "Vendapromocao"}]]}

[d921f256-e296-453b-a1d8-3e9acd39d931] 2022-02-14T16:48:36-03:00 INFO metabase.query-processor.middleware.fetch-source-query Consulta original trazida do cartão 166:
{:source-table 365,
:filter
[:and [:between [:field 2383 nil] "2021-10-29" "2022-01-28"] [:= [:field 2420 nil] false] [:>= [:field 2425 nil] 70]],
:aggregation [[:sum [:field 2425 nil]]],
:breakout [[:field 2393 nil]]}

[d921f256-e296-453b-a1d8-3e9acd39d931] 2022-02-14T16:48:36-03:00 INFO metabase.query-processor.middleware.fetch-source-query Consulta original trazida do cartão 165:
{:source-table 365,
:filter
[:and
[:= [:field 2420 nil] false]
[:= [:field 627 {:join-alias "Vendapromocao"}] 7680 7681 7682 7683]
[:between [:field 2383 nil] "2021-10-29" "2022-01-28"]
[:>= [:field 2425 nil] 70]],
:joins
[{:fields :all,
:source-table 114,
:condition [:= [:field 2410 nil] [:field 626 {:join-alias "Vendapromocao"}]],
:alias "Vendapromocao",
:strategy :inner-join}
{:fields :all,
:source-table 1256,
:condition [:= [:field 627 {:join-alias "Vendapromocao"}] [:field 8928 {:join-alias "Promocao - ID Promocao"}]],
:alias "Promocao - ID Promocao",
:strategy :inner-join}],
:aggregation [[:sum [:field 2425 nil]]],
:breakout [[:field 2393 nil] [:field 627 {:join-alias "Vendapromocao"}]]}

[d921f256-e296-453b-a1d8-3e9acd39d931] 2022-02-14T16:48:39-03:00 ERROR metabase.query-processor.middleware.catch-exceptions Erro ao processar a consulta: null
{:database_id 33,
:started_at #t "2022-02-14T16:48:36.229011700-03:00[America/Sao_Paulo]",
:via
[{:status :failed,
:class clojure.lang.ExceptionInfo,
:error "Erro ao executar consulta: ERROR: column source.Vendapromocao__id_promocao does not exist\n Posição: 774",
:stacktrace
["--> driver.sql_jdbc.execute$execute_reducible_query$fn__53274.invoke(execute.clj:504)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:501)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:487)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:496)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:487)"
"driver.sql_jdbc$fn__81915.invokeStatic(sql_jdbc.clj:54)"
"driver.sql_jdbc$fn__81915.invoke(sql_jdbc.clj:52)"
"query_processor.context$executef.invokeStatic(context.clj:59)"
"query_processor.context$executef.invoke(context.clj:48)"
"query_processor.context.default$default_runf.invokeStatic(default.clj:68)"
"query_processor.context.default$default_runf.invoke(default.clj:66)"
"query_processor.context$runf.invokeStatic(context.clj:45)"
"query_processor.context$runf.invoke(context.clj:39)"
"query_processor.reducible$pivot.invokeStatic(reducible.clj:34)"
"query_processor.reducible$pivot.invoke(reducible.clj:31)"
"query_processor.middleware.mbql_to_native$mbql__GT_native$fn__49659.invoke(mbql_to_native.clj:25)"
"query_processor.middleware.check_features$check_features$fn__50405.invoke(check_features.clj:42)"
"query_processor.middleware.limit$limit$fn__48032.invoke(limit.clj:37)"
"query_processor.middleware.cache$maybe_return_cached_results$fn__50788.invoke(cache.clj:204)"
"query_processor.middleware.optimize_temporal_filters$optimize_temporal_filters$fn__51821.invoke(optimize_temporal_filters.clj:204)"
"query_processor.middleware.validate_temporal_bucketing$validate_temporal_bucketing$fn__51865.invoke(validate_temporal_bucketing.clj:50)"
"query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__49716.invoke(auto_parse_filter_values.clj:43)"
"query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__39821.invoke(wrap_value_literals.clj:161)"
"query_processor.middleware.annotate$add_column_info$fn__44587.invoke(annotate.clj:659)"
"query_processor.middleware.permissions$check_query_permissions$fn__46329.invoke(permissions.clj:108)"
"query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__51010.invoke(pre_alias_aggregations.clj:40)"
"query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__46725.invoke(cumulative_aggregations.clj:60)"
"query_processor.middleware.visualization_settings$update_viz_settings$fn__46663.invoke(visualization_settings.clj:63)"
"query_processor.middleware.fix_bad_references$fix_bad_references_middleware$fn__50975.invoke(fix_bad_references.clj:91)"
"query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__47610.invoke(resolve_joined_fields.clj:111)"
"query_processor.middleware.resolve_joins$resolve_joins$fn__51591.invoke(resolve_joins.clj:176)"
"query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__51133.invoke(add_implicit_joins.clj:202)"
"query_processor.middleware.large_int_id$convert_id_to_string$fn__47629.invoke(large_int_id.clj:59)"
"query_processor.middleware.format_rows$format_rows$fn__51185.invoke(format_rows.clj:74)"
"query_processor.middleware.add_default_temporal_unit$add_default_temporal_unit$fn__46997.invoke(add_default_temporal_unit.clj:23)"
"query_processor.middleware.desugar$desugar$fn__46636.invoke(desugar.clj:21)"
"query_processor.middleware.binning$update_binning_strategy$fn__39550.invoke(binning.clj:229)"
"query_processor.middleware.resolve_fields$resolve_fields$fn__45971.invoke(resolve_fields.clj:34)"
"query_processor.middleware.add_dimension_projections$add_remapping$fn__50342.invoke(add_dimension_projections.clj:487)"
"query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__50636.invoke(add_implicit_clauses.clj:164)"
"query_processor.middleware.upgrade_field_literals$upgrade_field_literals$fn__48017.invoke(upgrade_field_literals.clj:117)"
"query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__47374.invoke(add_source_metadata.clj:125)"
"query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__50887.invoke(reconcile_breakout_and_order_by_bucketing.clj:100)"
"query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__48974.invoke(auto_bucket_datetimes.clj:147)"
"query_processor.middleware.resolve_source_table$resolve_source_tables$fn__45952.invoke(resolve_source_table.clj:45)"
"query_processor.middleware.parameters$substitute_parameters$fn__48628.invoke(parameters.clj:111)"
"query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__46025.invoke(resolve_referenced.clj:79)"
"query_processor.middleware.expand_macros$expand_macros$fn__52249.invoke(expand_macros.clj:184)"
"query_processor.middleware.add_timezone_info$add_timezone_info$fn__48407.invoke(add_timezone_info.clj:15)"
"query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__51200.invoke(splice_params_in_response.clj:32)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__50647$fn__50652.invoke(resolve_database_and_driver.clj:35)"
"driver$do_with_driver.invokeStatic(driver.clj:60)"
"driver$do_with_driver.invoke(driver.clj:56)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__50647.invoke(resolve_database_and_driver.clj:34)"
"query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__46571.invoke(fetch_source_query.clj:282)"
"query_processor.middleware.store$initialize_store$fn__46762$fn__46763.invoke(store.clj:11)"
"query_processor.store$do_with_store.invokeStatic(store.clj:44)"
"query_processor.store$do_with_store.invoke(store.clj:38)"
"query_processor.middleware.store$initialize_store$fn__46762.invoke(store.clj:10)"
"query_processor.middleware.validate$validate_query$fn__50982.invoke(validate.clj:10)"
"query_processor.middleware.normalize_query$normalize$fn__50989.invoke(normalize_query.clj:22)"
"query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__48353.invoke(add_rows_truncated.clj:35)"
"query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__49645.invoke(results_metadata.clj:82)"
"query_processor.middleware.constraints$add_default_userland_constraints$fn__48371.invoke(constraints.clj:42)"
"query_processor.middleware.process_userland_query$process_userland_query$fn__50923.invoke(process_userland_query.clj:146)"
"query_processor.middleware.catch_exceptions$catch_exceptions$fn__51280.invoke(catch_exceptions.clj:169)"
"query_processor.reducible$async_qp$qp_STAR___43323$thunk__43324.invoke(reducible.clj:103)"
"query_processor.reducible$async_qp$qp_STAR___43323.invoke(reducible.clj:109)"
"query_processor.reducible$sync_qp$qp_STAR___43332$fn__43335.invoke(reducible.clj:135)"
"query_processor.reducible$sync_qp$qp_STAR___43332.invoke(reducible.clj:134)"
"query_processor$process_userland_query.invokeStatic(query_processor.clj:245)"
"query_processor$process_userland_query.doInvoke(query_processor.clj:241)"
"query_processor$fn__52297$process_query_and_save_execution_BANG___52306$fn__52309.invoke(query_processor.clj:256)"
"query_processor$fn__52297$process_query_and_save_execution_BANG___52306.invoke(query_processor.clj:249)"
"query_processor$fn__52341$process_query_and_save_with_max_results_constraints_BANG___52350$fn__52353.invoke(query_processor.clj:268)"
"query_processor$fn__52341$process_query_and_save_with_max_results_constraints_BANG___52350.invoke(query_processor.clj:261)"
"api.dataset$run_query_async$fn__65276.invoke(dataset.clj:69)"
"query_processor.streaming$streaming_response_STAR_$fn__38459$fn__38460.invoke(streaming.clj:162)"
"query_processor.streaming$streaming_response_STAR_$fn__38459.invoke(streaming.clj:161)"
"async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)"
"async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)"
"async.streaming_response$do_f_async$task__26889.invoke(streaming_response.clj:84)"],
:error_type :invalid-query,
:ex-data

@Mauricio-Gazato It looks like you are seeing this issue, but that was fixed in 0.42:
https://github.com/metabase/metabase/issues/18512

From what I can tell, you have two questions, where one has a join. Then those two questions are used in a Saved Question as base and joined too.

Try providing screenshots or steps-to-reproduce.

@flamber follow the images of the questions. The error happens after creating the custom columns in image 3(Capturar3).

@Mauricio-Gazato From your screenshots, this query would not work on previous versions either. It's basically issue 18512, and then the Custom Columns makes it even more complex by adding another nested query layer.

I've created an issue for this, since it seems to be triggered by the subsequent nesting:
https://github.com/metabase/metabase/issues/20519 - upvote by clicking :+1: on the first post

@flamber Got it, strange that this question worked in the previous version. But I managed to make it work by first calling the table where I get the data and referencing the primary key. Thanks a lot for the help

@Mauricio-Gazato But since you haven't written which version you upgraded from, then it's really difficult to help you or understand the problem. I have written all the details in the issue, so that should be sufficient for you to understand how to provide enough information in the future.

1 Like