简体   繁体   中英

problems in creating external table for azure synapse analytics

I am having difficulty creating external table in SMSS. I have the dataset stored in BLOB storage and try to load it from there in to external table. I keep getting this error:

HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: HadoopSqlException: Error converting data type NVARCHAR to INT

i used the following query

CREATE EXTERNAL TABLE [ext].[klant](
[number] [int] NOT NULL,
    [customer_id] [int] NOT NULL,
    [status] [nvarchar](50) NOT NULL,
    [shipping.postcode] [nvarchar](50) NOT NULL,
    [date_created] [datetime2](0) NOT NULL,
    [date_completed] [datetime2](0) NOT NULL,
    [shipping.address_1] [nvarchar](50) NOT NULL,
    [shipping.city] [nvarchar](50) NOT NULL
    )






WITH (
LOCATION='/customer/',
    DATA_SOURCE = storage,  
    FILE_FORMAT = fileformat,
    REJECT_TYPE = VALUE,
    REJECT_VALUE = 0


    );

I also tried to solve this problem in ADF by copying the data from source to table, but with no luck. I hope somebody could help me with this problem. thanks in advance

Thank you for verifying the CREATE EXTERNAL DATA SOURCE statement. Your specific issue is with one of the column definitions between what is defined in your CREATE EXTERNAL TABLE statement and what is actually in your data file.

Error converting data type NVARCHAR to INT

The data in the source data file, either the number column or customer_id column is nvarchar and trying to be stored as int. Do you have any extra characters in your data file? The error indicates a data type or column mismatch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM