-Working with ArcGIS Enterprise 10.8. Server federated with Portal
I've published a feature class to Portal referencing registered data from our SQL Server database. The feature layer in Portal behaves as expected and edits made are showing in the source dataset in SQL Server.... all good.
My problem is that I want to make a schema change to this feature class (add a field), but I'm having trouble getting this change to be honored when I republish to Portal.
What I've tried:
- I stop the map service in ArcGIS Server Manager to remove the lock on the feature class
- I added the field to the feature class.
- I first tried simply restarting the map service, but I couldn't see my new field in Portal.
- I then assumed that republishing was required for me to see my new field in Portal, so I overwrote the layer in Portal, but I still can not see the new field.
- I thought this was strange, so I published a new feature layer to Portal from the same data source, and even this feature layer did not show my new field!!
What is the expected workflow to get a schema change made to a feature class in SQL server (add/remove field, add domain value, etc) to be reflected in the map service in Portal?
Solved! Go to Solution.
We're on postgres, but the workflow ought to be the same:
Stopping and starting, as you assumed, won't be enough to catch a schema change, as the fields need to be written into the service definition.
When you published a new layer, did you also give it a new name? I doubt that a browser cache issue would cause this, but it's worth checking.
Is your data versioned, or do you use views at all?
That's very curious... The fact that the new-name version of this would also lack the new field points to this perhaps being a DB-level issue. Do you have other services or a throwaway layer you can test this with?
Also, can you confirm whether or not the field is present in the service JSON at web-adaptor/rest/services/path-to-layer/FeatureServer?f=pjson
If you're comfortable with it, try editing the service defintion directly to add the field. You can use AGO Assistant to do it. I've had other layers (hosted, not server-based) where I had to add a new field via the JSON directly, and it worked.
I've done a few tests with Pro 2.7.1 and ArcGIS Enterprise 10.8.1, and while I've seen inconsistencies in the way that the addition of new fields manifests in Server/Portal, in general it has worked with just a service restart (i.e. not republishing the service).
A few things to check:
1) Is the new field being flagged as visible in the Fields view from the map that you're publishing?
If not, then it won't appear in the service definition.
2) Do you see the new field listed in the rest endpoint for the map/feature service?
3) Has the field been added but is just not visible by default in Portal (e.g. from the Data tab on the Portal item page)?
Something that I've seen with a fair bit of consistency is new fields not being made visible by default.