Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set these extra settings? #9

Open
leearmstrong opened this issue Nov 10, 2024 · 5 comments
Open

How to set these extra settings? #9

leearmstrong opened this issue Nov 10, 2024 · 5 comments

Comments

@leearmstrong
Copy link

leearmstrong commented Nov 10, 2024

Hi there,

I'm getting an error when importing a file.

Conversion Error: CSV Error on Line: 80048
Original Line: 
NZ,1336,,,AKL,AKL,NZ,IUE,IUE,NU,0705,1035,P,00330, 2     ,00,,,,,32S,32N,J,0165,0020.0,Y,B,M,H,Q,V,W,T,L,S,,,II,20250107,20250107,AKLIUE,L,0001544,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,I,
Error when converting column "column12". Could not convert string "P" to 'BIGINT'

Column column12 is being converted as type BIGINT
This type was auto-detected from the CSV file.
Possible solutions:
* Override the type for this column manually by setting the type explicitly, e.g. types={'column12': 'VARCHAR'}
* Set the sample size to a larger value to enable the auto-detection to scan more values, e.g. sample_size=-1
* Use a COPY statement to automatically derive types from an existing table.

file=/Users/temp/Desktop/temp.csv
delimiter = , (Auto-Detected)
quote = " (Auto-Detected)
escape = " (Auto-Detected)
new_line = \r\n (Auto-Detected)
header = false (Auto-Detected)
skip_rows = 0 (Auto-Detected)
comment = \0 (Auto-Detected)
date_format =  (Auto-Detected)
timestamp_format =  (Auto-Detected)
null_padding=0
sample_size=20480
ignore_errors=false
all_varchar=0

Within the possible solutions it looks like we can do column overrides or a "COPY" statement. Where are the instructions for where to do this please?

@huyphams
Copy link

Hi if you are using the latest release, you can drag the CSV into the workspace and there is a custom import.
Screenshot 2024-11-25 at 08 55 27

@leearmstrong
Copy link
Author

I am running 1.2.0 (24) and the options that are mentioned in the error are not available.

@huyphams
Copy link

Hi @leearmstrong it is
Screenshot 2024-11-25 at 1 33 49 PM

The issue were the auto detect type error, it thinks some string columns are bigint which end up could not be imported.

@huyphams
Copy link

So you could choose all columns are strings or limit the allowed data type to Varchar (the first solution).

@leearmstrong
Copy link
Author

Ok, I guess that works. But can I set Override the type for this column manually by setting the type explicitly, e.g. types={'column12': 'VARCHAR'} anywhere in the UI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants