Skip to Content
0
Former Member
Jul 03, 2012 at 03:56 PM

Syntax Error using Lookup_Ext wizard in Custom Functions

140 Views

Hi All,

We are builing the below lookup_ext statement using the function wizard in Custom Functions script to read a table entry based on the given selection to return multiple columns and collecting them into the variables. But, even after building with the wizard we are having syntax error and not able resolve. If anyone tried using Lookup_Ext using wizard in a custom functions then kindly help us in resolving this issue.

lookup_ext([DS_TD.META_T.ETL_BODS_CTRL,'PRE_LOAD_CACHE','MAX'],

[ETL_DATAFLOW_KEY,END_DTTM],

[NULL,NULL],

[ETL_JOB_NAME,'=',$P_I_ETL_JOB_NAME,ETL_DATAFLOW_NAME,'=',$P_I_ETL_DATAFLOW_NAME],

[END_DTTM],

[$P_O_ETL_DATAFLOW_KEY,$P_O_END_DTTM])

SET ("run_as_separate_process"='no', "output_cols_info"='<?xml version="1.0" encoding="UTF-8"?><output_cols_info><col index="1" expression="no"/>

<col index="2" expression="no"/>

</output_cols_info>' );

Error:

[Function:Fn_Etl_Bods_Ctrl_Get]

(Ln 47) : Syntax error : "["

Check and fix the syntax and retry the operation.

Line 47 is set statement.

Also if anyone knows the importance of encoding = "UTF-8" then please let us know. Without SET statement the lookup_ext is working fine with ODBC connection as ASCII. But if we switch the ODBC connection to UTF-8 then the lookup_ext is not returning any values and hence we trying to test the same with SET using UTF-8.

Thanks for your help in this regards.

Regards,

Vijay