# Superset - Dremio Error 'datetime64\[ms\]' for timestamp field

**URL:** <https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827>\
**Category:** Uncategorized\
**Created:** [May 14, 2024, 2:44pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827 "2024-05-14T14:44:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ken/32/5784_2.png) [@Ken](https://community.dremio.com/u/Ken)\
**Post date:** [May 14, 2024, 2:44pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/1 "2024-05-14T14:44:50Z")

</div>

I connected Superset to Dremio and tried to visualise some data.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/2/27cc7df14766a4c7abd659e70d9fe95dfcac4516.png)

I want to use a **timestamp** field (called **started\_at** ) as the time column, but got \*\* Dremio error datetime64[ms] \*\* error

I confirm that this behaviour is specific only to timestamp data type. Reason is, when I switch to another column (as\_of\_date) with the data type **date** , it is fine without error.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/3/39e261b8c1c742919ed8e16acd6f4e8127f4208d.png)

============

I also verified that the SQL which superset sent to Dremio had no problem getting run on Dremio

 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/b/b1fac5693ff8bd5dfbd3b9db38f13bb1bfa79ebb.png)

Attached is the log file from superset pod on kubernetes.

[log.zip](https://community.dremio.com/uploads/short-url/1ybCq0zBcRvA4X6QSYV8NaBS5nL.zip) (1.8 KB)

---

<div class="post-metadata">

**Author:** ![Ken](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ken/32/5784_2.png) [@Ken](https://community.dremio.com/u/Ken)\
**Post date:** [May 14, 2024, 2:54pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/2 "2024-05-14T14:54:31Z")

</div>

Given that Dremio’s timesatmp field is basically date PLUS time, does it mean that I would not be able to plot timeseries data in superset where x-axis is a datetime series?

---

<div class="post-metadata">

**Author:** ![lenoyjacob](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lenoyjacob/32/3474_2.png) [@lenoyjacob](https://community.dremio.com/u/lenoyjacob)\
**Post date:** [May 14, 2024, 3:29pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/3 "2024-05-14T15:29:09Z")

</div>

@Ken Could you try again but with SQLAlchemy from this fork? [GitHub - lenoyjacob/sqlalchemy\_dremio: SQLAlchemy for Dremio via Flight interface.](https://github.com/lenoyjacob/sqlalchemy_dremio)

---

<div class="post-metadata">

**Author:** ![Ken](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ken/32/5784_2.png) [@Ken](https://community.dremio.com/u/Ken)\
**Post date:** [May 14, 2024, 3:38pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/4 "2024-05-14T15:38:02Z")

</div>

Thank you for the suggestion.

Looks like it might work because of the updated mapping for datetime64[ms] → types.datetime

> **[Comparing narendrans:master...lenoyjacob:master · narendrans/sqlalchemy\_dremio](https://github.com/narendrans/sqlalchemy_dremio/compare/master...lenoyjacob:sqlalchemy_dremio:master#diff-9deefcdbf269b1ac22873d58d61153c381ee4bb71719eff7f8404d0ebddcaf76R28-R33)**
>
> SQLAlchemy for Dremio via the ODBC and Flight interface. - Comparing narendrans:master...lenoyjacob:master · narendrans/sqlalchemy\_dremio

---

<div class="post-metadata">

**Author:** ![Ken](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ken/32/5784_2.png) [@Ken](https://community.dremio.com/u/Ken)\
**Post date:** [May 14, 2024, 3:57pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/5 "2024-05-14T15:57:36Z")

</div>

@lenoyjacob

Thank you so much for your suggestion.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/6/6db37ac107db5b47223eb66256d1c4799ec52710.png)

I am using the version in your fork and it is working.

Do we know when your fork could be merged back into the main repository?

---

<div class="post-metadata">

**Author:** ![Ken](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ken/32/5784_2.png) [@Ken](https://community.dremio.com/u/Ken)\
**Post date:** [May 14, 2024, 4:01pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/6 "2024-05-14T16:01:31Z")

</div>

I believe this PR would have a similar effect like your fork.

> <https://github.com/narendrans/sqlalchemy_dremio/pull/45#issuecomment-2110599575>
>
> Hi @dacopan , and maintainers,
> 
> !\[image\](https://github.com/narendrans/sqlalch…emy\_dremio/assets/57944769/84753260-21f3-48e1-9650-9acf044f54b2)
> 
> I am coming from the fork here
> 
> https://github.com/lenoyjacob/sqlalchemy\_dremio
> 
> 
> I raised the issue in dremio (see: https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827)
> 
> I got the suggestion to try out that fork, and it solved my issue of the Superset connection to Dremio for \*\*timestamp\*\* date type (which is \*\*datetime64\[ms\]\*\*)
> 
> ============
> 
> While this PR looks a bit different from the fork, I believe the main point is really just to add the mapping (https://github.com/narendrans/sqlalchemy\_dremio/pull/45/files#diff-9deefcdbf269b1ac22873d58d61153c381ee4bb71719eff7f8404d0ebddcaf76R32)
> 
> 
> For now, I am using the fork in my superset docker image.
> 
> 
> Is there any chance that this PR could get merged?
> 
> Thank you

I added a comment to chase the maintainer to see if the PR could be merged.

THank you!

---

<div class="post-metadata">

**Author:** ![Ken](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ken/32/5784_2.png) [@Ken](https://community.dremio.com/u/Ken)\
**Post date:** [May 31, 2024, 5:07pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/7 "2024-05-31T17:07:03Z")

</div>

It is a bit sad that there is no sign the PR is getting merged 😢

> [@Superset - Dremio Error 'datetime64\[ms\]' for timestamp field](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/6):
>
> I believe this PR would have a similar effect like your fork. I added a comment to chase the maintainer to see if the PR could be merged. THank you!

---

<div class="post-metadata">

**Author:** ![dacopan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dacopan/32/4289_2.png) [@dacopan](https://community.dremio.com/u/dacopan)\
**Post date:** [June 2, 2024, 7:33am UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/8 "2024-06-02T07:33:54Z")

</div>

I think that repo is abandoned, my PR is not merged yet.  
Any posibility that @naren transfer repo to another mantainer?  
or Dremio make a official repo? @balaji.ramaswamy or @lenoyjacob can you help here?

---

<div class="post-metadata">

**Author:** ![capnjosh](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@capnjosh](https://community.dremio.com/u/capnjosh)\
**Post date:** [June 7, 2024, 8:12pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/9 "2024-06-07T20:12:32Z")

</div>

Getting the sqlalchemy\_dremio pip package updated would really nice. It’s been hard to find the correct one to use. There are a number of packages that seem to aim to do the same thing, but they all seem to be out of date, even the Preset one.

This is the pip package that would be ideal to update:

> **[sqlalchemy-dremio](https://pypi.org/project/sqlalchemy-dremio/)**
>
> A SQLAlchemy dialect for Dremio via the Flight interface.

To clarify, when I install this package in Superset (any version), when I try to create a database connection to Dremio I get

```auto
Error: 'datetime64[ms]'

```

This user is one of the maintainers. Any chance they’re at Dremio? 😃

> **[Profile of chufedremio](https://pypi.org/user/chufedremio/)**
>
> The Python Package Index (PyPI) is a repository of software for the Python programming language.

If I install the package here, everything works: [GitHub - lenoyjacob/sqlalchemy\_dremio: SQLAlchemy for Dremio via Flight interface.](https://github.com/lenoyjacob/sqlalchemy_dremio)

I have an Ansible role that attempts to leverage the Superset github repo as much as possible, and I am making sure git is installed on all the docker containers that start up via the docker-compose-non-dev.yml file (by adding “apt update; apt install git -y” near the top of docker/docker-bootstrap.sh); I have also added “git+https://github.com/lenoyjacob/sqlalchemy\_dremio.git” to docker/requirements-local.yml file.

Figured I’d leave a description for someone else looking to solve this.

---

<div class="post-metadata">

**Author:** ![Ken](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ken/32/5784_2.png) [@Ken](https://community.dremio.com/u/Ken)\
**Post date:** [June 8, 2024, 2:16am UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/10 "2024-06-08T02:16:49Z")

</div>

For the record, I am also doing the same in my requirements.txt file.

```auto

# For connecting to dremio
# sqlalchemy_dremio==3.0.3
## datetime64[ms] issue here: https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827
git+https://github.com/lenoyjacob/sqlalchemy_dremio.git

```

It is working for me.

---

<div class="post-metadata">

**Author:** ![serra](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/serra/32/5535_2.png) [@serra](https://community.dremio.com/u/serra)\
**Post date:** [July 1, 2025, 1:44pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/11 "2025-07-01T13:44:00Z")

</div>

FWIW, looks like the required change was committed ([Add datetime64[ms] mapping · narendrans/sqlalchemy\_dremio@4b52351 · GitHub](https://github.com/narendrans/sqlalchemy_dremio/commit/4b52351d91f8e03c880648ff407b3e8851a54288)), but not yet published to Pypi.

---

<div class="post-metadata">

**Author:** ![serra](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/serra/32/5535_2.png) [@serra](https://community.dremio.com/u/serra)\
**Post date:** [November 14, 2025, 2:23pm UTC](https://community.dremio.com/t/superset-dremio-error-datetime64-ms-for-timestamp-field/11827/12 "2025-11-14T14:23:20Z")

</div>

I have published a forked version, see conversation here.

> <https://github.com/narendrans/sqlalchemy_dremio/issues/56#issuecomment-3532626335>
>
> I was happy to see the recent commit 4b52351 that would fix the \`KeyError: 'date…time64\[ms\]'\` I have been working around for quite some time now. Any thought on when this and the latest updates will be pushed to PyPi?
