Skip to content

Support microsecond precision in TDEngine databases#555

Merged
gtopper merged 2 commits intomlrun:developmentfrom
jond01:task/support-us-tdengine-precision
Mar 27, 2025
Merged

Support microsecond precision in TDEngine databases#555
gtopper merged 2 commits intomlrun:developmentfrom
jond01:task/support-us-tdengine-precision

Conversation

@jond01
Copy link
Member

@jond01 jond01 commented Mar 26, 2025

A part of the work on ML-9067 for storey's TDEngineTarget.

The possible timestamp precisions in TDEngine are:

  • ms - millisecond
  • us - microsecond
  • ns - nanosecond

See:
https://docs.tdengine.com/tdengine-reference/sql-manual/data-types/#timestamp
https://docs.tdengine.com/tdengine-reference/sql-manual/manage-databases/#create-database

We previously supported only ms - TDEngine's default.

The precision is set for the whole database. It is stored in the metadata database:
https://docs.tdengine.com/tdengine-reference/sql-manual/metadata/#ins_databases

Note: the ns precision is not natural in Python, so I do not expect it to be used.
I tested it while running an MLRun system test, and it works.

@jond01 jond01 force-pushed the task/support-us-tdengine-precision branch from 874b880 to 73c7429 Compare March 26, 2025 22:06
@jond01 jond01 closed this Mar 27, 2025
@jond01 jond01 reopened this Mar 27, 2025
@jond01 jond01 force-pushed the task/support-us-tdengine-precision branch from 4df1c59 to 138a9a4 Compare March 27, 2025 08:27
@jond01 jond01 requested a review from gtopper March 27, 2025 08:53
@gtopper gtopper changed the title Support micro-second precision in TDEngine databases Support microsecond precision in TDEngine databases Mar 27, 2025
@gtopper gtopper merged commit fb29f44 into mlrun:development Mar 27, 2025
3 checks passed
@jond01 jond01 deleted the task/support-us-tdengine-precision branch March 27, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants