- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Has anyone experienced joining tables from SAS and Athena?
I have a requirement of joining table one in SAS and another in Athena.
proc sql noprint;
connect to ODBC as athn (DSN="AWS-Athena-SAS-xxx-xxx" );
create TABLE data.join(compress=char) as
select base.*
from connection to athn
(
Select A.id
from data.table_in_sas A
INNER JOIN table_in_s3 B
ON A.id = B.id
) base;
disconnect from athn;
quit;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Has anyone experienced joining tables from SAS and Athena?
I have a requirement of joining table one in SAS and another in Athena.
proc sql noprint;
connect to ODBC as athn (DSN="AWS-Athena-SAS-xxx-xxx" );
create TABLE data.join(compress=char) as
select base.*
from connection to athn
(
Select A.id
from data.table_in_sas A
INNER JOIN table_in_s3 B
ON A.id = B.id
) base;
disconnect from athn;
quit;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There was a double post which I merged. I forgot to activate the notification, sorry for that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@ChrisNZ wrote:
I usually mark the second post as spam.
Haven't considered that (yet). Will do a meditation on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hope confusion is clear now. That wasn't intentional to ask same question again, but by mistake might have submited the same question twice.
@ChrisNZ I will try your solution tomorrow and see if it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This is not possible with any data base.
The join must take place where both tables are.
So either you download the athena table to sas or you upload the sas table to athena.
The does the former:
libname ATH odbc DSN="AWS-Athena-SAS-xxx-xxx" user=xxx etc ;
proc sql ;
create table SASLIB.TAB3 as
select *
from ATH.TAB1, SASLIB.TAB2
where ID1=ID2;
quit;