BookmarkSubscribeRSS Feed
freshstarter
Quartz | Level 8

Hello,

 

I have a pre-assigned sas library for snowflake and we need to use bulkload and bulkunload with the internal stage concept using the pre-assigned library.

 

All our sas code are pass through code and we dont define any libname statement. In the code , we directly use the pre-assigned library and as far as I read, we cant use bulkload or unload in pass -through.

 

so thought of using this paramter on sas library on SMC.

 

Where to define this setting on library? We have other options tab ( under Advanced options ) as well as extended attribute tab ? Can we able to add it over there? I tried few options and it failed.

 

I need to add BULKLOAD=YES , BULKUNLOAD=YES, BL_INTERNAL_STAGE='@~' , BL_DELETE_DATAFILE=YES,BL_COMPRESS=YES

 

FYI. we do have a single SAS library for snowflake and it will be used for both load and unload.

 

Any help is much appreciated. Thanks

 

 

7 REPLIES 7
SASKiwi
PROC Star

There's no reason why you can't use LIBNAMEs with Passthru to Snowflake. We use them. They look like this:

 libname SF snow <Snowflake connection definition>;

  proc sql;
    connect using SF;
    select * from connection to SF
    (SELECT * FROM MySnowFlakeTable);
    disconnect from SF;
  quit;

Also you should be able to add the bulk loading options to the LIBNAME also.

freshstarter
Quartz | Level 8
Thanks @SASKiwi for your response.
As we are using pre-assigned library, we are not using lib name statement in the code. Below is the code we are using

proc sql;
connect using snow
Create table work.dataset as
select * from connection to snow
(SELECT * FROM Db.Schema.MySnowFlakeTable);
disconnect from snow
quit;

Snow is the preassigned library in smc.the above code is for data unloading.

So that’s the reason I planned to amend the options directly on the smc preassigned library.

There are 1000’s of Sas jobs which we can’t change and include the lib name statement.

Thanks
carl_sommer
SAS Employee

 

so thought of using this paramter on sas library on SMC.

 

Where to define this setting on library? We have other options tab ( under Advanced options ) as well as extended attribute tab ? Can we able to add it over there? I tried few options and it failed.

 

I need to add BULKLOAD=YES , BULKUNLOAD=YES, BL_INTERNAL_STAGE='@~' , BL_DELETE_DATAFILE=YES,BL_COMPRESS=YES

 

The correct place to do this in SAS Management Console is as you noted on the library properties -> Options tab -> Advanced Options button -> Other Options tab

carl_sommer_0-1752697716456.png

Carl Sommer - SAS Technical Support

freshstarter
Quartz | Level 8
Thanks Carl. Previously I have included under this other option tab but I have separated with semicolon ; , but it throws me an error when using the pre-assigned library.


I have defined like this

Bulkload=yes;BL_Compress=Yes;BL_Internal_Stage=‘@~’;
SASKiwi
PROC Star

@freshstarter - Actually we use pre-assigned Snowflake libraries exclusively also. I just used the LIBNAME statement as an illustration 🙂.

carl_sommer
SAS Employee

You don't want to use the semi-colons.  To test this out, temporarily mark the library as not pre-assigned, set your advanced options, and then display the generated libname statement for the library.  That makes it much more straight-forward to understand how the options are being included.   Once you can generate a libname statement that actually works when submitted, then mark it preassigned once again.

Carl Sommer - SAS Technical Support

freshstarter
Quartz | Level 8
Thank you.. let me try this out and will keep you updated

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 707 views
  • 2 likes
  • 3 in conversation