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

Allow importing CSVs without column names. #7831

Open
nicktobey opened this issue May 7, 2024 · 0 comments
Open

Allow importing CSVs without column names. #7831

nicktobey opened this issue May 7, 2024 · 0 comments
Labels

Comments

@nicktobey
Copy link
Contributor

Both MySQL and SQLite have an option when importing data to skip the first N rows of the source file:

MySQL: LOAD DATA INFILE ... IGNORE 1 ROWS
SQLite: .import --skip 1 ...

This is often used to skip the first row in a csv if it contains column names instead of data, but the skip value can also be deliberately omitted in order to treat the first row as data.

Dolt behaves differently: it always assumes that the first row contains column names, and there doesn't appear to be a way to force Dolt to treat the first row of a csv as data. This makes it impossible for Dolt to import csvs if they don't contain column names.

There should be a way to import these csvs into Dolt, whether it's via a --no-column-names flag, or by adding the --skip flag that matches SQLite (and implies no column names)

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

No branches or pull requests

1 participant