Specifies the default location for external tables.
| Valid in: | SAS/ACCESS LIBNAME statement |
|---|---|
| Category: | Data Set Control |
| Aliases: | DBCREATE_LOCATION= |
| DBCREATE_LOC= | |
| DBCREATE_PATH= | |
| Default: | None |
| Requirement: | You must specify the DBCREATE_TABLE_EXTERNAL= LIBNAME option when you specify this option. |
| Data source: | Hadoop |
| Note: | Support for this option starts in SAS 9.4M8. |
| See: | DBCREATE_TABLE_EXTERNAL= LIBNAME option, DBCREATE_TABLE_OPTS= LIBNAME option, DBCREATE_TABLE_LOCATION= data set option |
Table of Contents
specifies the default location for storing external tables.
This option causes SAS to include the LOCATION keyword in its CREATE TABLE query, along with the specified path. When using the LIBNAME option and creating a new table, the table’s name is appended to the user’s path.
In this example, the combination of DBCREATE_TABLE_LOCATION='/tmp/extdir' and DBCREATE_TABLE_EXTERNAL=YES alters the CREATE TABLE query generated by the SAS DATA step.
libname x HADOOP user=xxxxxx pwd=xxxxxx
driverclass=com.cloudera.hive.jdbc.HS2Driver
DBCREATE_TABLE_EXTERNAL=yes
dbcreate_table_location='/tmp/extdir'
url='jdbc:hive2://host:port/database;useNativeQuery=1;defaultStringColumnLength=2048;
hive.exec.drop.ignorenonexistent=false';
data x.class;
set sashelp.class;
run;
HADOOP_6: Executed: on connection 2
CREATE EXTERNAL TABLE `default`.`CLASS` (`Name` VARCHAR(8),`Sex` VARCHAR(1),`Age` DOUBLE,`Height` DOUBLE,`Weight` DOUBLE)
LOCATION '/tmp/extdir/class' TBLPROPERTIES ('SAS OS Name'='Linux','SAS Version'='V.04.00M0D03312022')