Created 06-05-2016 04:21 PM
I believe that this will not be the best way to analyze big data . My goal is in the end of the process in Hadoop have a smaller data set in order to successfully integrate in SAS , for example. What is your opinion ? Many thanks!
Created 06-06-2016 03:53 PM
I see different issues here:
a) Split up a line with multiple records
If you have multiple communications by line you will need some pre processing. Hive provides maps and arrays but it is hard to use them in normal SQL.
So tons of different ways but my suggestion would be to write a Pig UDF to split up a line into multiples potentially adding a column that adds the line information if you need to group them together somehow.
http://stackoverflow.com/questions/11287362/splitting-a-tuple-into-multiple-tuples-in-pig
b) Get date from Filename
There are some ways to get at the filename in mapreduce but its difficult. MapReduce by definition abstracts filenames away. You have two options there:
1) Use a little python/java/shell whatever preprocessing script OUTSIDE hadoop that adds a field with the date to each row of each file taken from the filename. Easy but not that scalable
2) Write your own recordreader
3) Pig seems to provide some value called tagsource that can do the same
c) Do Graph analysis
You can use Hive/pig/Spark for preprocessing and Spark provides a cool graph api. Tons of examples out there.
http://spark.apache.org/graphx/
Good luck.
Created 06-06-2016 04:01 AM
Can you say a little bit more about the text files? Are they all the same kind of data and format, or different? How big are the text files in terms of GB and number of rows/columns?
Created 06-06-2016 12:48 PM
One possible line of the text file would be: 1 10:30:87 3 12 1 10:30:22 1 10:45:21 3 12 2 10:30:22 2 12 2 10:30:22 1 12 10:30:22 So as you can see, I can have multiple Communication ID by line (that's one of my doubts to create the Hive tables). The size of the text files are 6GB. Many thanks for your help Paul 🙂 Hope you can understand the problem. Thanks!
Created 06-06-2016 03:53 PM
I see different issues here:
a) Split up a line with multiple records
If you have multiple communications by line you will need some pre processing. Hive provides maps and arrays but it is hard to use them in normal SQL.
So tons of different ways but my suggestion would be to write a Pig UDF to split up a line into multiples potentially adding a column that adds the line information if you need to group them together somehow.
http://stackoverflow.com/questions/11287362/splitting-a-tuple-into-multiple-tuples-in-pig
b) Get date from Filename
There are some ways to get at the filename in mapreduce but its difficult. MapReduce by definition abstracts filenames away. You have two options there:
1) Use a little python/java/shell whatever preprocessing script OUTSIDE hadoop that adds a field with the date to each row of each file taken from the filename. Easy but not that scalable
2) Write your own recordreader
3) Pig seems to provide some value called tagsource that can do the same
c) Do Graph analysis
You can use Hive/pig/Spark for preprocessing and Spark provides a cool graph api. Tons of examples out there.
http://spark.apache.org/graphx/
Good luck.
Created 06-06-2016 04:05 PM
NiFi will do that very easily, then you can trigger some Spark jobs to do final processing.