create Hive tables from SAS EG
We want to check if is it possible to create Hive Tables from SAS EG.
We have tried creating reference of Hive table into SAS after specifying libraries (code below), but that's not what we want We also googled around but still no clue about that.
libname hdp hadoop server=db12222 port=20 schema=test user=tester password='xxx';
Can someone please tell if it's possible to create Hive Tables from SAS EG or not.
Thanks
hadoop hive sas hadoop2
add a comment |
We want to check if is it possible to create Hive Tables from SAS EG.
We have tried creating reference of Hive table into SAS after specifying libraries (code below), but that's not what we want We also googled around but still no clue about that.
libname hdp hadoop server=db12222 port=20 schema=test user=tester password='xxx';
Can someone please tell if it's possible to create Hive Tables from SAS EG or not.
Thanks
hadoop hive sas hadoop2
add a comment |
We want to check if is it possible to create Hive Tables from SAS EG.
We have tried creating reference of Hive table into SAS after specifying libraries (code below), but that's not what we want We also googled around but still no clue about that.
libname hdp hadoop server=db12222 port=20 schema=test user=tester password='xxx';
Can someone please tell if it's possible to create Hive Tables from SAS EG or not.
Thanks
hadoop hive sas hadoop2
We want to check if is it possible to create Hive Tables from SAS EG.
We have tried creating reference of Hive table into SAS after specifying libraries (code below), but that's not what we want We also googled around but still no clue about that.
libname hdp hadoop server=db12222 port=20 schema=test user=tester password='xxx';
Can someone please tell if it's possible to create Hive Tables from SAS EG or not.
Thanks
hadoop hive sas hadoop2
hadoop hive sas hadoop2
asked Nov 14 '18 at 13:22
GeekGeek
92
92
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
you can do it using explicit pass through in SAS EG.In explicit pass through you can pretty much run Hive code. An example of code from https://support.sas.com/resources/papers/proceedings12/115-2012.pdf is shown below
proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘01’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
Edit1
To move data from hadoop to sas or sas to hadoop, you can use libname statement way as discussed in this link
https://documentation.sas.com/?docsetId=acreldb&docsetTarget=p06ifxdiogaiusn1wsop0vc3frd2.htm&docsetVersion=9.4&locale=en
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;
It worked. Thanks a lot. Really appreciate. So with your code, I was able to create table in Hive from SAS. I also changed a bit as per our requirement. So as of now I am able to create table in hive from already available table in hive using SAS EG.(Code below)proc sql; CONNECT TO HADOOP(user="abcd" password="xxx" server="db12222" port=20 subprotocol=hive2); exec( create table temp.sasTest as select * from test.CHANNEL) by hadoop; disconnect from hadoop; quit;
But what I am trying is to create SAS table into HIVE from SAS EG. Is there any workaround for it.
– Geek
Nov 15 '18 at 9:58
HI Kiran, Yes I tried that too, but i am facing other issues in that. I am getting "ERROR: Error trying to establish connection: Could not open connection to /usr/bin/tmp/hadoop1_hdfs_file. The JDBC connection string (URI) could not be handled by the driver". Probably i do not have access on hadoop's /tmp/ folder. I am looking into this.
– Geek
Nov 16 '18 at 9:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301247%2fcreate-hive-tables-from-sas-eg%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
you can do it using explicit pass through in SAS EG.In explicit pass through you can pretty much run Hive code. An example of code from https://support.sas.com/resources/papers/proceedings12/115-2012.pdf is shown below
proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘01’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
Edit1
To move data from hadoop to sas or sas to hadoop, you can use libname statement way as discussed in this link
https://documentation.sas.com/?docsetId=acreldb&docsetTarget=p06ifxdiogaiusn1wsop0vc3frd2.htm&docsetVersion=9.4&locale=en
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;
It worked. Thanks a lot. Really appreciate. So with your code, I was able to create table in Hive from SAS. I also changed a bit as per our requirement. So as of now I am able to create table in hive from already available table in hive using SAS EG.(Code below)proc sql; CONNECT TO HADOOP(user="abcd" password="xxx" server="db12222" port=20 subprotocol=hive2); exec( create table temp.sasTest as select * from test.CHANNEL) by hadoop; disconnect from hadoop; quit;
But what I am trying is to create SAS table into HIVE from SAS EG. Is there any workaround for it.
– Geek
Nov 15 '18 at 9:58
HI Kiran, Yes I tried that too, but i am facing other issues in that. I am getting "ERROR: Error trying to establish connection: Could not open connection to /usr/bin/tmp/hadoop1_hdfs_file. The JDBC connection string (URI) could not be handled by the driver". Probably i do not have access on hadoop's /tmp/ folder. I am looking into this.
– Geek
Nov 16 '18 at 9:36
add a comment |
you can do it using explicit pass through in SAS EG.In explicit pass through you can pretty much run Hive code. An example of code from https://support.sas.com/resources/papers/proceedings12/115-2012.pdf is shown below
proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘01’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
Edit1
To move data from hadoop to sas or sas to hadoop, you can use libname statement way as discussed in this link
https://documentation.sas.com/?docsetId=acreldb&docsetTarget=p06ifxdiogaiusn1wsop0vc3frd2.htm&docsetVersion=9.4&locale=en
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;
It worked. Thanks a lot. Really appreciate. So with your code, I was able to create table in Hive from SAS. I also changed a bit as per our requirement. So as of now I am able to create table in hive from already available table in hive using SAS EG.(Code below)proc sql; CONNECT TO HADOOP(user="abcd" password="xxx" server="db12222" port=20 subprotocol=hive2); exec( create table temp.sasTest as select * from test.CHANNEL) by hadoop; disconnect from hadoop; quit;
But what I am trying is to create SAS table into HIVE from SAS EG. Is there any workaround for it.
– Geek
Nov 15 '18 at 9:58
HI Kiran, Yes I tried that too, but i am facing other issues in that. I am getting "ERROR: Error trying to establish connection: Could not open connection to /usr/bin/tmp/hadoop1_hdfs_file. The JDBC connection string (URI) could not be handled by the driver". Probably i do not have access on hadoop's /tmp/ folder. I am looking into this.
– Geek
Nov 16 '18 at 9:36
add a comment |
you can do it using explicit pass through in SAS EG.In explicit pass through you can pretty much run Hive code. An example of code from https://support.sas.com/resources/papers/proceedings12/115-2012.pdf is shown below
proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘01’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
Edit1
To move data from hadoop to sas or sas to hadoop, you can use libname statement way as discussed in this link
https://documentation.sas.com/?docsetId=acreldb&docsetTarget=p06ifxdiogaiusn1wsop0vc3frd2.htm&docsetVersion=9.4&locale=en
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;
you can do it using explicit pass through in SAS EG.In explicit pass through you can pretty much run Hive code. An example of code from https://support.sas.com/resources/papers/proceedings12/115-2012.pdf is shown below
proc sql;
connect to Hadoop <connection info>;
exec( create external table hadoop1( x double, y string, z double) row format
delimited fields terminated by ‘01’ stored as textfile location
'/tmp/hadoop1_hdfs_file') by hadoop;
quit;
Edit1
To move data from hadoop to sas or sas to hadoop, you can use libname statement way as discussed in this link
https://documentation.sas.com/?docsetId=acreldb&docsetTarget=p06ifxdiogaiusn1wsop0vc3frd2.htm&docsetVersion=9.4&locale=en
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;
edited Nov 15 '18 at 13:52
answered Nov 14 '18 at 14:47
Kiran Kiran
2,8153919
2,8153919
It worked. Thanks a lot. Really appreciate. So with your code, I was able to create table in Hive from SAS. I also changed a bit as per our requirement. So as of now I am able to create table in hive from already available table in hive using SAS EG.(Code below)proc sql; CONNECT TO HADOOP(user="abcd" password="xxx" server="db12222" port=20 subprotocol=hive2); exec( create table temp.sasTest as select * from test.CHANNEL) by hadoop; disconnect from hadoop; quit;
But what I am trying is to create SAS table into HIVE from SAS EG. Is there any workaround for it.
– Geek
Nov 15 '18 at 9:58
HI Kiran, Yes I tried that too, but i am facing other issues in that. I am getting "ERROR: Error trying to establish connection: Could not open connection to /usr/bin/tmp/hadoop1_hdfs_file. The JDBC connection string (URI) could not be handled by the driver". Probably i do not have access on hadoop's /tmp/ folder. I am looking into this.
– Geek
Nov 16 '18 at 9:36
add a comment |
It worked. Thanks a lot. Really appreciate. So with your code, I was able to create table in Hive from SAS. I also changed a bit as per our requirement. So as of now I am able to create table in hive from already available table in hive using SAS EG.(Code below)proc sql; CONNECT TO HADOOP(user="abcd" password="xxx" server="db12222" port=20 subprotocol=hive2); exec( create table temp.sasTest as select * from test.CHANNEL) by hadoop; disconnect from hadoop; quit;
But what I am trying is to create SAS table into HIVE from SAS EG. Is there any workaround for it.
– Geek
Nov 15 '18 at 9:58
HI Kiran, Yes I tried that too, but i am facing other issues in that. I am getting "ERROR: Error trying to establish connection: Could not open connection to /usr/bin/tmp/hadoop1_hdfs_file. The JDBC connection string (URI) could not be handled by the driver". Probably i do not have access on hadoop's /tmp/ folder. I am looking into this.
– Geek
Nov 16 '18 at 9:36
It worked. Thanks a lot. Really appreciate. So with your code, I was able to create table in Hive from SAS. I also changed a bit as per our requirement. So as of now I am able to create table in hive from already available table in hive using SAS EG.(Code below)
proc sql; CONNECT TO HADOOP(user="abcd" password="xxx" server="db12222" port=20 subprotocol=hive2); exec( create table temp.sasTest as select * from test.CHANNEL) by hadoop; disconnect from hadoop; quit;
But what I am trying is to create SAS table into HIVE from SAS EG. Is there any workaround for it.– Geek
Nov 15 '18 at 9:58
It worked. Thanks a lot. Really appreciate. So with your code, I was able to create table in Hive from SAS. I also changed a bit as per our requirement. So as of now I am able to create table in hive from already available table in hive using SAS EG.(Code below)
proc sql; CONNECT TO HADOOP(user="abcd" password="xxx" server="db12222" port=20 subprotocol=hive2); exec( create table temp.sasTest as select * from test.CHANNEL) by hadoop; disconnect from hadoop; quit;
But what I am trying is to create SAS table into HIVE from SAS EG. Is there any workaround for it.– Geek
Nov 15 '18 at 9:58
HI Kiran, Yes I tried that too, but i am facing other issues in that. I am getting "ERROR: Error trying to establish connection: Could not open connection to /usr/bin/tmp/hadoop1_hdfs_file. The JDBC connection string (URI) could not be handled by the driver". Probably i do not have access on hadoop's /tmp/ folder. I am looking into this.
– Geek
Nov 16 '18 at 9:36
HI Kiran, Yes I tried that too, but i am facing other issues in that. I am getting "ERROR: Error trying to establish connection: Could not open connection to /usr/bin/tmp/hadoop1_hdfs_file. The JDBC connection string (URI) could not be handled by the driver". Probably i do not have access on hadoop's /tmp/ folder. I am looking into this.
– Geek
Nov 16 '18 at 9:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301247%2fcreate-hive-tables-from-sas-eg%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown