SCRATCH_DB= LIBNAME Statement Option

Specifies a Hive schema so that SAS can store temporary output.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Access
Default: none (the current schema is used)
Requirement: SAS must be able to write to the schema.
Data source: Hadoop, Impala
See: SCRATCH_DB= data set option

Syntax

SCRATCH_DB=schema-name

Syntax Description

schema-name

specifies the name that is assigned to a logical classification of objects in a relational database.

Details

This option lets the user specify a target schema that SAS can use for temporary output. It is needed when a user does not have permissions to perform DDL operations such as CREATE TABLE or DROP TABLE in the current schema.

Example

libname hdp hadoop server=hxpduped 
   user=myusr1 password=mypwd1 scratch_db="tempdb";
Last updated: February 3, 2026