title: Error handling external file: 'Inserting value to batch for column type DATE failed. Invalid argument provided.'
body: <p>I am reading parquet file and I found the two columns that cause this problem:</p>
  <pre><code>SELECT
  TOP 100 
  POST_SEARCH_DATE,
  SEARCH_DATE 
  
  FROM
  OPENROWSET(
      BULK 'https://test/refined-parquet/data/v1.0/loaddt=2022-01-01/**',
      FORMAT = 'PARQUET'
      
  ) AS [result]
  </code></pre>
  <p>These columns contain values that are undefined and I have tried the following to get rid of the error, yet it persists.</p>
  <pre><code>SELECT
  TOP 100 
  POST_SEARCH_DATE,
  SEARCH_DATE
  
  FROM
  OPENROWSET(
      BULK 'https://test/refined-parquet/data/v1.0/loaddt=2022-01-01/**',
      FORMAT = 'PARQUET'
      
  ) AS [result]
  WHERE cast(POST_SEARCH_DEPARTURE_DATE as varchar(100))!= 'undefined'
  and cast (SEARCH_DEPARTURE_DATE as varchar(100)) != 'undefined'
  </code></pre>
  <p>The code from above will throw the same:</p>
  <blockquote>
  <p>Error handling external file: 'Inserting value to batch for column type DATE failed. Invalid argument provided.'.</p>
  </blockquote>
  <p>I also tried the following for one column:</p>
  <pre><code>SELECT
  TOP 100 
  POST_SEARCH_DATE,
  SEARCH_DATE
  
  FROM
  OPENROWSET(
      BULK 'https://test/refined-parquet/data/v1.0/loaddt=2022-01-01/**',
      FORMAT = 'PARQUET'
      
  ) with (POST_SEARCH_DATEVARCHAR(60)) AS [result]
  </code></pre>
  <p>But this throws the following:</p>
  <blockquote>
  <p>Error handling external file: 'Converting value to batch for column POST_SEARCH_DEPARTURE_DATE failed. Invalid argument provided.'</p>
  </blockquote>
  <p>As instructed, no rows cannot be removed from this raw file and I am unsure how to solve this problem. Any suggestion is welcome.</p>