How to write data from different metanodes

Hi Team,

I have done all the transformations using the DB nodes and last node is DB Query node. I wanna remove the DB reader node and wanna write data

I pull data from a table in XYZ. schema and then I write the data to a table in ABC. schema.

Before writing the data to ABC schema I would like to verify the table is empty or not if it is empty then write the data or else delete the data in table. I am using DB Delete node

I wanna remove the DB reader node and wanna write data from DB Query node to a table in ABC schema.

Please let me know for further information.

Thanks,
Subramanyam Kinthada

Hi @Subramanyam,

For the condition you can use DB Extract Table Dimension to know if the table is emtpy or not.
To insert the selection from DB Query, you can use the DB Query Extractor and DB SQL Executor nodes. For example:

The query in the top DB SQL Executor could be something like this:

INSERT INTO "ABC"
$${Ssql}$$

where $${Ssql}$$ is the flow variable from the DB Query Extractor node.

2 Likes

Hi @armingrudd,

Thanks for the above one,
Actual workflow — N number of markets with Entity ID’s for each market and 12 months of data for each market.

Now for example if data is fetching for market with entity ID 1 it fetches the data for 12 months and verify the table is empty or not and write the data into table.

for the next market with same month date exist ( months will be same for Markets) and during verification of DB table empty or not the suggested design will fail.

Could you please help me in designing for the above case. Attaching the workflow.

Thanks a Ton for it.
Subramanyam Kinthada.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.