Overwrite a Feature Service used in Join Features as Hosted Feature Layer Views

2445
27
Jump to solution
02-01-2019 03:57 AM
AnthonyJones5
Occasional Contributor

I recently read the article from Paul Barker titled Bring your data closer together: Save analysis results from Join Features as Hosted Feature Layer Vi.... This is a really useful feature but I'm having trouble overwriting my feature services that are used in the join, where a hosted view is created. In the post Paul mentions that "feature layers that participate in view layers with joins cannot have their schema altered and are always read-only and cannot be used offline.". Does the feature layer being read only mean that it can't be overwritten?

Whenever I try and overwrite my feature service in Pro it simply says Failed to publish web layer. I then find that the data tab for my hosted view just says Data Error. Note that when I'm trying to overwrite my feature service the schema is exactly the same.

It would be a shame if this can't be done as one of my features used in the join is updated on a weekly basis so overwriting is the best way to keep this up to date online.

Any help with this would be much appreciated.

Thanks

Anthony

0 Kudos
1 Solution

Accepted Solutions
KhaledHassen
Esri Contributor

Yes this is currently a limitation in publishing with overwrite. Online team will work in removing this limitation in the next release or so.

But I think we might need to consider using Append API with upsert capability. This where you get a chance to insert new data or update existing data from different sources based on the use of a unique column in the destination layer. Actually this is a better solution that keep overwriting your data from the same source regularly. 

Once you use append and update the source, existing views should continue working and picking up the new changes in the source data.

Thanks

Khaled Hassen

View solution in original post

0 Kudos
27 Replies
KhaledHassen
Esri Contributor

Yes this is currently a limitation in publishing with overwrite. Online team will work in removing this limitation in the next release or so.

But I think we might need to consider using Append API with upsert capability. This where you get a chance to insert new data or update existing data from different sources based on the use of a unique column in the destination layer. Actually this is a better solution that keep overwriting your data from the same source regularly. 

Once you use append and update the source, existing views should continue working and picking up the new changes in the source data.

Thanks

Khaled Hassen

View solution in original post

0 Kudos
AnthonyJones5
Occasional Contributor

Thanks for the response on this Khaled, it's good to know that this limitation may be removed in a future update.

So is there anyway to overwrite existing data based on a unique column in Pro at the moment? As a workaround I had thought to just try a join and then overwrite fields on the feature service in Pro but find that as my feature has nearly 80,000 records then this is extremely slow. I'm not a developer so am not familiar with the ArcGIS API so is the upsert capability currently available in any of the geoprocessing tools in Pro?

Thanks

Anthony

0 Kudos
KanchanaKarthikeyan
Esri Contributor

I wanted to use the Dynamic 1:1 join in a Collector Map to visualize the parent records based on the latest related table record that I submit. The view in Collector map would also help me pass the latest status to a survey using the Survey123 Custom URL Scheme. The purpose was purely just to visualize and pass the joined value from the related table to a Survey.

The hosted view that gets created as a result of Join Features Tool is not enabled for sync and cannot be made to do so from the Settings Interface in the item. It also does not create a view that is similar to a hosted view that we can create from hosted feature layers. I also noticed that it does not grab the service capabilities from the parent layer if it was published with syncEnabled = 'true'.

While editing the JSON is not best practice, I went ahead and syncEnabled the Dynamic Join View that I created, using Update Definition, and added that layer into the Collector map. That activated the Offline Map Settings in my web map settings and it worked from Collector.

JimmyKnowles
Occasional Contributor II

Kanchana, I have a need to this, so I was curious if you have experienced any negative effects from enabling sync on the dynamic join view? Does anyone know what negative repercussions could occur from doing this? Thanks.

KhaledHassen
Esri Contributor

Hi Jimmy,

Not sure why you need to enable sync on the join views?

We do not support editing of join view yet. So even though you might be able to enable sync on join views between two services, you will not be able to edit them or apply any edits from offline maps. Extracting changes from join views to offline map is not supported currently. Until it is fully supported on the server, I will not pursue sync for joined views.

Join views should be updated though without enabling sync on the join view when the source data changes.

Thanks

Khaled Hassen

0 Kudos
JimmyKnowles
Occasional Contributor II

Hi Khaled, thanks for your response. Here's why I'd like to enable sync on the join views. It is strictly for display, no editing. I understand that the editing takes place on the source layers. I have symbology and filters that are based on attributes that are in the join view that aren't in the source layer. If it weren't for the symbology and filters, I'd just use the source layer.

0 Kudos
KhaledHassen
Esri Contributor

Thanks Jimmy.

>It is strictly for display, no editing.

The only issue I see here is that you will not be able to sync the offline from the join view. For instance, you will not be able to update your offline map from the joined view.

I am assuming you are creating offline from the join view. 

Thanks

Khaled

0 Kudos
JimmyKnowles
Occasional Contributor II

Yes, I'm creating offline map from the join view. To add some detail, the offline map will be used for editing, but on other sync-enabled layers. Are you saying that edits on the sync-enabled layers will not be able to be synced?

0 Kudos
KhaledHassen
Esri Contributor

I mean only the join view layer. All other non-join layers should be fine and be able to sync.

0 Kudos