I want to create an external table with set of text files. Each row should be one text files. Example of one text file is as below and there can be multiple text files.(files are stored in HDFS)
thanking
you
for
the
participation
Lines are terminated by /n
. I want to create an external table with the above text files and data in a text file should be in one row(one cell).
I tried the following Create table statement.
Create External table if not exists sample_email(
email STRING
)
STORED AS TEXTFILE
LOCATION '/tmp/txt/sample/';
It will give create table as follows.
+--------------------------------------+
+ email +
+--------------------------------------+
+ thanking +
+--------------------------------------+
+ you +
+--------------------------------------+
+ for +
+--------------------------------------+
+ the +
+--------------------------------------+
+participation +
+--------------------------------------+
+please +
+--------------------------------------+
+find +
+--------------------------------------+
+the +
+--------------------------------------+
+discussed +
+--------------------------------------+
+points +
+--------------------------------------+
But I want as follows.
+--------------------------------------+
+ email +
+--------------------------------------+
+ thanking you for the participation +
+--------------------------------------+
+ please find the discussed points +
+--------------------------------------+
How to overcome my issue? Thank you in advance