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

Copy from fails to import blob columns #13

Open
MichiganL opened this issue Dec 6, 2022 · 0 comments
Open

Copy from fails to import blob columns #13

MichiganL opened this issue Dec 6, 2022 · 0 comments

Comments

@MichiganL
Copy link

Hi,

ycqlsh fails to import blob columns using the copy from command (yugabyte version 2.14.3.1-b1).
I get the following error message:
Failed to import 1 rows: ParseError - Failed to parse 0xff : global name 'BlobType' is not defined, given up without retries Failed to process 1 rows; failed rows written to import_ks_test.err

Steps to reproduce the issue:

docker run --rm -d --name yugabyte yugabytedb/yugabyte:2.14.3.1-b1 bin/yugabyted start --daemon=false

docker exec -it yugabyte /bin/bash

ycqlsh

create keyspace ks;
-- create minimal table with a blob column
create table ks.test(key text primary key, value blob);
insert into ks.test(key, value) values('k1', 0xff);
copy ks.test to 'test.dump';

-- copying the table from the dump fails
copy ks.test from 'test.dump';

Failed to import 1 rows: ParseError - Failed to parse 0xff : global name 'BlobType' is not defined,  given up without retries
Failed to process 1 rows; failed rows written to import_ks_test.err

Adding the import "from cqlshlib.formatting import BlobType" to cqlsh/copyutil.py fixed the issue for me.

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

1 participant