I have about 10 files in the same HDFS location. All files have the exact same columns (about 15) and each are about 100 rows. Each file represents data I have received on over the last 10 months (data is refreshed monthly). I would like to create one HIVE table that merges all of the data into the tables. The table should have 15 columns with about 1,000 rows of data.
I tried using code I usually use to create tables (please see below) but when I run the script below, it executes but only grabs data from one file but not the other 9.
CREATE EXTERNAL TABLE database.tablename (
UserID INT,
UserName String,
Department String,
State String
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS TEXTFILE
LOCATION '/location/of/the/file/'
TBLPROPERTIES ("skip.header.line.count"="1");
I don't receive any errors but I'm only getting some of the data, not all of it. Should I use completely different syntax? or can I edit the script above to get the results I need?
Any help is greatly appreciated! P.S. Very new to Hadoop/HIVE so I am trying to learn as I get hit with these different scenarios. Thank you all!