Skip to content

How to set these extra settings? #9

Open

Description

@leearmstrong

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?

Activity

  1. huyphams commented on Nov 25, 2024

    @huyphams

    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

  2. leearmstrong commented on Nov 25, 2024

    @leearmstrong
    Author

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

  3. huyphams commented on Nov 25, 2024

    @huyphams

    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.

  4. huyphams commented on Nov 25, 2024

    @huyphams

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

  5. leearmstrong commented on Nov 25, 2024

    @leearmstrong
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions