SQL Server SSIS Data Flow sending "wrong" data values to destination

kq0g1dla  于 2023-05-16  发布在  其他
关注(0)|答案(1)|浏览(137)

I am loading many tables from MySQL (ODBC connection) to SQL Server (OLE DB connection).

I have a source column [updated_date] of type BIGINT that contains Unix time format such as 1613745401. I am pushing this column to my staging tables as NVARCHAR(100), to be translated later. For some reason, I get a completely different value, in this case 14975585452373553 (again, expected value is 1613745401)

The weird part is that the ETL works fine for all tables besides one

I've tried changing the destination column to BIGINT and same issue. I've also tried converting to varchar on the source, and it gave me a completely different value - 210456936497

Wondering if anyone has run into this before, because I'm completely stumped!

Update: The driver I'm using is MySQL ODBC Unicode 8.0.3 which I believe is the newest

cuxqih21

cuxqih211#

I had the same issue going from SQL to a flat file. SSMS returns the correct values, but output to flat file was converting '0' and '1' to 'True' or 'False' and data type in ssis kept defaulting to Boolean. Sometimes it would return the value '255' even though the column only had '1' or '0'. I had to alter the SQL table from BIT to INT and then go to Advanced Settings in the OLE DB data source to alter to 4 byte signed integer and also update the data type in the connection manager for the flat file to 4 byte signed integer.

相关问题