Describe the problem
It is currently not possible to use IMPORT INTO for importing data into a table which uses a reserved keyword as a column name. reserved keywords
To Reproduce
create table test ("group" integer, "value" text);
root@:26257/kred> IMPORT INTO test ("group", "value") CSV DATA ('nodelocal:///cockroach/csv/test.csv') WITH skip='1';
pq: verifying target columns: column "\"group\"" does not existtest.csv:
"group", "value"
1,"test"
2,"test"
3,"test"
Expected behavior
A clear and concise description of what you expected to happen.
Environment:
cockroach sql Additional context
What was the impact?
I'm trying to convert a non-SQL database into cockroach so the current database is not restricted by using sql reserved keywords, hence certain tables will end up containing reserved keywords. A possible migration of these values will be easier later than prior to importing due to the current database architecture.
Hello, I am Blathers. I am here to help you get the issue triaged.
Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.
I have CC'd a few people who may be able to assist in helping you:
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.
Hello, I am Blathers. I am here to help you get the issue triaged.
Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.
I have assigned a few people who may be able to assist you:
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.
Edit: this was an otan test. Welcome to the world of auto-assign :>
I will let Bulk IO take this one.
This is already fixed by #45944 for 20.1, though I guess maybe we should backport that to 19.2.x.
@dt I'm happy to take a stab at it over the weekend but it'd be nice to have it backported for both myself and others that may not want to upgrade to a dev-version yet are still affected by this bug.
I started it over on https://github.com/cockroachdb/cockroach/pull/47796 but haven't had a chance to dig into the CI flake there yet, but hope to do so tomorrow.
Most helpful comment
I started it over on https://github.com/cockroachdb/cockroach/pull/47796 but haven't had a chance to dig into the CI flake there yet, but hope to do so tomorrow.