on 12-27-2021 2:38 PM
I'm developing a CAP Project, and I have a big CSV file.
I need an ID column as a uuid
example CSV File:
Current:
user,task,complited
user1,"finish project",1
user2,"start project",2
user3,"start project",1
Needed:
ID,user,task,complited
7e2f2630-6866-4dcf-8f4d-3027aa831234,user1,"finish project",1
7e2f2630-6866-4dcf-8f4d-3027aa831235,user2,"start project",2
I need that the import task will generate UUID column with values in order for row ID.
How can i do it from the import wizard in the HANA DB explorer?
Thanks vitaliy.rudnytskiy
But i found a solution for this, just need to run 3 sqls after importing the DATA.
-- this table has no keys
create column table email_nokey as (
select EMAILADDRESS, EMAIL_MIRR from "DEVDUDE"."EMAIL_ADR");
-- add a field for the new key
alter table email_nokey add (UUID varbinary(16));
-- fill with unique values
update email_nokey set uuid = sysuuid;
-- activate primary key constraint
alter table email_nokey add primary key (uuid);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.