Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi,
I'm trying to combine two analytics-related services- the first one ('createDataset2' in the attached images) creates an analytics dataset using the "AnalyticsDatasetRef" that outputs a dataset ID that I will later feed into the createJob() service under the Analytics Training_Thing.
However, before I train a model, I want to make sure that the Dataset creation job is 'completed', and I can check this using the getJobStatus() service under the Analytics Data_Thing. In my service, I first call 'createDataset2' to create the analytics dataset, and then have a while loop that calls the getJobStatus() service until I get a return value of 'COMPLETED', indicating that the dataset creation is complete.
I've tested both parts of the service individually and they work, but when I combine them I get an output error (attached) that I'm unsure of how to debug. I'm thinking that the while loop may be causing issues- any tips/ideas would be greatly appreciated! Thanks!
Solved! Go to Solution.
Hello,
I wonder if the issue is caused by a timeout issue, can you check your log files and see if there are any timeout related errors being reported. More information on timeout issues can be found here in the Help Center.
Warm Regards,
John
Hello,
To help me better understand the error, how long does the script run before it errors out? Also, if the script runs for a while, does it error out when the dataset upload step is completed, or does it seem to end almost instantly? Could you also confirm what version of ThingWorx Platform and Analytics Server you are using?
Thanks,
John
The script runs for about a minute and a new datasetID is generated every time before the script errors out. However, when I manually go to the Analytics Data_Thing and run the getJobStatus() with the new ID after it errors out, it shows up as "RUNNING". From this, I assume the error comes from the while loop that is checking for a "COMPLETED" status. I tried putting some pauses in the while loop but that did not help.
I am using ThingWorx 9.1.0-b10877 and Analytics Server: EC2AMAZ-4HV0AJ2
Thanks!
Hello,
I wonder if the issue is caused by a timeout issue, can you check your log files and see if there are any timeout related errors being reported. More information on timeout issues can be found here in the Help Center.
Warm Regards,
John
Hi,
I checked the Logs under Monitoring and didn't see anything specific to a timeout error but understand how that can be an issue. Do you have any recommendations on how to structure service code in order to avoid these errors (maybe a callback function)?
Thanks!