iangow / wrds_pg

Code to get data from WRDS to PostgreSQL
46 stars 28 forks source link

Create SAS-to-PG function #40

Closed iangow closed 6 years ago

iangow commented 6 years ago

I think this should not be too difficult and would be worthwhile to have. I will add some guidance in comments below.

iangow commented 6 years ago

I think the first step would be to make a local version of the get_process function found in wrds_fetch.py (say, get_local_process(sas_code)). This would be much simpler than the existing function, which pipes the SAS code to an SSH connection to WRDS. I could probably take a look at that over the weekend or early next week (too busy before then).

I think this may be useful. (In fact, I think I adapted the get_process from similar ideas in the first place.)

jingyujzhang commented 6 years ago

Added a workable version. I tested it using sas default table sasuser.admit and pushed this table to public schema successfully. Need to continue working on it.

python3 sas_pg.py
jingyujzhang commented 6 years ago

Updated the 1st version.