Open max-arnold opened 9 months ago
YDB CLI 2.8.0, Serverless YDB
CREATE TABLE users ( id String NOT NULL, email Utf8 NOT NULL, INDEX idx_email GLOBAL SYNC ON (email), PRIMARY KEY (id) );
id|email 12345|user@example.com
ydb --endpoint ydb.serverless.yandexcloud.net:2135 --database /ru-central1/xx/yy --sa-key-file yc-service-account-key.json yql -f tables.sql ydb --endpoint ydb.serverless.yandexcloud.net:2135 --database /ru-central1/xx/yy --sa-key-file yc-service-account-key.json import file csv -p users --header --delimiter="|" --null-value "" --input-file users.csv ydb --endpoint ydb.serverless.yandexcloud.net:2135 --database /ru-central1/xx/yy --sa-key-file yc-service-account-key.json yql -s 'select * from users' ┌───────┬────┐ │ email │ id │ ├───────┼────┤ └───────┴────┘
The import works if the index is async.
Was told in the TG chat that the BulkUpsert method doesn't work with sync indexes. Two suggestions then:
YDB CLI 2.8.0, Serverless YDB
The import works if the index is async.