Comments (5)
There's a shared implementation you can use for drivers that don't support the new Java 8 types. Just add to your call to driver/register!
– see the Redshift driver for example.
(driver/register! :presto, :parent #{:sql-jdbc ::legacy/use-legacy-classes-for-read-and-set})
Implementation is in this namespace.
from metabase-athena-driver.
I don't like how the "date" format includes the time, but maybe that's to be expected.
That's an oldie Metabase issue - see metabase/metabase#5859 or metabase/metabase#7494, or my catch-all issue that goes through the various date formatting issues and workarounds metabase/metabase#11394
from metabase-athena-driver.
Looking at Presto date/time types, we can see that there are a two that fail.
SELECT
DATE '2001-08-22' as type_date,
TIME '01:02:03.456' as type_time,
TIME '01:02:03.456 America/Los_Angeles' AS type_time_with_timezone,
TIMESTAMP '2001-08-22 03:04:05.321' AS type_timestamp,
TIMESTAMP '2001-08-22 03:04:05.321 America/Los_Angeles' AS type_timestamp_with_timezone,
INTERVAL '3' MONTH AS type_interval_year_to_month,
INTERVAL '2' DAY AS type_interval_day_to_second
type_date
and type_timestamp
return empty values.
In the console logs, we see a couple corresponding error messages:
For column 1 (DATE
data type):
01-03 22:41:20 ERROR sql-jdbc.execute :: Error reading :athena column 1 type_date DATE
java.sql.SQLNonTransientException: [Simba][JDBC](11040) Invalid type for data - parameter: 1, type: java.time.LocalDate.
at com.simba.athena.exceptions.ExceptionConverter.toSQLException(Unknown Source)
at com.simba.athena.jdbc.jdbc41.utilities.ResultSetUtilities.getObjectByType(Unknown Source)
at com.simba.athena.jdbc.jdbc41.S41ForwardResultSet.getObject(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getObject(NewProxyResultSet.java:217)
at metabase.driver.sql_jdbc.execute$get_object_of_class.invokeStatic(execute.clj:66)
For column 4 (TIMESTAMP
data type):
01-03 22:41:20 ERROR sql-jdbc.execute :: Error reading :athena column 4 type_timestamp TIMESTAMP
java.sql.SQLNonTransientException: [Simba][JDBC](11040) Invalid type for data - parameter: 4, type: java.time.LocalDateTime.
at com.simba.athena.exceptions.ExceptionConverter.toSQLException(Unknown Source)
at com.simba.athena.jdbc.jdbc41.utilities.ResultSetUtilities.getObjectByType(Unknown Source)
at com.simba.athena.jdbc.jdbc41.S41ForwardResultSet.getObject(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getObject(NewProxyResultSet.java:217)
at metabase.driver.sql_jdbc.execute$get_object_of_class.invokeStatic(execute.clj:66)
from metabase-athena-driver.
It seems like the Athena JDBC driver doesn't support the java.time.LocalDate
or java.time.LocalDateTime
types.
It looks like we can switch back to the legacy implementation, but I want to confirm what the differences are.
This might be a good opportunity to write some basic tests that run directly against Athena. I will spend some time on #12.
from metabase-athena-driver.
New version with "legacy" fix:
Looks like we get the same results. I don't like how the "date" format includes the time, but maybe that's to be expected.
from metabase-athena-driver.
Related Issues (20)
- How to set time zone in driver properly HOT 1
- Metabase in Athena: The Percentile function doesn't work. HOT 3
- Athena data source continuously trigger unexpected queries HOT 4
- Glue availability check failed due to missing permission HOT 4
- The character 'ß' leads to a JDBC error when using it in a local SQL Query HOT 11
- Compatibility with Metabase v.0.44.2 HOT 1
- Error message not found: ATHENA_CLIENT_ERROR HOT 12
- Driver doesn't work anymore on latest metabase version 0.44.3 HOT 3
- Getting no fields found for an athena table HOT 12
- field filter issue when using default database to connect to HOT 3
- Chart do not work while selecting date range in days/weeks/months HOT 7
- Have multiple sets of permissions using different roles HOT 3
- Athena Query Result feature not working HOT 3
- No fields found with dynamoDB HOT 3
- Metabase v0.45 with native Athena support HOT 5
- Managed Tables are Not Synced in Metabase HOT 2
- v0.41 Compatibility HOT 1
- How to query Databases/Tables from a catalog different from the default one (AwsDefaultCatalog) HOT 4
- connection timeout HOT 3
- IAM Policy Changes - Athena HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metabase-athena-driver.