proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘\001’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
libname hdp hadoop server=db12222 port=20 schema=test user=tester
password='xxx';
data work.a;
set hdp.mytab;
run;
data work.a;
set hdp.mytab (keep=col1 col2);
where col2=10;
run;
1条答案
按热度按时间kkbh8khc1#
您可以在sas中使用显式传递来完成它,例如,在显式传递中,您几乎可以运行配置单元代码。来自的代码示例https://support.sas.com/resources/papers/proceedings12/115-2012.pdf 如下所示
编辑1
要将数据从hadoop移动到sas或sas到hadoop,可以使用libname语句,如本文所述
https://documentation.sas.com/?docsetid=acreldb&docsettarget=p06ifxdiogaiusn1wsop0vc3frd2.htm&docsetversion=9.4&locale=en