Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Is there any support or recommendation for instantiating Things in bulk / in batches? We'd like to be able to create many instances of a ThingTemplate, each representing a separate real-world asset, without having to do it manually through Composer.
In the past we've created scripts to generate importable XML files, but this feels like a clunky custom approach to what I thought would be a common operation. Are there any alternatives?
Solved! Go to Solution.
Hi Chris,
You can easily implement something with Resources["EntityServices"].CreateThing(). I already did it through a csv (exported from Excel ) file with configuration parameters for each new thing.
Carles.
Hi Chris,
You can easily implement something with Resources["EntityServices"].CreateThing(). I already did it through a csv (exported from Excel ) file with configuration parameters for each new thing.
Carles.
Carles is right - Creating a Service, either through a Java Extension or as JavaScript, that gets called for each new Thing is the recommended way to achieve this. This is a common use case for when Things need to get created 'on the fly'.
However, doing a bulk import from something like a csv file (like Carles mentioned) is the correct approach if you want to add large numbers at one time.
Thanks - this approach is working very well.