DATA Step, Macro, Functions and more

Using LASR Table in data step lookup

Reply
Occasional Contributor
Posts: 13

Using LASR Table in data step lookup

Hi,

 

I would like to be able to use an already LASR loaded table as a lookup table in my data step (hash table lookup). Is this possible?

Super User
Posts: 5,441

Re: Using LASR Table in data step lookup

Yes it's possible. 

Data in LASR is available to you by a libname.

But (it's kinda big but), be aware of that the whole table will be transferred to your local SAS session where your data step executes. So in this sense, it's not certain that's a advantage to use LASR data (if you are on a remote host to the LASR server).

What kind of operations is this, and why do you need to use LASR data?

Data never sleeps
Occasional Contributor
Posts: 13

Re: Using LASR Table in data step lookup

Hi, thanks,

What I am doing is typical SCD loads, so I will have to figure out new, chg, close records. What I thought of going is to load my dimensions into memory the day before, so that when my new data comes along, and I need to do lookups for SCD, I can save time by avoiding the loads of the lookup table since it was loaded prior to batch start. The only way I thought of pre loading was to load to LASR. The LASR server and workspace on on the same physical machine.

 

Also, how will this affect my data step code, where I would have loaded the table to memory I now have to point to a LASR table via memory addr/ref????

 

this:
            declare hash h0(dataset: "libname.table", hashexp: exponent);
            h0.defineKey( "cd");
            h0.defineData( "data1");
            h0.defineDone();

 

would be????

 

Many thanks for the help

Super User
Posts: 5,441

Re: Using LASR Table in data step lookup

Just assign the libname and then you can use the LASR data syntactically as any other data.
Not knowing your full architecture but using LASR data as input for that type of processing sounds awkward. I LASR as an end station for analysis and reporting, not as input for data management processes. I would use the source for the LASR data as input to your SCD job.
Data never sleeps
Occasional Contributor
Posts: 13

Re: Using LASR Table in data step lookup

found another option, have not yet explored. proc server,

http://support.sas.com/documentation/cdl/en/shrref/63064/HTML/default/viewer.htm#n1or2nolc2epe5n15pd...

  

thanks for all the help.

Ask a Question
Discussion stats
  • 4 replies
  • 293 views
  • 0 likes
  • 2 in conversation