I exported some view/elements from a Dataminer ID = X.
I want to import them to another Dataminer, via .dmimport, but I want the imported elements, views, everything,.. to have the DMAID of the destination DMA, and not of the source DMA.
If you just want to target which agent is actually hosting the element, no need to look at the DMA id, you can refer to the “DataMiner” column of the Element view: the element ID, by design, has the the DMA id of the DMA where the element was created – it’s no longer where the element is, but just where it was created.
I guess this changed when DELT was introduced – the advatage is you can create a full set on a staging system and then export to a production environment (elements will keep the DMA id of the staging in that case).
The reason to have the ID of the destination DMA assigned is to match the whole configuration of the destination DMA: other elements parameters, databases data, etc. By having elements with different DMA ids, I have to change everything manually, assuming it’s even possible.
Hi Guilherme,
The behavior that you are describing is expected. A .dmimport package will keep the IDs of the source DMA. This behavior is to keep consistency with the information that you can include in the DMA (e.g. in a .dmimport package you can include alarm and trend data). If we allow changing the IDs, we will also need to update all the records from the alarm and trend data, which is not a good approach.
In case you are only interested in provisioning elements (without including any data), you could use the CSV import/export option (Import/Export elements from/to a CSV file)
Currently there is no out-of-the-box functionality to import/export views. However, you can create an automation script for that purpose. For example, your automation script can read a CSV file with the views to be created and use the DIS class library (e.g CreateView) to create the views.
Upvoting this answer.
On a related note, if you need to keep track of the allocated agent, a workaround was suggested here by Laurent:
https://community.dataminer.services/question/delt-element-id-dma-id-and-dataminer-agent-any-way-to-keep-the-polling-dma-in-the-exported-csv/
However this cannot be used to import on the desired agent – but I guess the CSV import can be then segmented into multipe imports, thus uploading your elements agent by agent.
What’s the reason to have the ID of the destination DMA assigned? If we understand the purpose we might be able to provide another solution.