Dates problem from Oracle to Databricks Parquet insert

Erkus, John G 1 Reputation point
2022-07-18T06:26:23.993+00:00

Hi All

I have created ADF pipelines to move data from Oracle into Databricks - Parquet file
But I am getting the error at below

Failure happened on 'Source' side. ErrorCode=UserErrorUnclassifiedError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Odbc Operation Failed.,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.ArgumentOutOfRangeException,Message=Year, Month, and Day parameters describe an un-representable DateTime.,Source=mscorlib,'

Please advise

Thanks
Gok

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,527 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,646 Reputation points Moderator
    2022-07-19T06:56:09.52+00:00

    Hello @Erkus, John G ,

    Thanks for the question and using MS Q&A platform.

    You may get this error if the datetime column in your oracle view has some dates with negative year in BC like e.g. -0107-12-04. You need to find those records and exclude it while loading the data as ADF does not supports that. Something like below in your WHERE clause could help to identify those rows in your view - WHERE TO_NUMBER(TO_CHAR (<Column Name>, 'sYYYY')) <= 0.

    Please try using the setting "Skip incompatible rows" to filter out those records in the copy activity. (See screenshot below).

    222191-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.