Hive Query: Split value

0 votes
Hi,

I have a column in hive table with values like 123456|c, 234567|A etc.

How I can get only values like 123456, 234567 from that column by ignoring |C, |A etc.
Jul 25 in Big Data Hadoop by Jason
23 views

1 answer to this question.

0 votes

You can use the SUBSTR() in hive query to do the same such as 

select SUBSTR(col,0,5) from table_name;
answered Jul 25 by Paul

Related Questions In Big Data Hadoop

0 votes
1 answer

How Impala is fast compared to Hive in terms of query response?

Impala provides faster response as it uses MPP(massively ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 10,690 points
330 views
0 votes
1 answer

Setting Hive/Hadoop property using Hive Query

You can set Hadoop & Hive conf ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 13,300 points
271 views
0 votes
1 answer

Hive: How to use insert query like SQL

It is now possible to insert like ...READ MORE

answered Nov 5, 2018 in Big Data Hadoop by Omkar
• 67,600 points
64 views
0 votes
1 answer

Hadoop Hive: How to split string in Hive?

You can use the split function along ...READ MORE

answered Nov 6, 2018 in Big Data Hadoop by Omkar
• 67,600 points
2,390 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
3,097 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
349 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
15,204 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
1,128 views
0 votes
1 answer

Hadoop Hive query to filter employees

select * from tablename where DOJ> '2018-01-01' ...READ MORE

answered Dec 13, 2018 in Big Data Hadoop by Omkar
• 67,600 points
289 views
0 votes
1 answer

Why Max is throwing in below query in hive for alias?

Hi, You can do one thing, just enclose ...READ MORE

answered May 16 in Big Data Hadoop by reshma
33 views