Member since
05-18-2016
6
Posts
1
Kudos Received
0
Solutions
05-19-2016
12:16 PM
Well, i give up, i will use the command that works....heheh thanks to all...
... View more
05-18-2016
07:00 PM
Somehow, thats it i want, redundancy, only to improve the display command. Im reading the Eugene's link right now.
... View more
05-18-2016
06:36 PM
i will try explain what i want. case 1: INSERT INTO TABLE db_h_gss.tb_h_teste_insert PARTITION (cod_index=1) SELECT CAST(teste_1 AS VARCHAR(200)), CAST(teste_2 AS VARCHAR(200)), CAST(teste_3 AS VARCHAR(200)) FROM db_h_gss.tb_h_teste_orig; This command works, but i cant see which column "teste_1"(tb_h_teste_orig) corresponds in target table(tb_h_teste_insert) case 2 : INSERT INTO TABLE db_h_gss.tb_h_teste_insert
values(
teste_1, teste_2, teste_3, PARTITION (cod_index=1)
) from SELECT CAST(teste_1 AS VARCHAR(200)),
CAST(teste_2 AS VARCHAR(200)),
CAST(teste_3 AS VARCHAR(200))
FROM db_h_gss.tb_h_teste_orig ; This command doesnt work, but, you can see that i'm trying insert in "teste_1"(target table) the column "teste_1" from tb_h_teste_orig. Sorry my english, but my spanish is worse. thanks again
... View more
05-18-2016
05:43 PM
I already did the insert, this command worked : INSERT OVERWRITE TABLE db_h_gss.tb_h_teste_insert
PARTITION (cod_index=1)
SELECT
CAST(teste_1 AS VARCHAR(200)),
CAST(teste_2 AS VARCHAR(200)),
CAST(teste_3 AS VARCHAR(200))
FROM db_h_gss.tb_h_teste_orig
limit 100; But, now, im looking another way to insert data in target table(tb_h_teste_insert), where I show the fields\columns in the target table and the fields\columns corresponding of the source table. Thanks again.
... View more
05-18-2016
05:20 PM
Thanks Leonard, but, that is my problem, im looking a way to insert specifying the fields\columns in the target table. It is to improve the display command. The idea is to show that: Column A in target table corresponds to column A in table orig Thanks again.
... View more
05-18-2016
04:53 PM
1 Kudo
Hello, I want execute the follow sql : INSERT INTO TABLE db_h_gss.tb_h_teste_insert
values(
teste_2,
teste_3,
teste_1,
PARTITION (cod_index=1)
)
from
SELECT
CAST(teste_1 AS VARCHAR(200)),
CAST(teste_2 AS VARCHAR(200)),
CAST(teste_3 AS VARCHAR(200)),
FROM db_h_gss.tb_h_teste_orig
limit 10; It's possible, insert with subquery? This command doesnt work, i tried many ways and none worked. This is the create table (destination) CREATE TABLE db_h_gss.tb_h_teste_insert
(teste_1 VARCHAR(200),
teste_2 VARCHAR(200),
teste_3 VARCHAR(200)
) PARTITIONED BY(cod_index int )
STORED AS ORC; Thanks
... View more
Labels:
- Labels:
-
Apache Hive