Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

Calling sql() using a variable for the data store

$
0
0

Hello,

 

I have a data flow in which I am collecting an audit point (count) at the output of a query transform. I have a script after the data flow which I use to print out the count. I am using the following function to retrieve the audit point value:

 

$LV_AUDIT_LABEL = $P_AUDIT_LABEL;

$LV_DS_NME = repository_name( );

 

Return ( sql( $LV_DS_NME ,'

  SELECT al_audit_info.value

  FROM   al_audit, al_audit_info, al_lang

  WHERE al_audit.object_key = al_audit_info.audit_key AND

  al_lang.object_key = al_audit.df_lang_key AND

  al_audit.status = 2 AND

  al_audit_info.label = {$LV_AUDIT_LABEL}'));

 

When I validate the above function, I get the following error message:

 

[Function:CF_GET_AUDIT_VALUE]

The function <CF_GET_AUDIT_VALUE> contains an invalid expression. Additional information: <For call to function <sql>, parameter number <1> must be a string, in single quotes, representing a datastore.>. (BODI-1111182)

 

The $LV_DS_NME is a variable of type VARCHAR(100).

 

Can you please let me know why I am getting this error and help me resolve it


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>