READ_METHOD= Data Set Option

Specifies how to read data.

Valid in: DATA and PROC steps (when creating and appending to DBMS tables using SAS/ACCESS software)
Category: Data Set Control
Default: none
Data source: Hadoop
See: ANALYZE= LIBNAME option, ANALYZE= data set option, READ_METHOD= LIBNAME option

Syntax

READ_METHOD=JDBC | HDFS

Syntax Description

JDBC

specifies that data is to be read through the JDBC connection to the Hive service. You can use the ANALYZE= option to potentially improve performance when querying small tables.

HDFS

specifies that data is to be read through a connection to the Hadoop HDFS service.

Details

Although HDFS cannot alter the behavior of operations that always use JDBC, in general HDFS is a faster alternative to JDBC. To take advantage of potential performance benefits, set this option to HDFS. Use JDBC when you cannot access the HDFS service or JDBC Read offers some other advantage.

Example: Read Data Using JDBC

In this example, a partition of data from the sales Hive table is read using JDBC.

libname hdp hadoop server=mysrv1 user=myusr1 pwd=mypwd1;
data work.sales_subset; set hdp.sales(READ_METHOD=JDBC);
where year_month='2012-10'; run;
Last updated: February 3, 2026