duckdb: DuckDB JDBC doesnt seem to work with timestamps in Tableau

What happens?

I’ve connected tableau desktop (Mac) to duckdb via ‘Other Database (JDBC)’ as described here https://brocktibert.medium.com/use-tableau-to-connect-to-duckdb-e92daad6e7b4

The connection works, and I can see the schema. However when I preview the data I get this error: image

In tableau workbook I can work with the varchar fields as dimensions, however whenever I try to use the timestamp fields (truncated to some lower granularity like hour or year) I get the following error image

Are there any known issues with working with timestamps in tableau using the jdbc connector? I am using the ~SQL92~ Postgres dialect in the JDBC datasource setup wizard in tableau. I have also tried setting it up using the ~Postgres~ SQL92 dialect, and got a different error in the worksheet when trying to work with the timestamp field.

My duckdb database reads from parquet files stored locally I am on

  • MacOS 13.3.1
  • duckdb v0.7.1 b00b93f0b1
  • tableau desktop 2023.1

To Reproduce

duckdb database.duckdb CREATE TABLE f_cj_events_v2 AS SELECT * FROM read_parquet(‘/path/to/*.parquet’); CHECKPOINT;

(the database needs to include a timestamp field)

(copy duckdb_jdbc-0.7.1 to ~/Library/Tableau/Drivers) MacOS

(in tableau desktop) Create datasource -> other JDBC -> jdbc:duckdb:///path_to/database.duckdb Drag the timestamp field to a column, set the granularity to ‘Hour’

OS:

MacOS 13.3.1

DuckDB Version:

0.7.1

DuckDB Client:

Tableau (JDBC)

Full Name:

Ryan Rozich

Affiliation:

Self

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 21 (13 by maintainers)

Commits related to this issue

Most upvoted comments

I got the latest nightly JDBC installed and also CLI, and looks like the errors I was seeing with the truncation timestamp aggregation are fixed!

image

quick note if anyone else wants to run from the latest: you will likely need to rebuild your database files from the same nightly build as the JDBC driver.

Also, if you want the bleeding edge build from master, just go to the installation page and choose macOS/Github master. It will download the binaries that you can directly execute.