I had an dataset in csv, But in address field content contains of few

#1

I had an dataset in csv, But in address field in some columns content contains of few “,” when i am trying to store it in hive using rows terminated by “,” data is not properly importing into hive please suggest solution for it

0 Likes

#2

You need to use regex serde

Go to this link - https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL
and search for this section for example. You need to use proper regex for your scenario.

0 Likes

#3

Hi, you can access the datasets here in my Github link here.

@itversity, sir, if you can please add these files to your Github account and also to your S3 bucket, I have cleaned the records in product id 685 and removed the empty column.

0 Likes

#4

Yes, I will add data sets to s3 very soon.

0 Likes

#5

can anyone help with this error

org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''subhash29/datasets/’’: No files matching path
file:/home/hive/subhash29/datasets/

i am not getting what is the exact path. my dataset is present in subhash29/datasets/* but its showing error while loading into hive table

thanks in advance

sorry error cleared

0 Likes

#6

Try giving the type of dataset.

E.g. : /subhash29/datasets/*.csv

It will copy all CSV files.

0 Likes

#7

it worked in console but when i use same path in ambari its not working

0 Likes

#8

You cannot access local file system of server from ambari. You have to upload using Ambari Files View to your HDFS location and then use LOAD command with out local to move files from HDFS location to Hive table.

0 Likes