cancel
Showing results for 
Search instead for 
Did you mean: 

How can we pass Dynamic values through variable to a subgraph

0 Kudos

Hello,

We are extracting data from BW and staging data in DI data lake(I know that this is not a good idea while using SAP DI but we had to due to the fact that data transfer operator cannot send data directly to ADLV2).

We need to extract 176 millions of data from source packet wise. So I want to create one graph and reuse it.

I have followed the below blog but couldn't successfully pass the variable value to the DI graph which is using pipeline operator to pass the variable.

SAP DI Structure File Consumers; specifying dynamic input filename/url for S3 retrieval | SAP Commun...

Could anyone help me on this?

----------------------------------

$.addGenerator(gen)

var graphName = "Test_pipeline_with_dynamicvariable" //Your subgraph name

var ZDATPAKID = "000001"

function gen(ctx) {

// start subgraph

var g

try {

g = $.instantiateGraph(graphName,

{"ZDATPAKID": ZDATPAKID}

)

} catch(e) {

$.fail(e.message)

return

}

// wait for graph execution is finished

status = g.wait()

// check graph status

if (status != $.graphStatus.completed) {

$.fail("Subgraph is failed")

} else {

$.done()

}

}

------------------------------------------


Error:

MessageGroup messages: Group: default; Messages: error building graph: configuration substitution failed for subengine operator subengineOperator0: for process "1_2019" ("pipeline1"): for configuration "configurationSubstitutions[0].value": missing value for "ZDATPAKID" Process(es) terminated with error(s). restartOnFailure==false
Thanks,Sirisha


View Entire Topic
0 Kudos

Hello majer.michal,

I have attached the graph code for your view. It an ADSO object in BW.

test-custom-operator.txt

di-transaction-full-graph-1-2019.txt

Please let me know if you need more details.

Thanks,

Sirisha

0 Kudos

Hello majer.michal.

Issue is resolved. I could edit the origianl code from the Java script and execute it with in a loop.


Thanks for your help.

Sirisha

michal_majer
Active Participant
0 Kudos

Glad you did it, nsirisha 🙂
Maybe you could post your code in this topic to help other people?
Best,

Michal