Database Reference
In-Depth Information
'TEXT'>>' (DELIMITER, '<<name the
delimiter>>');
• To create a writable external table:
CREATE WRITABLE EXTERNAL (WEB) TABLE
LOCATION (<<file paths>>) | EXECUTE
'<<query>>' FORMAT '<<Format name for
example: 'TEXT'>>' (DELIMITER, '<<name
the delimiter>>');
• To drop an external table:
DROP EXTERNAL (WEB) TABLE;
Following are the examples on using file:// and gphdfs:// protocol:
CREATE EXTERNAL TABLE test_load_file ( id int,
name text,
date date, description text )
LOCATION (
'file://filehost:6781/data/folder1/*',
'file://filehost:6781/data/folder2/*'
'file://filehost:6781/data/folder3/*.csv'
)
FORMAT 'CSV' (HEADER);
In the preceding example, data is loaded from three different file server locations;
also, as you can see, the wild card notation for each of the locations can be different.
Now, in case where the files are located on HDFS, the following notation needs to
be used (in the following example, the file is '|' delimited):
CREATE EXTERNAL TABLE test_load_file ( id int,
name text,
date date, description text )
LOCATION (
Search WWH ::




Custom Search