BookmarkSubscribeRSS Feed
Pato485
Calcite | Level 5

Is there any possible way to connect to postgresql from sas EG - program?

 

Tried this but it is not working from program in sas EG:

 

DRIVER=SQL;CONOPTS=((DRIVER=POSTGRES;CATALOG=public;UID=myuid;PWD=123pass;
SERVER=aurora-instance-1.ctkz01uv9xcr.us-east-1.rds.amazonaws.com;
PORT=5432;DB=aurora))

                                   

Thanks for any help.                                                                                                                                                                                                                                                                      

1 REPLY 1
LinusH
Tourmaline | Level 20

You probably can, but there are of course some constraints.

Your "code" is the definition of a data source.

To able to actually connect to the source from SAS, you need to submit a LIBNAME statement, which in return refers to the information you provided.

Exactly depends on your set up (EG connects to SAS server or local PC SAS), your SAS license (SAS/ACCESS to....), and of course possibility to connect to that data source given firewalls etc.

 

This is for Postgres SAS/ACCESS engine, might be slightly different if you are using SAS/ACCESSS ODBC engine:

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p0nc2tikruabp6n1008nkdf0buee.htm

 

Data never sleeps

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 425 views
  • 0 likes
  • 2 in conversation