BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cleprevost
Calcite | Level 5

Greetings,

 

I'm a new user to RTDM and am interested in learning more about using DS2 SAS Processes in the tool. I've scoured the internet for examples, but have not had much luck.I'm interested in leveraging the SAS Process to analyze a data grid generated through a Data Process and output variables that can be leveraged in a campaign diagram. Has anyone created a DS2 SAS Process for a similar use case? The version of RTDM is 6.4.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
shill
SAS Employee

You can't use data grids or arrays directly in branches or filters, since you can't compare a discrete value to a list or table. You can, however, use a calculated item against either a data grid variable or against a single column (which is represented as a list-type variable) in those nodes.

 

For example, you can branch based on whether a column contains a specific value by creating a boolean calculated item called "Contains XYZ?" that does "ARRAYINDEX(<<dataGridIdentifier.myColumnName>>,'XYZ')" which will return a Yes/No that you can branch on.


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

3 REPLIES 3
shill
SAS Employee

If you need to work with data grids in DS2 as part of an RTDM decision campaign, you'll need to have an input parameter of type "package tap_table" in your execute() method. The tap_table method has a number of methods to allow you to get row count, add/remove rows, get values from the specified row/column, etc. These are all documented on page 102 of the RTDM Admin Guide.

 

Keep in mind that there are also lots of calcualted functions you can use in your campaign itself to do things like:

  • Sort the data grid
  • Select rows with values that match your criteria
  • Select the top or bottom N rows from a data grid
  • Join the data grid with another data grid
  • Get the max, min, average, etc. for the specific column

These are documented on page 265 of the RTDM User Guide.

 

If you've retrieved the data grid via a data process, you can also directly reference any of the columns, or you can add a data grid identifier to define column names to reference as well.


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

View now: on-demand content for SAS users

cleprevost
Calcite | Level 5

Thank you for the response! We are currently leveraging the calculated data item feature, but are interested in explored the DS2 option hoping the validation process may be more streamlined.

 

Regarding your statement: "If you've retrieved the data grid via a data process, you can also directly reference any of the columns, or you can add a data grid identifier to define column names to reference as well."

 

Can these columns be referenced directly in a node (e.g. branch) or does it require the use of a calculated data item? Can the column be directly referenced in a decision treatment campaign when the read data process is being performed in the decision campaign?

shill
SAS Employee

You can't use data grids or arrays directly in branches or filters, since you can't compare a discrete value to a list or table. You can, however, use a calculated item against either a data grid variable or against a single column (which is represented as a list-type variable) in those nodes.

 

For example, you can branch based on whether a column contains a specific value by creating a boolean calculated item called "Contains XYZ?" that does "ARRAYINDEX(<<dataGridIdentifier.myColumnName>>,'XYZ')" which will return a Yes/No that you can branch on.


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

View now: on-demand content for SAS users

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.

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