BookmarkSubscribeRSS Feed
test12342341
Calcite | Level 5

Hello,

 

I am trying to upload a large table from SAS to Amazon RedShift using the bulkload option(http://documentation.sas.com/?docsetId=acreldb&docsetTarget=n1getgqem5whhmn1bxx7ct75ns82.htm&docsetV...).

 

It requires the BL_Bucket option (http://documentation.sas.com/?docsetId=acreldb&docsetTarget=n1n1jcqd49bk0kn1r66oe3o3dt47.htm&docsetV...)

 

I have the bucket name, access and secret keys, but I don't know how they should be entered into the data set option. Could someone post an example of proc append with the bl_bucket option?

 

Thank you!

6 REPLIES 6
SASKiwi
PROC Star

Here is how I expect it to work. I note you need to be using SAS 9.4M4 for this option to be available.

 

proc datasets library = REDSHIFT;
  append base =  BaseTable
               data = AppendTable (bl_bucket = MyBucketName)
         ;
  run;
quit;
test12342341
Calcite | Level 5

Thanks for your reply.

 

The data set option should go on the base table since that is the destination.

 

The bulkload=yes option should be used as well.

 

Here is what I tried and it is not working. Gives me an error saying 'Unknown region'. There doesn't seem to be a way to supply region.

 

    proc append base=rds_lib.base_table( bulkload=yes BL_BUCKET=bucket_name)
        data=data_table;
    run;

Patrick
Opal | Level 21

@test12342341

The bulkload options need to be on source table (data=) as this is the one you want to load in bulk. 

 

...I stay corrected: The bulkload option needs to be on the target table.

test12342341
Calcite | Level 5
test12342341
Calcite | Level 5

I found some documentation on it. There are additional options that should be supplied. The example is here: https://communities.sas.com/t5/SAS-Communities-Library/Redshift-and-SAS/ta-p/361738

 

 

Patrick
Opal | Level 21

@test12342341

Given that the link you've posted provides sample code and demonstrates how to use some of the bulkload options: What's still not working for you?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1315 views
  • 0 likes
  • 3 in conversation