Hi,
I am making an API call to users using querydef inside the JS activity of workflow. Since Querydef can handle 10k records at a time, we split the entire records into 9k each and used multiple javascripts as show below. We created one JS activity and copy pasted the same for the other two. I am using 'logInfo' inside the JS activity to print the users the the API call has been made.
The issue is, when right click on The JS activity and do display logs, I see the entire consolidated logs of the 3 JavaScript activities inside each java script activity . For example: in the below case, I see 27k user data inside each JavaScript activity when I do 'Display logs' instead of the 9k API call each JS activity has performed individually. Is it an expected behavior? How can I be sure that Multiple API calls are not made to the same user? Please help
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @BhaskarJC
Display the target only work with activites which generates a temporary schema on execution. JavaScript activity does not create a temp schema and the temp schema from previous activity is used and that is why you see all records in the display target.
I've noticed that in workflows where I copy and paste code activities, they often seem to retain the logs of the copied activity and I end up needing to check the timestamps to see whats actually happening.
I often like to wrap easy to spot headers around my code (with the name of the activity at the bottom as the logs display newest to oldest, so it'll be at the top).
logInfo('/////////////////////')
-CODE TO PRINT USERS-
logInfo('NAME OF MY ACTIVITY')
logInfo(new Date())
logInfo('////////////')
You could even drop the code to print out the specific users and it'll let you confirm 100% WHAT is being executed there.
I also wrote a quick example up on how I've overcome the 10k queryDef limit by ordering the records in my query and putting everything within a loop HERE
Views
Replies
Total Likes
Hello @BhaskarJC
Display the target only work with activites which generates a temporary schema on execution. JavaScript activity does not create a temp schema and the temp schema from previous activity is used and that is why you see all records in the display target.
Hi @BhaskarJC,
Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies