Google Analytics Setup

Hello,

We’re on Metabase 0.35.2 and I’ve got it hooked into our Postgres databases just fine but today I tried hooking it up to our GA and I’m having an issue. I was able to get a client ID/secret and auth code, save it, and see that it shows our properties in metabase but I can never seem to do any queries. It keeps returning errors like Required parameter metrics must be specified. and Parameter metrics must conform to the pattern ga:.+.

Anyone have any experience with this?

Thanks,

–James

Hi @jcandalino
So if you access one of the tables via “Browse Data” > your GA database, does it show errors instantly or are you trying to do something else, when it shows the errors?
I have never seen those errors before, so I’m guessing this might be specific to your setup/GA.

Yup, the Required parameter metrics must be specified. show right away. The Parameter metrics must conform to the pattern ga:.+ shows when I click Summarize and then any of the things under there.

When I go back to the GA setup in metabase the Auth Code field is empty (showing the example one). I’m not sure if that has anything to do with it.

Is there any setup on the GA side besides enabling the API for the client ID?

@jcandalino Interesting. Yes, the Auth Code is not shown after it has been entered. There shouldn’t be anything you need to do on the GA side, so that’s why I don’t understand why you’re getting these errors.

Gotcha. Nothing interesting in the logs either.

I just tried it in a local copy of metabase and I get the same error so I’m guessing it must be something to do with my GA account.

Actually, there are a some stack traces in the logs:

{:database_id 35,
 :started_at (t/zoned-date-time "2020-04-23T18:05:52.939744Z[GMT]"),
 :json_query {:type "query", :database 35, :query {:source-table 143, :aggregation [["count"]]}, :parameters [], :middleware {:add-default-userland-constraints? true}},
 :native {:query {:include-empty-rows false, :ids "ga:207638510", :metrics "", :dimensions "", :start-date "2005-01-01", :end-date "today", :max-results 10000}, :mbql? true},
 :status :failed,
 :class java.lang.IllegalArgumentException,
 :stacktrace
 ["com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)"
  "com.google.api.client.util.Preconditions.checkArgument(Preconditions.java:47)"
  "com.google.api.services.analytics.Analytics$Data$Ga$Get.<init>(Analytics.java:260)"
  "com.google.api.services.analytics.Analytics$Data$Ga.get(Analytics.java:186)"
  "--> driver.googleanalytics$mbql_query__GT_request.invokeStatic(googleanalytics.clj:118)"
  "driver.googleanalytics$mbql_query__GT_request.invoke(googleanalytics.clj:112)"
  "driver.googleanalytics$execute_STAR_.invokeStatic(googleanalytics.clj:151)"
  "driver.googleanalytics$execute_STAR_.invoke(googleanalytics.clj:149)"
  "driver.googleanalytics.execute$execute_reducible_query.invokeStatic(execute.clj:125)"
  "driver.googleanalytics.execute$execute_reducible_query.invoke(execute.clj:122)"
  "driver.googleanalytics$eval1369$fn__1370.invoke(googleanalytics.clj:155)"
  "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:69)"
  "query_processor.context.default$default_runf.invoke(default.clj:67)"
  "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__43003.invoke(mbql_to_native.clj:26)"
  "query_processor.middleware.check_features$check_features$fn__42317.invoke(check_features.clj:42)"
  "query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__43168.invoke(optimize_datetime_filters.clj:133)"
  "query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__47065.invoke(wrap_value_literals.clj:137)"
  "query_processor.middleware.annotate$add_column_info$fn__40946.invoke(annotate.clj:577)"
  "query_processor.middleware.permissions$check_query_permissions$fn__42192.invoke(permissions.clj:64)"
  "query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__43667.invoke(pre_alias_aggregations.clj:40)"
  "query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__42390.invoke(cumulative_aggregations.clj:61)"
  "query_processor.middleware.resolve_joins$resolve_joins$fn__44199.invoke(resolve_joins.clj:183)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__39133.invoke(add_implicit_joins.clj:245)"
  "query_processor.middleware.limit$limit$fn__42989.invoke(limit.clj:38)"
  "query_processor.middleware.format_rows$format_rows$fn__42970.invoke(format_rows.clj:81)"
  "query_processor.middleware.desugar$desugar$fn__42456.invoke(desugar.clj:22)"
  "query_processor.middleware.binning$update_binning_strategy$fn__41490.invoke(binning.clj:229)"
  "query_processor.middleware.resolve_fields$resolve_fields$fn__41998.invoke(resolve_fields.clj:24)"
  "query_processor.middleware.add_dimension_projections$add_remapping$fn__38669.invoke(add_dimension_projections.clj:272)"
  "query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__38889.invoke(add_implicit_clauses.clj:147)"
  "query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__39282.invoke(add_source_metadata.clj:105)"
  "query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__43864.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)"
  "query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__41131.invoke(auto_bucket_datetimes.clj:125)"
  "query_processor.middleware.resolve_source_table$resolve_source_tables$fn__42045.invoke(resolve_source_table.clj:46)"
  "query_processor.middleware.parameters$substitute_parameters$fn__43649.invoke(parameters.clj:97)"
  "query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__42097.invoke(resolve_referenced.clj:80)"
  "query_processor.middleware.expand_macros$expand_macros$fn__42712.invoke(expand_macros.clj:158)"
  "query_processor.middleware.add_timezone_info$add_timezone_info$fn__39313.invoke(add_timezone_info.clj:15)"
  "query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__46949.invoke(splice_params_in_response.clj:32)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__43875$fn__43879.invoke(resolve_database_and_driver.clj:33)"
  "driver$do_with_driver.invokeStatic(driver.clj:61)"
  "driver$do_with_driver.invoke(driver.clj:57)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__43875.invoke(resolve_database_and_driver.clj:27)"
  "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__42918.invoke(fetch_source_query.clj:243)"
  "query_processor.middleware.store$initialize_store$fn__46958$fn__46959.invoke(store.clj:11)"
  "query_processor.store$do_with_store.invokeStatic(store.clj:46)"
  "query_processor.store$do_with_store.invoke(store.clj:40)"
  "query_processor.middleware.store$initialize_store$fn__46958.invoke(store.clj:10)"
  "query_processor.middleware.cache$maybe_return_cached_results$fn__41974.invoke(cache.clj:208)"
  "query_processor.middleware.validate$validate_query$fn__46967.invoke(validate.clj:10)"
  "query_processor.middleware.normalize_query$normalize$fn__43016.invoke(normalize_query.clj:22)"
  "query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__39151.invoke(add_rows_truncated.clj:36)"
  "query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__46934.invoke(results_metadata.clj:128)"
  "query_processor.middleware.constraints$add_default_userland_constraints$fn__42333.invoke(constraints.clj:42)"
  "query_processor.middleware.process_userland_query$process_userland_query$fn__43738.invoke(process_userland_query.clj:136)"
  "query_processor.middleware.catch_exceptions$catch_exceptions$fn__42276.invoke(catch_exceptions.clj:174)"
  "query_processor.reducible$async_qp$qp_STAR___37952$thunk__37953.invoke(reducible.clj:101)"
  "query_processor.reducible$async_qp$qp_STAR___37952.invoke(reducible.clj:107)"
  "query_processor.reducible$sync_qp$qp_STAR___37961$fn__37964.invoke(reducible.clj:133)"
  "query_processor.reducible$sync_qp$qp_STAR___37961.invoke(reducible.clj:132)"
  "query_processor$process_userland_query.invokeStatic(query_processor.clj:218)"
  "query_processor$process_userland_query.doInvoke(query_processor.clj:214)"
  "query_processor$fn__47133$process_query_and_save_execution_BANG___47142$fn__47145.invoke(query_processor.clj:233)"
  "query_processor$fn__47133$process_query_and_save_execution_BANG___47142.invoke(query_processor.clj:225)"
  "query_processor$fn__47177$process_query_and_save_with_max_results_constraints_BANG___47186$fn__47189.invoke(query_processor.clj:245)"
  "query_processor$fn__47177$process_query_and_save_with_max_results_constraints_BANG___47186.invoke(query_processor.clj:238)"
  "api.dataset$fn__50475$fn__50478.invoke(dataset.clj:52)"
  "query_processor.streaming$streaming_response_STAR_$fn__33990$fn__33991.invoke(streaming.clj:73)"
  "query_processor.streaming$streaming_response_STAR_$fn__33990.invoke(streaming.clj:72)"
  "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:66)"
  "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:64)"
  "async.streaming_response$do_f_async$fn__23079.invoke(streaming_response.clj:85)"],
 :context :ad-hoc,
 :error "Parameter metrics must conform to the pattern ga:.+",
 :row_count 0,
 :running_time 0,
 :preprocessed
 {:type :query,
  :database 35,
  :query {:source-table 143, :aggregation [[:aggregation-options [:count] {:name "count"}]]},
  :middleware {:add-default-userland-constraints? true},
  :info
  {:executed-by 1,
   :context :ad-hoc,
   :nested? false,
   :query-hash [-116, -111, 33, 76, 68, -120, 35, -37, 86, 114, -53, -114, 100, 54, 18, -40, 4, -82, 77, 120, -52, -125, -22, -23, -97, 27, 110, 30, -58, 40, 107, -6]},
  :constraints {:max-results 10000, :max-results-bare-rows 2000}},
 :data {:rows [], :cols []}}

and

04-23 18:06:01 ERROR sync.util :: Error running sync step
java.lang.NullPointerException: Required parameter metrics must be specified.
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:897)
	at com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:138)
	at com.google.api.services.analytics.Analytics$Data$Ga$Get.<init>(Analytics.java:258)
	at com.google.api.services.analytics.Analytics$Data$Ga.get(Analytics.java:186)
	at metabase.driver.googleanalytics$mbql_query__GT_request.invokeStatic(googleanalytics.clj:118)
	at metabase.driver.googleanalytics$mbql_query__GT_request.invoke(googleanalytics.clj:112)
	at metabase.driver.googleanalytics$execute_STAR_.invokeStatic(googleanalytics.clj:151)
	at metabase.driver.googleanalytics$execute_STAR_.invoke(googleanalytics.clj:149)
	at metabase.driver.googleanalytics.execute$execute_reducible_query.invokeStatic(execute.clj:125)
	at metabase.driver.googleanalytics.execute$execute_reducible_query.invoke(execute.clj:122)
	at metabase.driver.googleanalytics$eval1369$fn__1370.invoke(googleanalytics.clj:155)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.query_processor.context$executef.invokeStatic(context.clj:59)
	at metabase.query_processor.context$executef.invoke(context.clj:48)
	at metabase.query_processor.context.default$default_runf.invokeStatic(default.clj:69)
	at metabase.query_processor.context.default$default_runf.invoke(default.clj:67)
	at metabase.query_processor.context$runf.invokeStatic(context.clj:45)
	at metabase.query_processor.context$runf.invoke(context.clj:39)
	at metabase.query_processor.reducible$pivot.invokeStatic(reducible.clj:34)
	at metabase.query_processor.reducible$pivot.invoke(reducible.clj:31)
	at metabase.query_processor.middleware.mbql_to_native$mbql__GT_native$fn__43003.invoke(mbql_to_native.clj:26)
	at metabase.query_processor.middleware.check_features$check_features$fn__42317.invoke(check_features.clj:42)
	at metabase.query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__43168.invoke(optimize_datetime_filters.clj:133)
	at metabase.query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__47065.invoke(wrap_value_literals.clj:137)
	at metabase.query_processor.middleware.annotate$add_column_info$fn__40946.invoke(annotate.clj:577)
	at metabase.query_processor.middleware.permissions$check_query_permissions$fn__42192.invoke(permissions.clj:64)
	at metabase.query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__43667.invoke(pre_alias_aggregations.clj:40)
	at metabase.query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__42390.invoke(cumulative_aggregations.clj:61)
	at metabase.query_processor.middleware.resolve_joins$resolve_joins$fn__44199.invoke(resolve_joins.clj:183)
	at metabase.query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__39133.invoke(add_implicit_joins.clj:245)
	at metabase.query_processor.middleware.limit$limit$fn__42989.invoke(limit.clj:38)
	at metabase.query_processor.middleware.format_rows$format_rows$fn__42970.invoke(format_rows.clj:81)
	at metabase.query_processor.middleware.desugar$desugar$fn__42456.invoke(desugar.clj:22)
	at metabase.query_processor.middleware.binning$update_binning_strategy$fn__41490.invoke(binning.clj:229)
	at metabase.query_processor.middleware.resolve_fields$resolve_fields$fn__41998.invoke(resolve_fields.clj:24)
	at metabase.query_processor.middleware.add_dimension_projections$add_remapping$fn__38669.invoke(add_dimension_projections.clj:272)
	at metabase.query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__38889.invoke(add_implicit_clauses.clj:147)
	at metabase.query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__39282.invoke(add_source_metadata.clj:105)
	at metabase.query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__43864.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)
	at metabase.query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__41131.invoke(auto_bucket_datetimes.clj:125)
	at metabase.query_processor.middleware.resolve_source_table$resolve_source_tables$fn__42045.invoke(resolve_source_table.clj:46)
	at metabase.query_processor.middleware.parameters$substitute_parameters$fn__43649.invoke(parameters.clj:97)
	at metabase.query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__42097.invoke(resolve_referenced.clj:80)
	at metabase.query_processor.middleware.expand_macros$expand_macros$fn__42712.invoke(expand_macros.clj:158)
	at metabase.query_processor.middleware.add_timezone_info$add_timezone_info$fn__39313.invoke(add_timezone_info.clj:15)
	at metabase.query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__46949.invoke(splice_params_in_response.clj:32)
	at metabase.query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__43875$fn__43879.invoke(resolve_database_and_driver.clj:33)
	at metabase.driver$do_with_driver.invokeStatic(driver.clj:61)
	at metabase.driver$do_with_driver.invoke(driver.clj:57)
	at metabase.query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__43875.invoke(resolve_database_and_driver.clj:27)
	at metabase.query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__42918.invoke(fetch_source_query.clj:243)
	at metabase.query_processor.middleware.store$initialize_store$fn__46958$fn__46959.invoke(store.clj:11)
	at metabase.query_processor.store$do_with_store.invokeStatic(store.clj:44)
	at metabase.query_processor.store$do_with_store.invoke(store.clj:40)
	at metabase.query_processor.middleware.store$initialize_store$fn__46958.invoke(store.clj:10)
	at metabase.query_processor.middleware.cache$maybe_return_cached_results$fn__41974.invoke(cache.clj:208)
	at metabase.query_processor.middleware.validate$validate_query$fn__46967.invoke(validate.clj:10)
	at metabase.query_processor.middleware.normalize_query$normalize$fn__43016.invoke(normalize_query.clj:22)
	at metabase.query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__39151.invoke(add_rows_truncated.clj:36)
	at metabase.query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__46934.invoke(results_metadata.clj:124)
	at metabase.query_processor.reducible$async_qp$qp_STAR___37952$thunk__37953.invoke(reducible.clj:101)
	at metabase.query_processor.reducible$async_qp$qp_STAR___37952.invoke(reducible.clj:107)
	at metabase.query_processor.reducible$async_qp$qp_STAR___37952.invoke(reducible.clj:94)
	at metabase.query_processor.reducible$sync_qp$qp_STAR___37961$fn__37962.invoke(reducible.clj:129)
	at metabase.query_processor.reducible$sync_qp$qp_STAR___37961.invoke(reducible.clj:128)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:660)
	at metabase.query_processor$process_query.invokeStatic(query_processor.clj:124)
	at metabase.query_processor$process_query.doInvoke(query_processor.clj:118)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at clojure.lang.Var.invoke(Var.java:384)
	at metabase.db.metadata_queries$fn__51755$table_rows_sample__51760$fn__51761.invoke(metadata_queries.clj:104)
	at metabase.db.metadata_queries$fn__51755$table_rows_sample__51760.invoke(metadata_queries.clj:100)
	at metabase.sync.analyze.fingerprint$fn__51821$fingerprint_table_BANG___51826$fn__51827.invoke(fingerprint.clj:61)
	at metabase.sync.analyze.fingerprint$fn__51821$fingerprint_table_BANG___51826.invoke(fingerprint.clj:41)
	at metabase.sync.analyze.fingerprint$fn__51994$fingerprint_fields_BANG___51999$fn__52000.invoke(fingerprint.clj:162)
	at metabase.sync.analyze.fingerprint$fn__51994$fingerprint_fields_BANG___51999.invoke(fingerprint.clj:158)
	at metabase.sync.analyze.fingerprint$fn__52020$fingerprint_fields_for_db_BANG___52025$fn__52026$fn__52027$iter__52028__52032$fn__52033$fn__52034.invoke(fingerprint.clj:174)
	at metabase.sync.analyze.fingerprint$fn__52020$fingerprint_fields_for_db_BANG___52025$fn__52026$fn__52027$iter__52028__52032$fn__52033.invoke(fingerprint.clj:173)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.boundedLength(RT.java:1792)
	at clojure.lang.RestFn.applyTo(RestFn.java:130)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:660)
	at metabase.sync.analyze.fingerprint$fn__52020$fingerprint_fields_for_db_BANG___52025$fn__52026$fn__52027.invoke(fingerprint.clj:173)
	at metabase.query_processor.store$do_with_store.invokeStatic(store.clj:46)
	at metabase.query_processor.store$do_with_store.invoke(store.clj:40)
	at metabase.sync.analyze.fingerprint$fn__52020$fingerprint_fields_for_db_BANG___52025$fn__52026.invoke(fingerprint.clj:170)
	at metabase.sync.analyze.fingerprint$fn__52020$fingerprint_fields_for_db_BANG___52025.invoke(fingerprint.clj:165)
	at metabase.sync.analyze$make_analyze_steps$fn__52166.invoke(analyze.clj:108)
	at metabase.sync.util$fn__44422$run_step_with_metadata__44427$fn__44431$fn__44433.invoke(util.clj:345)
	at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:102)
	at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:96)
	at metabase.sync.util$with_start_and_finish_debug_logging.invokeStatic(util.clj:119)
	at metabase.sync.util$with_start_and_finish_debug_logging.invoke(util.clj:116)
	at metabase.sync.util$fn__44422$run_step_with_metadata__44427$fn__44431.invoke(util.clj:342)
	at metabase.sync.util$fn__44422$run_step_with_metadata__44427.invoke(util.clj:337)
	at metabase.sync.util$fn__44614$run_sync_operation__44619$fn__44620$fn__44621.invoke(util.clj:430)
	at clojure.core$mapv$fn__8445.invoke(core.clj:6912)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:343)
	at clojure.core$reduce.invokeStatic(core.clj:6827)
	at clojure.core$mapv.invokeStatic(core.clj:6903)
	at clojure.core$mapv.invoke(core.clj:6903)
	at metabase.sync.util$fn__44614$run_sync_operation__44619$fn__44620.invoke(util.clj:430)
	at metabase.sync.util$fn__44614$run_sync_operation__44619.invoke(util.clj:424)
	at metabase.sync.analyze$fn__52178$analyze_db_BANG___52183$fn__52184$fn__52185.invoke(analyze.clj:125)
	at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:149)
	at metabase.sync.util$do_with_error_handling.invoke(util.clj:142)
	at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:145)
	at metabase.sync.util$do_with_error_handling.invoke(util.clj:142)
	at clojure.core$partial$fn__5839.invoke(core.clj:2623)
	at metabase.driver$fn__22323.invokeStatic(driver.clj:536)
	at metabase.driver$fn__22323.invoke(driver.clj:536)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at metabase.sync.util$sync_in_context$fn__44334.invoke(util.clj:138)
	at metabase.sync.util$with_db_logging_disabled$fn__44331.invoke(util.clj:129)
	at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:102)
	at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:96)
	at metabase.sync.util$with_start_and_finish_logging$fn__44320.invoke(util.clj:114)
	at metabase.sync.util$with_sync_events$fn__44315.invoke(util.clj:88)
	at metabase.sync.util$with_duplicate_ops_prevented$fn__44306.invoke(util.clj:67)
	at metabase.sync.util$do_sync_operation.invokeStatic(util.clj:164)
	at metabase.sync.util$do_sync_operation.invoke(util.clj:161)
	at metabase.sync.analyze$fn__52178$analyze_db_BANG___52183$fn__52184.invoke(analyze.clj:122)
	at metabase.sync.analyze$fn__52178$analyze_db_BANG___52183.invoke(analyze.clj:117)
	at metabase.sync$fn__53970$sync_database_BANG___53975$fn__53976$fn__53977.invoke(sync.clj:31)
	at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:149)
	at metabase.sync.util$do_with_error_handling.invoke(util.clj:142)
	at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:145)
	at metabase.sync.util$do_with_error_handling.invoke(util.clj:142)
	at clojure.core$partial$fn__5839.invoke(core.clj:2623)
	at metabase.driver$fn__22323.invokeStatic(driver.clj:536)
	at metabase.driver$fn__22323.invoke(driver.clj:536)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at metabase.sync.util$sync_in_context$fn__44334.invoke(util.clj:138)
	at metabase.sync.util$with_db_logging_disabled$fn__44331.invoke(util.clj:129)
	at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:102)
	at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:96)
	at metabase.sync.util$with_start_and_finish_logging$fn__44320.invoke(util.clj:114)
	at metabase.sync.util$with_sync_events$fn__44315.invoke(util.clj:88)
	at metabase.sync.util$with_duplicate_ops_prevented$fn__44306.invoke(util.clj:67)
	at metabase.sync.util$do_sync_operation.invokeStatic(util.clj:164)
	at metabase.sync.util$do_sync_operation.invoke(util.clj:161)
	at metabase.sync$fn__53970$sync_database_BANG___53975$fn__53976.invoke(sync.clj:27)
	at metabase.sync$fn__53970$sync_database_BANG___53975.invoke(sync.clj:19)
	at metabase.events.sync_database$process_sync_database_event$fn__73120.invoke(sync_database.clj:36)
	at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

and

04-23 18:06:04 ERROR middleware.catch-exceptions :: Error processing query: null
{:database_id 35,
 :started_at (t/zoned-date-time "2020-04-23T18:06:04.279598Z[GMT]"),
 :json_query {:database 35, :query {:source-table 143}, :type "query", :parameters [], :middleware {:add-default-userland-constraints? true}},
 :native {:query {:include-empty-rows false, :ids "ga:207638510", :dimensions "", :start-date "2005-01-01", :end-date "today", :max-results 2000}, :mbql? true},
 :status :failed,
 :class java.lang.NullPointerException,
 :stacktrace
 ["com.google.common.base.Preconditions.checkNotNull(Preconditions.java:897)"
  "com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:138)"
  "com.google.api.services.analytics.Analytics$Data$Ga$Get.<init>(Analytics.java:258)"
  "com.google.api.services.analytics.Analytics$Data$Ga.get(Analytics.java:186)"
  "--> driver.googleanalytics$mbql_query__GT_request.invokeStatic(googleanalytics.clj:118)"
  "driver.googleanalytics$mbql_query__GT_request.invoke(googleanalytics.clj:112)"
  "driver.googleanalytics$execute_STAR_.invokeStatic(googleanalytics.clj:151)"
  "driver.googleanalytics$execute_STAR_.invoke(googleanalytics.clj:149)"
  "driver.googleanalytics.execute$execute_reducible_query.invokeStatic(execute.clj:125)"
  "driver.googleanalytics.execute$execute_reducible_query.invoke(execute.clj:122)"
  "driver.googleanalytics$eval1369$fn__1370.invoke(googleanalytics.clj:155)"
  "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:69)"
  "query_processor.context.default$default_runf.invoke(default.clj:67)"
  "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__43003.invoke(mbql_to_native.clj:26)"
  "query_processor.middleware.check_features$check_features$fn__42317.invoke(check_features.clj:42)"
  "query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__43168.invoke(optimize_datetime_filters.clj:133)"
  "query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__47065.invoke(wrap_value_literals.clj:137)"
  "query_processor.middleware.annotate$add_column_info$fn__40946.invoke(annotate.clj:577)"
  "query_processor.middleware.permissions$check_query_permissions$fn__42192.invoke(permissions.clj:64)"
  "query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__43667.invoke(pre_alias_aggregations.clj:40)"
  "query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__42390.invoke(cumulative_aggregations.clj:61)"
  "query_processor.middleware.resolve_joins$resolve_joins$fn__44199.invoke(resolve_joins.clj:183)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__39133.invoke(add_implicit_joins.clj:245)"
  "query_processor.middleware.limit$limit$fn__42989.invoke(limit.clj:38)"
  "query_processor.middleware.format_rows$format_rows$fn__42970.invoke(format_rows.clj:81)"
  "query_processor.middleware.desugar$desugar$fn__42456.invoke(desugar.clj:22)"
  "query_processor.middleware.binning$update_binning_strategy$fn__41490.invoke(binning.clj:229)"
  "query_processor.middleware.resolve_fields$resolve_fields$fn__41998.invoke(resolve_fields.clj:24)"
  "query_processor.middleware.add_dimension_projections$add_remapping$fn__38669.invoke(add_dimension_projections.clj:272)"
  "query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__38889.invoke(add_implicit_clauses.clj:147)"
  "query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__39282.invoke(add_source_metadata.clj:105)"
  "query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__43864.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)"
  "query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__41131.invoke(auto_bucket_datetimes.clj:125)"
  "query_processor.middleware.resolve_source_table$resolve_source_tables$fn__42045.invoke(resolve_source_table.clj:46)"
  "query_processor.middleware.parameters$substitute_parameters$fn__43649.invoke(parameters.clj:97)"
  "query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__42097.invoke(resolve_referenced.clj:80)"
  "query_processor.middleware.expand_macros$expand_macros$fn__42712.invoke(expand_macros.clj:158)"
  "query_processor.middleware.add_timezone_info$add_timezone_info$fn__39313.invoke(add_timezone_info.clj:15)"
  "query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__46949.invoke(splice_params_in_response.clj:32)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__43875$fn__43879.invoke(resolve_database_and_driver.clj:33)"
  "driver$do_with_driver.invokeStatic(driver.clj:61)"
  "driver$do_with_driver.invoke(driver.clj:57)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__43875.invoke(resolve_database_and_driver.clj:27)"
  "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__42918.invoke(fetch_source_query.clj:243)"
  "query_processor.middleware.store$initialize_store$fn__46958$fn__46959.invoke(store.clj:11)"
  "query_processor.store$do_with_store.invokeStatic(store.clj:46)"
  "query_processor.store$do_with_store.invoke(store.clj:40)"
  "query_processor.middleware.store$initialize_store$fn__46958.invoke(store.clj:10)"
  "query_processor.middleware.cache$maybe_return_cached_results$fn__41974.invoke(cache.clj:208)"
  "query_processor.middleware.validate$validate_query$fn__46967.invoke(validate.clj:10)"
  "query_processor.middleware.normalize_query$normalize$fn__43016.invoke(normalize_query.clj:22)"
  "query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__39151.invoke(add_rows_truncated.clj:36)"
  "query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__46934.invoke(results_metadata.clj:128)"
  "query_processor.middleware.constraints$add_default_userland_constraints$fn__42333.invoke(constraints.clj:42)"
  "query_processor.middleware.process_userland_query$process_userland_query$fn__43738.invoke(process_userland_query.clj:136)"
  "query_processor.middleware.catch_exceptions$catch_exceptions$fn__42276.invoke(catch_exceptions.clj:174)"
  "query_processor.reducible$async_qp$qp_STAR___37952$thunk__37953.invoke(reducible.clj:101)"
  "query_processor.reducible$async_qp$qp_STAR___37952.invoke(reducible.clj:107)"
  "query_processor.reducible$sync_qp$qp_STAR___37961$fn__37964.invoke(reducible.clj:133)"
  "query_processor.reducible$sync_qp$qp_STAR___37961.invoke(reducible.clj:132)"
  "query_processor$process_userland_query.invokeStatic(query_processor.clj:218)"
  "query_processor$process_userland_query.doInvoke(query_processor.clj:214)"
  "query_processor$fn__47133$process_query_and_save_execution_BANG___47142$fn__47145.invoke(query_processor.clj:233)"
  "query_processor$fn__47133$process_query_and_save_execution_BANG___47142.invoke(query_processor.clj:225)"
  "query_processor$fn__47177$process_query_and_save_with_max_results_constraints_BANG___47186$fn__47189.invoke(query_processor.clj:245)"
  "query_processor$fn__47177$process_query_and_save_with_max_results_constraints_BANG___47186.invoke(query_processor.clj:238)"
  "api.dataset$fn__50475$fn__50478.invoke(dataset.clj:52)"
  "query_processor.streaming$streaming_response_STAR_$fn__33990$fn__33991.invoke(streaming.clj:73)"
  "query_processor.streaming$streaming_response_STAR_$fn__33990.invoke(streaming.clj:72)"
  "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:66)"
  "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:64)"
  "async.streaming_response$do_f_async$fn__23079.invoke(streaming_response.clj:85)"],
 :context :ad-hoc,
 :error "Required parameter metrics must be specified.",
 :row_count 0,
 :running_time 0,
 :preprocessed
 {:database 35,
  :query
  {:source-table 143,
   :fields
   [[:field-id 1570]
    [:field-id 1542]
    [:field-id 1488]
    [:field-id 1515]
    [:field-id 1527]
    [:field-id 1495]
    [:field-id 1529]
    [:field-id 1568]
    [:field-id 1510]
    [:field-id 1683]
    [:field-id 1648]
    [:field-id 1599]
    [:field-id 1569]
    [:field-id 1691]
    [:field-id 1487]
    [:field-id 1649]
    [:field-id 1464]
    [:field-id 1631]
    [:field-id 1626]
    [:field-id 1611]
    [:field-id 1519]
    [:field-id 1613]
    [:field-id 1704]
    [:field-id 1583]
    [:field-id 1667]
    [:field-id 1632]
    [:field-id 1609]
    [:field-id 1581]
    [:field-id 1587]
    [:field-id 1549]
    [:field-id 1622]
    [:field-id 1605]
    [:field-id 1550]
    [:field-id 1578]
    [:field-id 1551]
    [:field-id 1482]
    [:field-id 1489]
    [:field-id 1612]
    [:field-id 1567]
    [:field-id 1690]
    [:field-id 1516]
    [:field-id 1646]
    [:field-id 1494]
    [:field-id 1467]
    [:field-id 1555]
    [:field-id 1506]
    [:field-id 1572]
    [:field-id 1582]
    [:field-id 1643]
    [:datetime-field [:field-id 1694] :default]
    [:field-id 1521]
    [:field-id 1531]
    [:field-id 1714]
    [:field-id 1710]
    [:field-id 1537]
    [:field-id 1670]
    [:field-id 1530]
    [:field-id 1474]
    [:field-id 1562]
    [:field-id 1545]
    [:field-id 1571]
    [:field-id 1557]
    [:field-id 1573]
    [:field-id 1548]
    [:field-id 1709]
    [:field-id 1486]
    [:field-id 1601]
    [:field-id 1608]
    [:field-id 1544]
    [:field-id 1528]
    [:field-id 1471]
    [:field-id 1584]
    [:field-id 1652]
    [:field-id 1703]
    [:field-id 1553]
    [:field-id 1700]
    [:field-id 1689]
    [:field-id 1702]
    [:field-id 1699]
    [:field-id 1645]
    [:field-id 1657]
    [:field-id 1701]
    [:field-id 1511]
    [:field-id 1493]
    [:field-id 1468]
    [:field-id 1485]
    [:field-id 1625]
    [:field-id 1552]
    [:field-id 1565]
    [:field-id 1713]
    [:field-id 1502]
    [:field-id 1707]
    [:field-id 1577]
    [:field-id 1472]
    [:field-id 1650]
    [:field-id 1463]
    [:field-id 1697]
    [:field-id 1514]
    [:field-id 1536]
    [:field-id 1480]
    [:field-id 1618]
    [:field-id 1503]
    [:field-id 1504]
    [:field-id 1579]
    [:field-id 1591]
    [:field-id 1541]
    [:field-id 1679]
    [:field-id 1653]
    [:field-id 1558]
    [:field-id 1604]
    [:field-id 1492]
    [:field-id 1673]
    [:field-id 1576]
    [:field-id 1682]
    [:field-id 1680]
    [:field-id 1520]
    [:field-id 1473]
    [:field-id 1666]
    [:field-id 1630]
    [:field-id 1563]
    [:field-id 1499]
    [:field-id 1663]
    [:field-id 1658]
    [:field-id 1617]
    [:field-id 1513]
    [:field-id 1616]
    [:field-id 1619]
    [:field-id 1496]
    [:field-id 1688]
    [:field-id 1538]
    [:field-id 1524]
    [:field-id 1539]
    [:field-id 1633]
    [:field-id 1556]
    [:field-id 1517]
    [:field-id 1535]
    [:field-id 1656]
    [:field-id 1677]
    [:field-id 1469]
    [:field-id 1668]
    [:field-id 1662]
    [:field-id 1638]
    [:field-id 1671]
    [:field-id 1603]
    [:field-id 1676]
    [:field-id 1588]
    [:field-id 1640]
    [:field-id 1660]
    [:field-id 1564]
    [:field-id 1695]
    [:field-id 1600]
    [:field-id 1659]
    [:field-id 1708]
    [:field-id 1698]
    [:field-id 1497]
    [:field-id 1665]
    [:field-id 1642]
    [:field-id 1651]
    [:field-id 1610]
    [:field-id 1574]
    [:field-id 1522]
    [:field-id 1672]
    [:field-id 1546]
    [:field-id 1627]
    [:field-id 1526]
    [:field-id 1674]
    [:field-id 1614]
    [:field-id 1475]
    [:field-id 1500]
    [:field-id 1484]
    [:field-id 1523]
    [:field-id 1692]
    [:field-id 1712]
    [:field-id 1686]
    [:field-id 1696]
    [:field-id 1684]
    [:field-id 1586]
    [:field-id 1491]
    [:field-id 1507]
    [:field-id 1560]
    [:field-id 1561]
    [:field-id 1647]
    [:field-id 1623]
    [:field-id 1687]
    [:field-id 1534]
    [:field-id 1525]
    [:field-id 1711]
    [:field-id 1476]
    [:field-id 1654]
    [:field-id 1543]
    [:field-id 1479]
    [:field-id 1483]
    [:field-id 1620]
    [:field-id 1585]
    [:field-id 1693]
    [:field-id 1641]
    [:field-id 1597]
    [:field-id 1607]
    [:field-id 1547]
    [:field-id 1664]
    [:field-id 1621]
    [:field-id 1596]
    [:field-id 1490]
    [:field-id 1681]
    [:field-id 1706]
    [:field-id 1624]
    [:field-id 1505]
    [:field-id 1635]
    [:field-id 1470]
    [:field-id 1533]
    [:field-id 1512]
    [:field-id 1559]
    [:field-id 1655]
    [:field-id 1602]
    [:field-id 1509]
    [:field-id 1675]
    [:field-id 1508]
    [:field-id 1606]
    [:field-id 1661]
    [:field-id 1715]
    [:field-id 1518]
    [:field-id 1498]
    [:field-id 1593]
    [:field-id 1540]
    [:field-id 1501]
    [:field-id 1629]
    [:field-id 1595]
    [:field-id 1580]
    [:field-id 1466]
    [:field-id 1628]
    [:field-id 1685]
    [:field-id 1636]
    [:field-id 1592]
    [:field-id 1639]
    [:field-id 1678]
    [:field-id 1566]
    [:field-id 1590]
    [:field-id 1598]
    [:field-id 1634]
    [:field-id 1477]
    [:field-id 1465]
    [:field-id 1594]
    [:field-id 1532]
    [:field-id 1481]
    [:field-id 1575]
    [:field-id 1644]
    [:field-id 1589]
    [:field-id 1478]
    [:field-id 1705]
    [:field-id 1554]
    [:field-id 1669]
    [:field-id 1615]
    [:field-id 1637]],
   :limit 2000},
  :type :query,
  :middleware {:add-default-userland-constraints? true},
  :info
  {:executed-by 1,
   :context :ad-hoc,
   :nested? false,
   :query-hash [71, -85, 35, -60, 2, -25, 118, -20, 0, 19, 20, 101, 45, 116, -117, 99, -112, 60, -31, -74, 91, 104, -44, 0, 15, -31, 113, -37, 34, 25, 112, 98]},
  :constraints {:max-results 10000, :max-results-bare-rows 2000}},
 :data {:rows [], :cols []}}

@jcandalino You’re welcome to open an issue on it, but without being able to reproduce it, it’s a lot more difficult to fix things:
https://github.com/metabase/metabase/issues/new/choose

Ok, I’ll open an issue. I figured I’d ask here first before opening a ticket.

Thanks for the help. :slight_smile:

1 Like

I’m also having the exact problem. @jcandalino were you able to figure out what was going on?

@gootik There hasn’t been opened an issue on this, so you’re welcome to do so.

I haven’t figured it out yet and haven’t had a moment to open a bug report either. I’ll try to do so today.

There’s now an issue open on this:
https://github.com/metabase/metabase/issues/12411 - upvote by clicking :+1: on the first post