Skip to content

sql_database doesn't support INTERVAL #2513

@waterworthd-cim

Description

@waterworthd-cim

Feature description

I have a postgres source that has an INTERVAL datatype and I'm using sql_database as I'm using my own incremental strategy based on xmin. I'm getting a warning as sqltypes.INTERVAL is not one of the handled data types

Then later on, I get an error

dlt.pipeline.exceptions.PipelineStepFailed: Pipeline execution failed at stage extract when processing package 1744337717.574294 with exception:

<class 'TypeError'>
Type is not JSON serializable: datetime.timedelta

Are you a dlt user?

Yes, I run dlt in production.

Use case

I have source data with INTERVAL datatype

Proposed solution

Support INTERVAL / datetime.timedelta

Related issues

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions