relferreira / metabase-sparksql-databricks-driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Group by Week gives an error

ValdarT opened this issue · comments

I get an error when using Group by "Week". Works fine with Day, Month, etc.

The official Spark driver got updated a while ago so perhaps best to inherit from that?

Hello @ValdarT, sorry for the delay.

Can you please give me more context about "Group by week". It is an option available on a chart?

Sorry for not being clearer: I mean the Group By option in the query builder (selecting "by week" results in error).

image

I get this error too. Here is more detail:

[Databricks][DatabricksJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: org.apache.hive.service.cli.HiveSQLException: Error running query: [INCONSISTENT_BEHAVIOR_CROSS_VERSION.DATETIME_PATTERN_RECOGNITION] org.apache.spark.SparkUpgradeException: [INCONSISTENT_BEHAVIOR_CROSS_VERSION.DATETIME_PATTERN_RECOGNITION] You may get a different result due to the upgrading to Spark >= 3.0: Fail to recognize 'u' pattern in the DateTimeFormatter. 1) You can set "legacy_time_parser_policy" to "LEGACY" to restore the behavior before Spark 3.0. 2) You can form a valid datetime pattern with the guide from https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html.