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 have an RTDM Treatment Campaign that requires several areas of the diagram to reference a single custom data grid. Rather than repeating the same logic across multiple nodes in the campaign, I would like to create a calculated variable that retains the Table Select function that creates the data grid (let's call it "Calc_Custom_DG"), and then reference the "Calc_Custom_DG" where needed in the diagram. This is working great EXCEPT i do not see a location that I can modify the "Calc_Custom_DG" logic. This concerns me a bit because it makes modifying the campaign in the future (if needed) problematic.

 

Is there any way to edit an existing calculated variable (data type = Data Grid) within a campaign AFTER its creation?

1 ACCEPTED SOLUTION

Accepted Solutions
Dmitry_Alergant
Pyrite | Level 9

Without an Assign node (in 6.4), your two options to create a DataGrid-type calculated variable which can be reused further in a diagram would be:

 

1. A Process Node (may be a dummy SAS process that does nothing).

Its code may look like this (i did not test, but I think that should work)

 

package dummy_dgprocess / overwrite=yes;

	method execute( 
			package tap_table DATA_GRID
			);
	end;

endpackage;

 

Beware though that there is a limitation while working with Data Grids in SAS DS2 code - a data grid cannot be too large to exceed 8192 characters while serialized. If it becomes that large, the diagram will fail - even though your dummy code does nothing with that data grid, it will probably still fail when SAS attempts to pass the data grid over from RTDM Engine to Fed Server and deserialize it. 

 

There is no such limit when using Groovy language instead of DS2. But it does not have a very official support status in current versions (including 6.4): http://support.sas.com/kb/60/630.html

2. Subdiagram node to a dummy RTDM diagram that accepts a data grid input.  This option should not have a data grid size limit.

 

Good Luck!

-------
Dmitriy Alergant, Tier One Analytics

View solution in original post

4 REPLIES 4
Dmitry_Alergant
Pyrite | Level 9

Hi,

 

Did you try an Assign node? This is exactly what it was made for. You use Assign node to assign a value to an Identifier, normally using a calculated function.   Then you keep referring to this identifier.  It works well with any variable types, including Data Grids.

 

You did not specify SAS RTDM version you are using. Hopefully, it is recent enough to have an Assign node there. It was only introduced recently.  

 

Hope it helps.

-------
Dmitriy Alergant, Tier One Analytics
williamwash
SAS Employee

If I had to take a guess the reason is that you are only presented with the variables of the same data type. If you click on the variable you want to edit, then "Edit Caculated Variable" you should be able to edit it. 

 

In the example below, you can see that the process input variable is expecting a data grid.

 

Screen Shot 2018-01-03 at 2.30.14 PM.png

 

 

If you click on the pencil box next to the value you want to set

 

Screen Shot 2018-01-03 at 2.30.29 PM.png

 

You will be taken to the area to select the appropriate variable. Because the input type is Data Grid then we are only presented with data grid variables. Select the variable you want to edit, then click the pencil box on the right side.

 

Screen Shot 2018-01-03 at 2.30.53 PM.png

 

Now you have the properties box for the calculated variable that you want to set.

 

Screen Shot 2018-01-03 at 2.31.14 PM.png

 

Make your changes and then click okay all the way back out until you are back to the diagram.

 

 

 

cleprevost
Calcite | Level 5

Thanks for the replies. We are using version 6.4, so I don't believe the Assign node is available.

 

For the second reply - are there any nodes other than a Process Node that will allow the data type of Data Grid? Our implementation really only leverages Start, Branch, Filter, Cross Table, and Reply nodes in our Treatment Campaigns. If not, is there a "workaround/dummy" Process that could be used that only has the purpose of being able to maintain a Calculated Data Item Data Grid?

Dmitry_Alergant
Pyrite | Level 9

Without an Assign node (in 6.4), your two options to create a DataGrid-type calculated variable which can be reused further in a diagram would be:

 

1. A Process Node (may be a dummy SAS process that does nothing).

Its code may look like this (i did not test, but I think that should work)

 

package dummy_dgprocess / overwrite=yes;

	method execute( 
			package tap_table DATA_GRID
			);
	end;

endpackage;

 

Beware though that there is a limitation while working with Data Grids in SAS DS2 code - a data grid cannot be too large to exceed 8192 characters while serialized. If it becomes that large, the diagram will fail - even though your dummy code does nothing with that data grid, it will probably still fail when SAS attempts to pass the data grid over from RTDM Engine to Fed Server and deserialize it. 

 

There is no such limit when using Groovy language instead of DS2. But it does not have a very official support status in current versions (including 6.4): http://support.sas.com/kb/60/630.html

2. Subdiagram node to a dummy RTDM diagram that accepts a data grid input.  This option should not have a data grid size limit.

 

Good Luck!

-------
Dmitriy Alergant, Tier One Analytics
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
  • 4 replies
  • 2229 views
  • 0 likes
  • 3 in conversation