Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I've got flow like this:
Now what I want to do after tFilterRow is depends on filter do insert or update databse but in need data from tMap_1.
I don't know how to refer in tDbOutput_3 to tMap_1
The tFlowToIterate will create a globalMap variable. If the column you want to refer to is called "myValue" and the row is called "outToSelect" (I can't quite make it out from the image) and the type is String, you would use this code to refer to the value in or after the DB component....
((String)globalMap.get("outToSelect.myValue))
You need to connect something to your tDBOutput. What other data (apart from the value I spoke of in my last post) do you need to send there?
I need to insert some data from rest response, some static fileds, some generated fileds (like uuid).
I prepared everything in tMap
What is the tDBInput for?
The flow is:
I need to call rest service for list of contracts - done.
Then for every contract I have to call rest service for contract details - done.
And then I have to check if contract (by contract number) already exists in database:
- if it doesn't exist then do insert with data from rest service and some additional fields (author, timestamp, uuid ...)
- if it exists I have to check if xmlData returned in rest response has changed since last insert (I do it by generating hash from xmlData) if not then do nothing, if it has changed I need to update old record in database and insert new record with new data.
And problem was that after rest response and query database to check what to do I couldn't get data from rest response because I already had in flow the row from sql checking query
Then you can get the data from the REST call in the way I showed above. After that you need a flow to deal with the "if exists"/"if does not exist" and to decide on the insert or update. This will likely lead to at least 2 tDBOutput components I imagine. But both will need to be triggered by a flow. They cannot be isolated. They MUST be linked to flows after the iterate link from the tFlowToIterate.
You need to decide upon how you are going to meet all of the possible paths of these various flows before you decide upon how to send this data. However (and I'm not suggesting this is the correct way to solve your ultimate goal), you could connect a tFlowToIterate after your tFilterRow ixedRow to your tFilterRow and have a tIterate link and then a tFixedFlowInput to that. The tFixedFlowInput would be connected to your database component where you want to insert your data. You would populate the columns of the tFixedFlowInput with the globalMap fields you require