Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

update a column in HANA using BODS

$
0
0

HI all,

 

Please can you guide me, I am new to BODS (we are running version 14.0.3) and pretty new to HANA (we are running version 1.00.83.0).

 

I am a data warehouse developer with experience of dimensional modelling using Wherescape Red and more recently SSIS.

 

I have a batch job that loads a table from SQLServer into a HANA table.

 

I would like to transform some of the columns, either before they hit the HANA table (preferably) or afterwards.

 

for example I would like to do this;

 

UPDATE PROFIT.SALES_HISTORY_20150716 -- this is the destination table in HANA

SET  IMPORT_FLAG = CASEWHENLEFT(SUPPLIER,1) = 'D'ORLEFT(PRODUCT,2) = 'WK'THEN'Y'ELSE'N'END

FROM PROFIT.SALES_HISTORY_20150716

WHERE OPCO = 'ABC'

AND  IMPORT_FLAG ISNULL;


I have tried the SQL transform and then realised this only works for SELECT statements.  I have tried an IF statement in the QUERY transform but get the following error;

 

[Query:Query]
Invalid mapping expression for column <Query.IMPORT_FLAG>. Additional information: <Syntax error at line <1>: <>: near <IF> found <IF> expecting <CREATE>.
1 error(s), 0 warning(s).

Check and fix the syntax and retry the operation. (BODI-1112394)>. (BODI-1111081)

 

The IF statement is;

IF LEFT(SUPPLIER,1) = 'D' OR LEFT(PRODUCT,2) = 'WK' THEN 'Y' ELSE 'N'

 

Many thanks,

Hannah


Viewing all articles
Browse latest Browse all 3719

Trending Articles



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