keboola / db-extractor-mssql

MIT License
1 stars 2 forks source link

BCP export finishes but then fails #100

Closed Actimel closed 5 years ago

Actimel commented 5 years ago

Source: https://keboola.zendesk.com/agent/tickets/9663

The BCP export failed: Return value of Keboola\DbExtractor\Extractor\MSSQL::getLastFetchedDatetimeValue() must be of the type string, null returned. Attempting export using pdo_sqlsrv.

BCP successfully export items, but then fails on error above and continue with second export through PDO.

pivnicek commented 5 years ago

working on the test for this now.

pivnicek commented 5 years ago

confirmed that null values in a datetime column will do this. Also discovered a separate but related issue: if a table has a timestamp column (which is a legacy from pre 2008) incremental fetching by a different datetime column will also fallback to the pdo_srv with an exception on the same method with a different error.

pivnicek commented 5 years ago

here are the failing tests https://github.com/keboola/db-extractor-mssql/pull/101