从 SAS EG 创建 Hive 表
create Hive tables from SAS EG
我们想检查是否可以从 SAS EG 创建 Hive 表。
我们已经尝试在指定库(下面的代码)后将 Hive table 的引用创建到 SAS 中,但这不是我们想要的我们也搜索了一下,但仍然没有任何线索。
libname hdp hadoop server=db12222 port=20 schema=test user=tester password='xxx';
谁能告诉我是否可以从 SAS EG 创建 Hive 表。
谢谢
您可以在 SAS 中使用显式传递来做到这一点 EG.In 显式传递您几乎可以 运行 Hive 代码。来自 https://support.sas.com/resources/papers/proceedings12/115-2012.pdf 的代码示例如下所示
proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘[=10=]1’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
编辑1
要将数据从 hadoop 移动到 sas 或从 sas 移动到 hadoop,您可以使用本文 link
中讨论的 libname 语句方式
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;
我们想检查是否可以从 SAS EG 创建 Hive 表。 我们已经尝试在指定库(下面的代码)后将 Hive table 的引用创建到 SAS 中,但这不是我们想要的我们也搜索了一下,但仍然没有任何线索。
libname hdp hadoop server=db12222 port=20 schema=test user=tester password='xxx';
谁能告诉我是否可以从 SAS EG 创建 Hive 表。
谢谢
您可以在 SAS 中使用显式传递来做到这一点 EG.In 显式传递您几乎可以 运行 Hive 代码。来自 https://support.sas.com/resources/papers/proceedings12/115-2012.pdf 的代码示例如下所示
proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘[=10=]1’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
编辑1
要将数据从 hadoop 移动到 sas 或从 sas 移动到 hadoop,您可以使用本文 link
中讨论的 libname 语句方式 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;