DATA Step, Macro, Functions and more

Green Plum Server

Occasional Contributor
Posts: 16

Green Plum Server

I was wondering the best practice for moving data between Green Plum and unix base sas files on an integrated SAS grid environment. I have seen users use pg_dump or a copy to (format CSV) and then proc imported as SAS files. I have also seen the use of the odbc connection. I was looking for any feedback or if there were alternative methods to best optimize the use of the SAS Grid. Currently I am running small summarized files though ODBC Parallel processed like the following:



%let rc=%sysfunc(grdsvc_enable(_all_,server=SASApp_Grid));
options autosignon;

rsubmit task1 wait=no;


/*functions processed*/




/*example of odbc connect*/

proc sql;
connect to odbc(dsn = *** user=ME pwd="&dbpass");

insert into /*SAS premade table name*/_&snapdate.
select * from connection to odbc(

select *
From /*Green Plum Table*/
where date = %unquote(%str(%'&snapdate.%'))::date + interval '1 month' - interval '1 day'
Smiley Wink;
disconnect from odbc;


I then stack the tables and drop the monthly tables after moving the files (I am pulling by how the tables are partitioned on Green Plum). Should I continue this approach? Appreciate any help or feedback.



Super User
Posts: 3,777

Re: Green Plum Server

Posted in reply to Larrihoover

If your current process works well why change it?


IMO SAS to database data transfers using SAS/ACCESS products are better than using intermediate text files because of the reliable data type translation of interfaces like ODBC. There is a lot less to go wrong with this approach. 

Ask a Question
Discussion stats
  • 1 reply
  • 1 like
  • 2 in conversation