Problem : need to Wait data from SQL Query to start javascript transformer

Here I have created a sql query and I'm using that data into same query transformer to perform some operation on that. But on the reload of page the main Query is taking time that why the transformer throwing "null data read".
can someone guide me on how to ensure that query transformer runs only after data has been from the sql query part.
Thank you


In this case your query channel called your MainQuery which is likely too early. Its most likely a dependency issue. I find when there are a number of dependent queries its best to ONLY set your queries to only fire when specifically called. This can be a pain to layout but ensures the best performance and least number of errors.

So figure out which query fires first on page load and set that to fire on page load. And then set your other queries based on the success of the query that provides it data (either via directly or via a transform variable etc.)

So in this case:

  1. Ensure MainQuery is set to :
  2. In the Query that provides data to MainQuery in the Success event add a call to MainQuery to ensure it only fires AFTER success of the dependent query.

Hope this helps.

1 Like

Hi @Shagun_Agrawal Did you sort out your transformer already? If not, could you share the full code of the transformer?