Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
when i start with the url:"https://flow.pluralsight.com/v3/customer/core/repos/?offset=0"
it gives the data of 100 records like
Firstly i thank you for helping me out......
i have tried but also the same error i.e, Duplicate local variable url
String url = row37.next;// next cannot be resolved or is not a field
tjava component code is
globalMap.put("myUrl","https://flow.pluralsight.com/v3/customer/core/repos/?offset=0");
trestClient component URL is with method GET
((String)globalMap.get("myUrl"))
tjavaFlex component is like
tloop is like
OK, there needs to be a tJava before the tLoop. This will be joined to the tLoop using an OnSubJobOk link. This is where this code will go....
globalMap.put("myUrl","https://flow.pluralsight.com/v3/customer/core/repos/?offset=0");
The tJava after the tLoop should have no code in it. It is a dummy component simply there to allow you to link to the tRestClient using an OnComponentOK link. Please change the row link to an OnComponentOK link.
After the tRestClient, you need to add a tExtractJsonField. This is used to extract the values from the JSON that is returned. I assumed that you would be using this as otherwise you cannot extract the values. You need to extract the "next" element to a column called "next".
This is then linked to the tJavaFlex. Your tJavaFlex code can remain the same but it must be moved to the Main Code section.
The Start Code section is triggered before the component is used and the End Code section is triggered after it has finished processing rows. The Main Code section is processed for every row.
This should get you a bit further.
i am unable get the next from the root
can you help i have tried this one in textractjson component
I believe your "Loop Jsonpath query" needs to be "$" and your mapping should be "next"
in the trestclient component and no errors in the code
i have given url as
((String)globalMap.get("myUrl"))
and i am getting an error like this
if i give the url in trestclient with "https://flow.pluralsight.com/v3/customer/core/?offset=0" i am able to get only one value
Can you show me all the places that you are setting the globalMap value please? There should be a tJava setting this before the tLoop and then it should be set depending on the value of the "next" value.
I am posting all the components details
textractjsonfield component
tjava component
tjavaflex component
tloop component
trestclient component
The tJava where you are setting the globalMap should not have any code in it. It is a dummy component to simply allow you to connect the OnComponentOk link. You need a tJava with that code in it BEFORE the tLoop
Is it like this the component should
and the remaing compnents data is same
Yes, that looks correct. The tJava_1 should have no code in it.The tRestClient_2 should refer to the globalMap value set in tJava_2. The tExtractJsonFields_2 should extract your data. The tJavaFlex will set your url in the globalMap again...IF a new URL is returned