slingdata-io / sling-cli

Sling is a CLI tool that extracts data from a source storage/database and loads it in a target storage/database.
https://docs.slingdata.io
GNU General Public License v3.0
299 stars 16 forks source link

Oracle DATE column should create DATETIME in target db #284

Closed SebastianArcq closed 1 month ago

SebastianArcq commented 1 month ago

Issue Description

When loading data from Oracle to Snowflake Sling creates a Snowflake DATE column in the target for the Oracle DATE column in the source (when using mode = incremental on intial load or mode = full-refresh).

Which seems logical, however: while the Snowflake DATE column is an actual date, as you would expect, the Oracle DATE column is actually a DATETIME column, and may include not only the date, but also the time down to the second. See this Stackoverflow question.

As a result, the time-part of the original data is lost.

Therefore, Sling should actually create a DATETIME column in Snowflake when there is a DATE column in Oracle.

flarco commented 1 month ago

What version are you using? This was fixed a few weeks back. Can update to latest? See https://github.com/slingdata-io/sling-cli/commit/e50980693545cb17611daefbad28bd98766fea05

SebastianArcq commented 1 month ago

Dang, I just upgraded to the latest version and it works. Thanks a lot - and sorry, I could have figured that out myself...