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

Decimal and stringset import not working as expected #189

Open
jayalakshmi-rm opened this issue Sep 22, 2023 · 0 comments
Open

Decimal and stringset import not working as expected #189

jayalakshmi-rm opened this issue Sep 22, 2023 · 0 comments

Comments

@jayalakshmi-rm
Copy link

Please run the below sample,
create table account(_id id, username string, salary int, balance decimal(2), account_type stringset);

BULK INSERT INTO account(_id, username, salary, balance, account_type) MAP(0 id, 1 STRING, 2 int, 3 decimal(2), 4 stringset) FROM '/home/account.csv' WITH BATCHSIZE 100000 FORMAT 'CSV' INPUT 'FILE';

account.csv
12,erin,85000,334.43,"checking" 12,erin,85000,334.43,"savings" 12,erin,85000,334.43,"test" 13,will,90000,111.13,"savings" 14,john,35000,999.22,"savings" 15,paul,50000,444.53,"checking,savings" 16,mary,40000,555.63,"checking,savings" 17,jack,95000,888.73,"savings" 19,dogg,85000,777.83,"checking,savings" 21,zoom,15000,222.93,"checking"

expected output for decimal(am showing first row alone)
12 | erin | 85,000 | 334.43 | checking, savings

but getting below result(Please check the decimal point of balance column)
12 | erin | 85,000 | 3.344 | checking, savings

Run below insert command to check the stringset issue
INSERT into account (_id, username, salary, balance, account_type) values (19, 'dogg', 25000,2.24, ['checking']);

expected output for stringset
19 | dogg | 85,000 | 7.778 | checking,savings

But getting below result
19 | dogg | 85,000 | 7.778 | checking, checking,savings

Kindly let us know how to frame stringset in single row in CSV file, Also please share how to import "2019-05-22T13:44" CSV data in timestamp bulk import

Thanks in advance

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