Hi,
I have AGS11.3 + UN v7 on Oracle DB. I need import un association. I have csv/excel based required by tool Import Association. Import Association work fine on file geodatabase un.
CSV example:
ASSOCIATIONTYPE,FROMFEATURECLASS,FROMASSETGROUP,FROMASSETTYPE,FROMGLOBALID,FROMTERMINAL,TOFEATURECLASS,TOASSETGROUP,TOASSETTYPE,TOGLOBALID,TOTERMINAL,ISCONTENTVISIBLE,PERCENTALONG |
Containment,StructureJunction,Pozzetti,Cameretta di ispezione,{450CCDC5-24AA-4018-9001-793E856513CB},,AqDevice,Valvole,Valvola di rete,{5679CD23-D8EC-44DA-95C5-87632E35D40E} ,,False, |
Now, I need import association directly on un feature service. is there a py script/tool that I can use?
It's possible (https://developers.arcgis.com/rest/services-reference/enterprise/appendix-working-with-the-feature-s...) and I would like use a *.py script within pro to do this operation.
Thank you
Solved! Go to Solution.
In the payload you pasted in questions there seems to be an additional space.
'TOGLOBALID': '{5679CD23-D8EC-44DA-95C5-87632E35D40E} '
There is a space at the end of the TOGLOBALID.
It may be worth checking if the csv has a rogue space at the end of the TOGLOBALID that the code might be ingesting.
PS - The format of the globalIDs is correct.
The association table supports ApplyEdits, so you just need to craft the apply edits payload just like editing any other feature service/table.
The association table is always layer id 500001
hi @MikeMillerGIS ,
i tried this:
Could be the format of the globalids. Do they have {}? Can you use fiddler or something and share what the payload looks like? Compare that to the payload when you make association in Pro.
The other thought I had, have you tried the append gp tool? You can make a table view from the url and call change version(gp) on it.
Could be the format of the globalids. Do they have {}?
'FROMGLOBALID': '{450CCDC5-24AA-4018-9001-793E856513CB}'
'TOGLOBALID': '{5679CD23-D8EC-44DA-95C5-87632E35D40E} '
The other thought I had, have you tried the append gp tool? No, append gp tool works on
GP Append does work with services
In the payload you pasted in questions there seems to be an additional space.
'TOGLOBALID': '{5679CD23-D8EC-44DA-95C5-87632E35D40E} '
There is a space at the end of the TOGLOBALID.
It may be worth checking if the csv has a rogue space at the end of the TOGLOBALID that the code might be ingesting.
PS - The format of the globalIDs is correct.
Did removing the space fix it? @gp2014 @gpgisandsky ?
Hi @gis_KIWI4 , Im waiting to restore the db. I'll try next day. thank you