Member since
05-14-2015
8
Posts
0
Kudos Received
0
Solutions
05-22-2015
12:11 PM
Alex, I tried to do the same. Here is the set of queries I ran for the same. But it didn’t fail or abort. [eplnx070:21000] > set ABORT_ON_ERROR=true; ABORT_ON_ERROR set to true [eplnx070:21000] > set ABORT_ON_ERROR=1; ABORT_ON_ERROR set to 1 [eplnx070:21000] > insert into src values (cast('1234a' as integer),'ajay'); Query: insert into src values (cast('1234a' as integer),'ajay') Inserted 1 row(s) in 0.92s [eplnx070:21000] > select * from src; Query: select * from src +------+------+ | col1 | col2 | +------+------+ | NULL | A | | NULL | ajay | | NULL | ajay | | NULL | ajay | +------+------+
... View more
05-22-2015
10:53 AM
Thanks a lot Alex for the info. Looks like we need to find a different workaround since we also expect to get NULL values from the source.
... View more
05-20-2015
07:50 PM
Well, the expectation was for the query to fail. Currently, we are trying to convert a lot of code from Teradata and in Teradata this exact same query would fail.
... View more
05-20-2015
09:48 AM
Hi, We are currently on Impala v2.2.0 and we are facing an issue when we try to insert a string value into an integer column. One of our data pipes is providing a string value in the src and the target column is an INT type. But the data gets inserted as NULL when we cast the column as INTEGER. Is it supposed to behave in this manner? Here are the steps for the same: CREATE TABLE svuidh_prototype.src ( col1 INT, col2 STRING ) STORED AS TEXTFILE LOCATION 'hdfs://nameservice1/user/hive/warehouse/svuidh_prototype.db/src' TBLPROPERTIES ('transient_lastDdlTime'='1430844770'); [eplnx070:21000] > insert into src values (cast('ABC' as integer),'A'); Query: insert into src values (cast('ABC' as integer),'A') Inserted 1 row(s) in 0.74s [eplnx070:21000] > select * from src; Query: select * from src +------+------+ | col1 | col2 | +------+------+ | NULL | A | +------+------+ Fetched 1 row(s) in 0.57s Thanks, Ajay
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Impala
-
HDFS
05-15-2015
06:37 AM
Thanks a lot Alex. I shall go ahead and comment on the Impala JIRA to explain the same situation. Thanks once again for all the help. Regards, Ajay
... View more
05-14-2015
06:41 PM
Hi Alex, Thanks a lot for the information. But the problem at our end is that we run all our impala processes/queries through an UNIX shell script. This error causes our script to fail and exits. Do you think this would issue would be fixed in the next minor release or the one after that? Thank you for the help once again. Regards, Ajay
... View more
05-14-2015
02:19 PM
Hi Alex, I first created these 2 tables via Impala Shell (v2.2.0). [eplnx070:21000] > CREATE TABLE svuedhd1_s.src ( > col1 INT, > col2 STRING > ) > STORED AS TEXTFILE > LOCATION '/data/BI/SVUEDHD1_S/src'; Query: create TABLE svuedhd1_s.src ( col1 INT, col2 STRING ) STORED AS TEXTFILE LOCATION '/data/BI/SVUEDHD1_S/src' Fetched 0 row(s) in 0.44s [eplnx070:21000] > CREATE TABLE svuedhd1_s.tgt ( > col1 INT, > col2 STRING > ) > STORED AS TEXTFILE > LOCATION '/data/BI/SVUEDHD1_S/tgt'; Query: create TABLE svuedhd1_s.tgt ( col1 INT, col2 STRING ) STORED AS TEXTFILE LOCATION '/data/BI/SVUEDHD1_S/tgt' Fetched 0 row(s) in 0.48s. Once that was done, here is the content of these files in HDFS. They both contain nothing. bash-4.1$ hadoop fs -ls /data/BI/SVUEDHD1_S/src bash-4.1$ hadoop fs -ls /data/BI/SVUEDHD1_S/tgt bash-4.1$ Next, I tried to just INSERT the data into tgt from src and that works absolutely fine in Impala. [eplnx070:21000] > use svuedhd1_s; Query: use svuedhd1_s [eplnx070:21000] > select count(*) from tgt; Query: select count(*) from tgt +----------+ | count(*) | +----------+ | 0 | +----------+ Fetched 1 row(s) in 4.15s [eplnx070:21000] > select count(*) from src; Query: select count(*) from src +----------+ | count(*) | +----------+ | 0 | +----------+ Fetched 1 row(s) in 5.11s [eplnx070:21000] > insert into tgt select * from src; Query: insert into tgt select * from src Inserted 0 row(s) in 0.53s [eplnx070:21000] > But when, I do an INSERT OVERWRITE, I get the error and the warning. [eplnx070:21000] > insert overwrite tgt select * from src; Query: insert overwrite tgt select * from src WARNINGS: Could not list directory: hdfs://nameservice1/data/BI/SVUEDHD1_S/tgt Error(11): Resource temporarily unavailable [eplnx070:21000] > On the flipside, if I create these tables in Impala and then do an INSERT OVERWRITE using Hive, it works perfectly fine without any issue. I will also, send out the JIRA link and the file descriptor issue to our Admin to see if that could be a possible problem. Thanks, Ajay
... View more
05-14-2015
11:47 AM
Hi, We recently upgraded our environment to CDH 5.4 and CDM 5.4, but after the upgrade we get this error while insert overwriting 0 records from the source into the target table via impala shell. The error & warning we get are as follows: Query: insert overwrite tgt select * from src limit 0 WARNINGS: Could not list directory: hdfs://nameservice1/data/BI/SVUEDHD1_S/tgt Error(11): Resource temporarily unavailable Has anyone else also faced a similar issue? Thanks, Ajay
... View more
Labels: