cancel
Showing results for 
Search instead for 
Did you mean: 

HANA flowgraph. Mapping of variables to outputs.

Former Member
0 Kudos

hi all,

could you please advise on the use of variables in HANA flowgraphs?

I am trying to create a flowgraph, which:

1) gets a variable value when triggered

2) uses this variable for filtering inside of the flowgraph

3) writes the value of the variable to each row of certain column of flowgraph output.

For the point #3 I've tried to use 'filter node'. In this element on the page 'mapping' I've

- added a new column to output "variable_output_column"

- for this column set the following mapping string: $$name_of_flowgraph_variable$$

With this I've expected to get value of variable "name_of_flowgraph_variable" (for the test I've put the value= "VARIABLE_VALUE") in each row of "variable_output_column". Instead, I am getting the following error message:

(dberror) 2048 - column store error: task framework: [260] invalid column name: VARIABLE_VALUE: line 1 col 167 (at pos 167) (please check lines: )

It looks like the mapping uses the value of variable to find a column in the 'filter node' input with a name corresponding to the value of the variable.

Of course, it looks like a bug, because

a) if I put mapping string equal to static string 'VARIABLE_VALUE' (instead of $$name_of_flowgraph_variable$$), then the output column gets rows with value VARIABLE_VALUE

b) it's pretty hard to imagine that mapping should find an input column name dynamically basing on the input.

So, this option doesn't look properly working. Could you please advise any alternative for the task? maybe another type of node can be helpful?

Thanks and best regards,

Andriy.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Andriy!

Did you solve this problem? I'm facing this also. I'm trying to use the TO_DATE($$V_DATE$$, 'YYYY-MM-DD') function, but I'm getting the same error.

In Data Services we have at least two ways to put a variable inside quotes:

  1. TO_DATE({$V_DATE}, 'YYYY-MM-DD')
  2. TO_DATE('\'' || $V_DATE || '\'', 'YYYY-MM-DD')

Does anybody know how to do the same in SAP Hana flowgrath?

Thanks!

Claydson

Former Member
0 Kudos

hi Claydson,

after spending quite a lot of time trying to solve this issue in flowgraph I came to the conclusion that there is a bug in HANA SPS11.. Therefore, I've switched to writing procedures instead of flowgraphs.

regards,

Andriy.

Former Member
0 Kudos

Hi Adriy,

I also have/had the hardest time with this.

what I figured out so far - related to SPS11:

Variables are working with Option "Task Plan" only

when creating flowgraph "Stored Procedure" with HANA Studio, you do not have a "variables" option

when creating flowgraph "Stored Procedure" with WebIDE you have Variables Option although it is not supported in this mode.

So, Yes it is a bug, that within WebID you can create variables in "Stored Procedure" mode.

Andreas

Former Member
0 Kudos

Hi,

Normaly if you would create just a calculated column on the bottom level projection(if you have one) as $$name_of_flowgraph_variable$$. Then just on the level above filter data set using the expression conditions.

In other words I would not reccomend process logic of calculated columns on the same node where you created it.

Thanks,

Andrew