Using SQL UDI for Column analysis

Highlighted
One Star

Using SQL UDI for Column analysis

Hi,

i tried using a SQL UDI for column analysis but failed to get the result because of the following error..

2012-10-31 19:09:13,087 ERROR org.talend.dq.analysis.ColumnAnalysisSqlExecutor - Query not executed for indicator: "REGIONAL_INDICATO" SQL query: SELECT COUNT(<%=__COLUMN_NAME__%>) FROM "BCAM"."BCAM_DETAIL_STG_CE" where <%=__COLUMN_NAME__%>='O'

can anyone help?
Seventeen Stars

Re: Using SQL UDI for Column analysis

The variables you use here are not accessible for the runtime. These variables are only for the build time - means when studio creates the java code for your job. If you want doing some dynamic work use context variables or use values from the globalMap (a hash based map private to every job).
One Star

Re: Using SQL UDI for Column analysis

Hi,

Thnx for the previous reply, but if u can elaborate more , it would be really helpful.
I am using a TALEND DQ open source version.

thanks.
Employee

Re: Using SQL UDI for Column analysis

Hi,

your template is missing a 'S'.
The correct template should read.

SELECT COUNT(<%=__COLUMN_NAMES__%>) FROM "BCAM"."BCAM_DETAIL_STG_CE" where <%=__COLUMN_NAMES__%>='O'


I would suggest to replace "BCAM"."BCAM_DETAIL_STG_CE" with <%=__TABLE_NAME__%> so that you can use this indicator on different tables.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Introduction to Talend Open Studio for Data Quality

Find out about Talend Open Studio for Data Quality

Watch Now

Enabling Data Governance

Learn how to enable Data Governance

Watch Now

The Definitive Guide to Government Data Quality

Take a peek at the definitive guide to Government Data Quality

Read