Plan, execute, measure and optimize customer experiences

Process Node in MA

Reply
New Contributor
Posts: 2

Process Node in MA

Hi!

 

I have a question about RTDM.

How can I insert some multiple values in VALUE field in a Read-data process node? It is possible? Screenshot in attach. 


read-data process.PNG
Community Manager
Posts: 551

Re: Process Node in MA

Hi @HULK, a knowledgeable colleague passed along the following option fpr you to try:

 

You can’t achieve that in using a data process, but you could do so with a SAS process that uses either a SAS DS2, Groovy, or Jython process to make the SQL calls. You could use an IN operator in the query to match multiple values.

 

However, there are some considerations regarding statement pooling that have potential performance impact. You need a fixed number of parameters for the statement to be compiled and re-used. Otherwise, the statement gets prepared every single time it runs. If you know there are a maximum number of values, one way to work around that is to create a fixed length parameter string and populate it with values. So for example, if you have a maximum of ten values, the pre-prepared statement can have a placeholder for each:

 

SELECT Name, Age, Income FROM Customers where State IN (?,?,?,?,?,?,?,?,?,?)

 

Based on the values you need, If you have only 3 states in your IN clause, you can populate it this way: 

 

(‘TX’,’MI’,’IL’ ,’IL’ ,’IL’ ,’IL’ ,’IL’ ,’IL’ ,’IL’ ,’IL’)

Ask a Question
Discussion stats
  • 1 reply
  • 224 views
  • 0 likes
  • 2 in conversation