Relational join without creating a new hosted feature layer?

478
6
08-20-2020 03:03 AM
ChrisBuckmaster2
New Contributor III

Hi

I have a hosted feature layer in my ArcGIS Online content that contains district boundaries in my authority and includes a boundary code ID field.

Each week statistics are generated for each district as a CSV file and I wish to be able to upload and replace this CSV to ArcGIS Online and to add a relational join to my hosted feature layer - I don't want to have to generate  a new hosted feature layer each week as that seems to just add additional work to the workflow.

Are there options to add relational joins between hosted layers and CSV files so I can just update the separate CSV without having to manipulate the hosted feature layer?

Thanks

0 Kudos
6 Replies
ScottMoore__Olympia_
Esri Contributor

Publish the CSV as a hosted table and then you can use the Join Features tool with the option to Create results as hosted feature layer view.

Join Features—ArcGIS Online Help | Documentation 

Then, you can overwrite or "upsert" your table when you get new updates and the view is dynamic and will reflect the join.

https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/whats-new-with-hosted-feature-...

This will keep the same hosted feature layer (boundaries) joined dynamically to the hosted table (from the CSV) and the only thing you are updating weekly is the data in the hosted table.  No need to create new hosted feature layers week to week.

I hope that helps!

0 Kudos
ChrisBuckmaster2
New Contributor III

Thanks for the idea Scott, I will see how well this works for our processes.

0 Kudos
ChrisBuckmaster2
New Contributor III

Hi Scott

I have gone through your suggestion as follows:-

1. Upload my shapefile boundary as a hosted feature layer.

2. Upload my CSV file as a hosted table.

3. Create a web map with both layers and then use the 'Join Features' option with 'Create results as hosted feature layer view' ticked which produces a new hosted feature layer view.

I then go back to my hosted CSV table and look at the options to try and overwrite it, but I only seem to have the option to append as shown in the attached image.

I wish to overwrite my CSV table as all the data will have changed, are you able to offer any suggestions as to why I do not see the overwrite option?

Thanks

0 Kudos
ChrisBuckmaster2
New Contributor III

Following on from this, I deleted the hosted feature layer view from the join and the option to now overwrite my CSV layer exists, but I don't want to delete the joined feature layer view, simply just update the CSV file without having to do that workflow again.

Scott Moore (Olympia)‌ can you confirm that I should indeed be able to overwrite my hosted CSV table after it has been used in a hosted feature layer view join?

0 Kudos
ScottMoore__Olympia_
Esri Contributor

Ok, I wonder if it would work for you to go into the services directory for the hosted table and delete all of the records and then use the append through the item details page.

Maybe try this and see if it works for you.  The analytics team is looking at this so they may use this use case to improve the experience.

ChrisBuckmaster2
New Contributor III

Thanks Scott Moore (Olympia)‌ that seemed to work I think!

What I would say is that it probably isn't the most logical way of being able to update the data, as I didn't seem to be able to do it through the item's main page.

Hopefully the analytics team can review and improve the experience as it must be a fairly common use case.

0 Kudos