DBCREATE_TABLE_EXTERNAL= LIBNAME Option

Specifies whether to include the EXTERNAL keyword when creating a new table.
Valid in: SAS/ACCESS LIBNAME statement
Alias: DBCREATE_EXTERNAL=, DBCREATE_EXT=
Default: NO
Interaction: You can specify this option, the DBCREATE_TABLE_LOCATION= option, or both.
Data source: Hadoop
Tip: This option determines only the disposition of a file upon delete.
See: DBCREATE_TABLE_EXTERNAL= data set option, DBCREATE_TABLE_LOCATION= data set option, DBCREATE_TABLE_OPTS= LIBNAME option, DBCREATE_TABLE_OPTS= data set option

Syntax

DBCREATE_TABLE_EXTERNAL=YES | NO

Syntax Description

YES
specifies that the EXTERNAL keyword is to be inserted between the CREATE and TABLE keywords when creating a new table.
NO
specifies that the Hive table and its associated data files are deleted.

Details

Use this option to indicate how to dispose of data files that comprise the Hive table when that table is deleted using a DROP TABLE tabname Hive command. When set to YES and the Hive table is deleted, its associated data files are not deleted.

Example: Creating a File in an Alternative Hive Depository

Both DBCREATE_TABLE_EXTERNAL= and DBCREATE_TABLE_LOCATION= options are set in this example.
LIBNAME db HADOOP SERVER=myserver USER=myuser DB=myschema;
DATA db.mytab (
       DBCREATE_TABLE_EXTERNAL=YES
       DBCREATE_TABLE_LOCATION=”/mydir/mytab”);
  SET mydata;
RUN;