SAS Customer Intelligence

Plan, execute, measure and optimize customer experiences
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
CMark02
Calcite | Level 5

Hello,

 

We are using SAS RTDM (SAS CI Studio 6.4M1 Hotfix 01) to host a number of decision services. The biggest of those has grown rather large, to the point that performance when editing the diagram in SAS CI Studio is an issue.

 

As a side-project, I planned to migrate parts of the logic to DS2 code snippets.

 

This is where I happened upon a problem that has me stumped:

The diagram pulls data from an Oracle DB (access defined in SMC) every few nodes. I initially thought I could access the DB using the SQLSTMT package and the libref I see when choosing the DB table for a new data process. Since I'm here talking about it, this approach obviously wasn't successful.

 

So here's my question(s): How do I pass the libref to the DS2 code? Or is there a way to call data process functions? Do I need to change anything in SAS Management Console to make it work?

 

Right now, trying to access with libref.tablename syntax in SQLSTMT

 

DECLARE PACKAGE SQLSTMT get('SELECT id, var1, var2 from oracledb.testtable');

 

throws an error

 

[com.sas.tkts.sql.FSException: [com.sas.tkts.sql.FSException: T_EXECUTE2: Table Service: Function failed.] SQLSTATE:[42000] MESSAGE:[Syntax error or access violation] NATIVEERROR:[-2130708373]

 

The syntax is correct, the whole package works fine when running it in SAS Base.

 

An alternative would be to use sub-diagrams, but by now I'd really like to know what I'm doing wrong.

 

Thanks for reading!

1 ACCEPTED SOLUTION

Accepted Solutions
shill
SAS Employee

Accessing data from DS2 doesn't actually have any connection to SMC libraries at all. It's based entirely on the configuration of Fed Server (not SMC) and getting the fully qualified path correct (catalog.schema.table) and making sure it's accessible in your DSFederatedDSN. The best way to work through this is to go into Fed Server Manager and use the "SQL" tab to open a query window, then select the DSFederatedDSN (which should contain your BASE_DSN, plus your Oracle connection) and paste the query in that window. Once you get that query to execute successfully in that window, your SQLSTMT package should work correctly.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

View solution in original post

2 REPLIES 2
shill
SAS Employee

Accessing data from DS2 doesn't actually have any connection to SMC libraries at all. It's based entirely on the configuration of Fed Server (not SMC) and getting the fully qualified path correct (catalog.schema.table) and making sure it's accessible in your DSFederatedDSN. The best way to work through this is to go into Fed Server Manager and use the "SQL" tab to open a query window, then select the DSFederatedDSN (which should contain your BASE_DSN, plus your Oracle connection) and paste the query in that window. Once you get that query to execute successfully in that window, your SQLSTMT package should work correctly.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

CMark02
Calcite | Level 5

Thanks for the reply! Going to try that once I've got all the login details cleared up.

Review SAS CI360 now.png

 

Want to review SAS CI360? G2 is offering a gift card or charitable donation for each accepted review. Use this link to opt out of receiving anything of value for your review.

 

 

 

 

SAS Customer Intelligence 360

Get started with CI 360

Review CI 360 Release Notes

Open a Technical Support case

Suggest software enhancements

Listen to the Reimagine Marketing podcast

Assess your marketing efforts with a free tool

 

Training Resources

SAS Customer Intelligence Learning Subscription (login required)

Access free tutorials

Refer to documentation

Latest hot fixes

Compatibility notice re: SAS 9.4M8 (TS1M8) or later

 

 

How to improve email deliverability

SAS' Peter Ansbacher shows you how to use the dashboard in SAS Customer Intelligence 360 for better results.

Find more tutorials on the SAS Users YouTube channel.

Review SAS CI360 now.png

 

Want to review SAS CI360? G2 is offering a gift card or charitable donation for each accepted review. Use this link to opt out of receiving anything of value for your review.

 

 

 

 

SAS Customer Intelligence 360

Get started with CI 360

Review CI 360 Release Notes

Open a Technical Support case

Suggest software enhancements

Listen to the Reimagine Marketing podcast

Assess your marketing efforts with a free tool

 

Training Resources

SAS Customer Intelligence Learning Subscription (login required)

Access free tutorials

Refer to documentation

Latest hot fixes

Compatibility notice re: SAS 9.4M8 (TS1M8) or later

 

 

Discussion stats
  • 2 replies
  • 2495 views
  • 3 likes
  • 2 in conversation