Hello Team,
Suppose I have 2 SQL queries which are dependent on each other.
-
Can we take the output resultset from QUERY A and use that in QUERY B WHERE clause , one by one ??
-
Is there any option to use 2 SQL Feeders in the Feed ?
e.g:
val QueryA = “SELECT TOP (10) [ID] FROM [ABC].[DEF].[KEYID]”
When we execute the QueryA, 10 KeyID values will be generated. Is there any way to iterate over the list and fetch one by one ?
val QueryB = "SELECT [NAME] FROM [ABC].[DEF].[KEYID] where ID = “keyID” "
Here in the above query, the values from the QueryA are used and only ONE NAME is getting generated at one time.
val sqlQueryFeeder = jdbcFeeder(dbUrl, userName, dbPass,QueryB).random
val getNames = scenario( scenarioName = “Get Name of org”).feed(sqlQueryFeeder).repeat(1) {
exec(http(“Get Next Name”)
.get("/dept/v1/deptTemp/" + 12345+ “/dep/” + 456+ “/ID/” + keyID)
.header(“api-key”, orgkeyValue)
.check(status.is(200)))
}