Skip to content

Database result transformations for better PostgreSQL compatibility #54

Description

@amotl

Dear @florinutz,

as I can see you've used more advanced dlt features (normalizers) in your other patch GH-49 than I have ever been able to learn, this request might be equally easy to pull off for you: Within the patch referenced below, you can find another good chunk of integration tests of the popular ingestr ETL framework against CrateDB within the ingestr/main_test.py file, see diff.

Unfortunately, the patch never landed, mostly because it wasn't really ready for merging, because it included constructs like this:

# Compensate for CrateDB types and insert order.
if dest_connection_url.startswith("cratedb://"):
    assert (1, "val1", 1640995200000) in res
    assert (2, "val2", 1643673600000) in res
else:
    assert res[0] == (1, "val1", as_datetime("2022-01-01"))
    assert res[1] == (2, "val2", as_datetime("2022-02-01"))

For everyone using CrateDB, the difference is obvious. Everyone else might think "what the ....?". In this spirit, it would be so cool to bring a corresponding dlt component into the mix that could do the job of converting datetime fields so that dlt does not "see" any difference to PostgreSQL in this regard. Do you think it is possible to wrap this into dlt-cratedb so it becomes a no-brainer for the average user?

With kind regards,
Andreas.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions