Member since
01-05-2018
24
Posts
0
Kudos Received
0
Solutions
01-07-2018
08:36 AM
thank you. I was following this procedure however there was an error in my csv file. For some reason I needed to resave it again as csv.
... View more
01-07-2018
08:34 AM
I was looking at the wrong directory. This appears to have resolved the issue. Thank you.
... View more
01-07-2018
08:33 AM
Hi
I am using getmerge to combine multiple files like this:
hdfs dfs -getmerge /user/maria_dev/Folder3/* /Folder3/output1.csv
How can I exclude the header of each file? When I upload into hive table, it repeats each header row.
Alternatively, is there a query in Hive to exclude the actual header names? If I join 2 files and upload this into Hive, I have 2 lines of headers, and so on.
When I created my table, I included the following:
TBLPROPERTIES ("skip.header.line.count"="1");
However, this only skips the first line. How can I exclude the rest of the headers?
Thanks
... View more
Labels:
- Labels:
-
Apache Hive
01-07-2018
05:32 AM
Hi I have only just begun to learn HIVE. I am trying to upload a CSV file. However it does not look correct in Ambari view, please see screen shot attached. I cannot set up my columns as the data does not look to be separating correctly. Have I missed a step or done something wrong? I have field delimiter set a ",". pic8.jpg
... View more
Labels:
- Labels:
-
Apache Ambari
-
Apache Hive
01-07-2018
02:51 AM
@ Jay Kumar SenSharma do you mean from WinSCP? I am not sure. I have included pics in my previous post. If you could take a look, that would be most appreciated. When I create a Folder1 directory, it does not show up under root - home - maria_dev.
... View more
01-07-2018
02:18 AM
@ Jay Kumar SenSharma are you referring to WinSCP directory? If so, please see screen shot attached.pic6.jpg There is no Folder1 here so this is why I am still confused. Pic7 shows directory under root (pic 6 was as maria_dev).pic7.jpg The Folder1 shows here but I am still unsure as to how to progress. Should I be logged into WinSCP as root or maria_dev?
... View more
01-07-2018
02:06 AM
@ Jay Kumar SenSharma I changed the "ls-l" to see WRITE permission as shown in the attached pic. I also created tespic5.jpgt.txt but where should I see this now? It is not showing in list, also not showing in my directory for WinSCP?
... View more
01-07-2018
01:48 AM
@ Jay Kumar SenSharma thank you for your help with this. I am still not quite there. The Folder1 definitely exists as shown in the attached (pic4) with two files. I then tried: chmod 777 -R Folder1 but then when I ran the getmerge command again, it produced the same error? pic4.jpg
... View more
01-07-2018
01:25 AM
@ Jay Kumar SenSharma thank you. The Folder1 folder does indeed exist. This worked for me: hadoop fs -getmerge /user/maria_dev/Folder1/* output.csv I cannot seem to use any of the "hdfs dfs" commands above? The above gave me an output file, but it was only the first file, i.e. it did not join the second file to it?
... View more
01-07-2018
12:53 AM
@ Jay Kumar SenSharma thank you. Two questions: 1. Is there a way to merge the files directly on HDFS, or do you need to merge to local file system then put back on HDFS? 2. I followed your instructions but on point no. 4 I used: hdfs dfs -getmerge /user/maria_dev/Folder1/* /Folder1/output.csv I have a folder called Folder1 on HDFS and it is also the same folder on local system, but got the same error: getmerge: Mkdirs failed to create file:/Folder1 (exists=false, cwd=file:/home/maria_dev) Not sure why this occurred. Have I missed a step or typed incorrectly? Thanks
... View more