PolyBase Error .

Rakesh Dhar 96 Reputation points
2021-04-01T18:11:36.54+00:00

From last 2 days ...,scratching head for this problem .
funny part ... in afternoon hours this gets executed successfully .., while in evening hours the same file when we create and try to select external table . it gives this problem .

105083;The following columns in the user defined schema are incompatible with the external table schema for table 'ET_DFI_OUTPUT_CSV_Test': user defined column: ([ITEM_LABEL] NVARCHAR(2000) COLLATE SQL_Latin1_General_CP1_CI_AS) is not compatible with the type of detected external table column: ([item_label] INT), user defined column: ([ANSWER_VALUE] NVARCHAR(2000) COLLATE SQL_Latin1_General_CP1_CI_AS) is not compatible with the type of detected external table column: ([answer_value] INT). The detected external table

any idea / guess in which direction i should go .. Both the columns data can be ..either 1,2,3 or 1,1a,2b,3
our source is CSV created by powershell .

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,653 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,793 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,551 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CathyJi-MSFT 21,081 Reputation points Microsoft Vendor
    2021-04-02T06:16:57.813+00:00

    Hi @Rakesh Dhar ,

    > The following columns in the user defined schema are incompatible with the external table schema for table 'ET_DFI_OUTPUT_CSV_Test': user defined column: ([ITEM_LABEL] NVARCHAR(2000) COLLATE SQL_Latin1_General_CP1_CI_AS) is not compatible with the type of detected external table column: ([item_label] INT),

    According to MS document, the column definitions, including the data types and number of columns, must match the data in the external files. If there's a mismatch, the file rows will be rejected when querying the actual data.


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.

    0 comments No comments