Member since
12-29-2015
26
Posts
3
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
897 | 11-21-2017 07:21 AM | |
7022 | 09-07-2016 03:07 PM |
07-24-2018
01:15 PM
got the above error while select the records from hive table.
... View more
07-24-2018
01:14 PM
Labels:
- Labels:
-
Apache Hive
07-24-2018
12:47 PM
casting problem in parquet file format in hive Earlier i have the datatype for one column as decimal and stored as parquet. Now i changed the datatype to bigint. After changing this, i couldn't able to select the data from the table. it showing error message Caused by:
org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while
processing row [Error getting row data with exception
java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast
to org.apache.hadoop.hive.serde2.io.HiveDecimalWritable Please help me on this. Thanks!
... View more
Labels:
- Labels:
-
Apache Hive
07-15-2018
01:56 PM
Thanks @ Sandeep Nemuri @ rguruvannagari works fine
... View more
07-15-2018
07:01 AM
@Sandeep Nemuri Thanks for your reply. the above sort will give correct output if the directory have only one day files. if the directory have 20180704 files. it sorted output like abcd_1_20180703 abcd_1_20180704 abcd_2_20180703 abcd_2_20180704 abcd_3_20180703 abcd_3_20180704 abcd_4_20180703 abcd_4_20180704 abcd_5_20180703 abcd_5_20180704 abcd_6_20180703 abcd_6_20180704 But i expect abcd_1_20180703 abcd_2_20180703 abcd_3_20180703 abcd_4_20180703 abcd_5_20180703 abcd_6_20180703 abcd_1_20180704 abcd_2_20180704 abcd_3_20180704 abcd_4_20180704 abcd_5_20180704 abcd_6_20180704 Any idea?
... View more
07-13-2018
08:06 AM
How to sort the filename in shell. My files looks like abcd_2_20180703 abcd_4_20180703 abcd_5_20180703 abcd_1_20180703 abcd_3_20180703 abcd_6_20180703 And i expect after the sorting abcd_1_20180703 abcd_2_20180703 abcd_3_20180703 abcd_5_20180703 .. Please help me sort the files. TIA
... View more
11-21-2017
07:21 AM
Here is the solution for that WHEN a1.Col1 = '1' THEN "b1.col2" Else CAST ('' as timestamp) END as Col3 . It will work
... View more
11-20-2017
03:02 PM
How to change the timstamp type to string with the condition of my query has CASE condition like. " WHEN a1.Col1 = '1' THEN "b1.col2" Else "" END as Col3" here Col1 is timestamp and Col3 is String, So when i run the query, got this error .. ""Argument type mismatch '""': The expressions after THEN should have the same type: "timestamp" is expected but "string" is found"". I expect to here, if the condition failed i need to store "" (empty) value. Please help on this. Thanks in advance.
... View more
Labels:
- Labels:
-
Apache Hadoop
-
Apache Hive
07-18-2017
01:02 PM
Got Invalid table alias or column reference 'NEW_AGE while using CASE statement in hive. Please find the query below and do the needful, I want to get the result(NEW_AGE) from WHEN condition and again process this results(NEW_AGE) to another CASE statement. SELECT CONSUMER_R ,
CNTRY_ISO_C , NEW_AGE =(CASE WHEN ( DTBIRTH_Y = '0001-01-01' )
THEN 0
ELSE cast((DATEDIFF(current_date,'0001-01-01')/365) as smallint)
END), CASE
WHEN NEW_AGE = 0 THEN CAST('99) UNKNOWN' as char(11)) WHEN NEW_AGE BETWEEN 1 AND 18 THEN CAST('01) < 18' as char(11)) WHEN NEW_AGE BETWEEN 18 AND 24 THEN CAST('02) 18 ~ 24' as char(11)) WHEN NEW_AGE BETWEEN 25 AND 29 THEN CAST('03) 25 ~ 29' as char(11)) WHEN NEW_AGE BETWEEN 30 AND 34 THEN CAST('04) 30 ~ 34' as char(11)) WHEN NEW_AGE BETWEEN 35 AND 39 THEN CAST('05) 35 ~ 39' as char(11)) WHEN NEW_AGE BETWEEN 40 AND 44 THEN CAST('06) 40 ~ 44' as char(11)) WHEN NEW_AGE BETWEEN 45 AND 49 THEN CAST('07) 45 ~ 49' as char(11)) WHEN NEW_AGE BETWEEN 50 AND 54 THEN CAST('08) 50 ~ 54' as char(11)) WHEN NEW_AGE BETWEEN 55 AND 59 THEN CAST('09) 55 ~ 59' as char(11)) WHEN NEW_AGE BETWEEN 60 AND 64 THEN CAST('10) 60 ~ 64' as char(11)) WHEN NEW_AGE BETWEEN 65 AND 69 THEN CAST('11) 65 ~ 69' as char(11)) WHEN NEW_AGE BETWEEN 70 AND 74 THEN CAST('12) 70 ~ 74' as char(11)) WHEN NEW_AGE >= 75 THEN cast('13) 75 +' as char(11))
ELSE cast('99) UNKNOWN' as char(11)) END NEW_AGE_RANGE,
UPDATE_Y,
UPDATE_M
FROM datamart_db.M_C_CONSMR_TBL
WHERE
(coalesce(AGE_R, 0) <> coalesce(NEW_AGE, 0));
... View more
Labels:
- Labels:
-
Apache Hive
11-03-2016
06:46 AM
Thanks @Greg Keys. This is what i want 🙂
... View more