how to insert a column in hive table by taking unique values from 5 different column in another hive table
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a hive table with the below schema.
Table A:
`li_number string
id1 string
id2 string
id3 string
id4 string
id5 string
id6 string
id7 string
id8 string
id9 string
id10 string
created_date date`
Table B:
`id string
created_date date`
From table A, i need to take unique id's from id1 to id10 and load them in table B id column. Also i need to load created date column with the current date of loading
I have achieved the same using an shell script and load statement of hive. but i need this to be done using only hive. Please help me.
load apache-hive
add a comment |Â
up vote
0
down vote
favorite
I have a hive table with the below schema.
Table A:
`li_number string
id1 string
id2 string
id3 string
id4 string
id5 string
id6 string
id7 string
id8 string
id9 string
id10 string
created_date date`
Table B:
`id string
created_date date`
From table A, i need to take unique id's from id1 to id10 and load them in table B id column. Also i need to load created date column with the current date of loading
I have achieved the same using an shell script and load statement of hive. but i need this to be done using only hive. Please help me.
load apache-hive
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a hive table with the below schema.
Table A:
`li_number string
id1 string
id2 string
id3 string
id4 string
id5 string
id6 string
id7 string
id8 string
id9 string
id10 string
created_date date`
Table B:
`id string
created_date date`
From table A, i need to take unique id's from id1 to id10 and load them in table B id column. Also i need to load created date column with the current date of loading
I have achieved the same using an shell script and load statement of hive. but i need this to be done using only hive. Please help me.
load apache-hive
I have a hive table with the below schema.
Table A:
`li_number string
id1 string
id2 string
id3 string
id4 string
id5 string
id6 string
id7 string
id8 string
id9 string
id10 string
created_date date`
Table B:
`id string
created_date date`
From table A, i need to take unique id's from id1 to id10 and load them in table B id column. Also i need to load created date column with the current date of loading
I have achieved the same using an shell script and load statement of hive. but i need this to be done using only hive. Please help me.
load apache-hive
load apache-hive
asked 2 mins ago
akr
34
34
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477896%2fhow-to-insert-a-column-in-hive-table-by-taking-unique-values-from-5-different-co%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password