CSV Import fails

已回答

Trying to import a 6 column CSV into a Azure SQL database table via the DataGrip import feature.

I'm setting all columns to VARCHAR(MAX) datatype as I have no need for typing in a quick bit of analysis I want to do.

Import creates the table fine then fails with error:

class java.lang.String cannot be cast to class java.lang.Number

I'm not trying to cast any string field as a number so this is confusing.

Anyone encountered this before? Thanks.

0

This should be fixed in latest version, please update to 2021.3.4 or try [EAP].

1

Thanks Yuriy. I am on 2021.3.4 

DataGrip 2021.3.4
Build #DB-213.6777.22, built on January 19, 2022
Licensed to ...
Subscription is active until November 4, 2022.
Runtime version: 11.0.13+7-b1751.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Non-Bundled Plugins:
    bundled-datagrip-help (213.6777.22)

I'll try the EAP release later on.

 

 

0

Hi, it didn't work with 2021.3.4  but I can confirm that for me EAP worked

0

Hi, I got the same error message when trying to import a similar CSV file.

In my case, the problem was that I was assuming UTF-8 encoding while the file was ISO-8859-1. 

Specifying the right encoding solved my problem. The error message was confusing though :)

0

请先登录再写评论。