Updating Hosted Feature Layers created from gdb Item

592
5
Jump to solution
02-02-2021 07:00 AM
Labels (1)
RichardHowe
Occasional Contributor

I have a bunch of feature layers in AGOL that were created from zipped file geodatabases. 

I would like to update the data in these feature layers and I was wondering what the correct practice is?

Both the feature layers and the geodatabase item have an "update data" button.

The only one that seems to make a difference to the viewable data though is the update button in the feature layer. I can seemingly update the geodatabase item, but I can't see any obvious benefit.

So does it matter if I only update the feature layer and not the geodatabase item? Or do they need to be kept in sync?

If the correct practice is to keep them in sync, then it would be super useful to have the option to "update feature layers created from this gdb" when updating...so you don't have to essentially upload the data twice!

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Notable Contributor

Here's the relevant section of the AGOL docs.

In brief: from the feature layer's page in your Contents, click Update Data → Overwrite Entire Layer, then find and add the file geodatabase. The filename needs to be the same as before. Doing this will both update the hosted layer's contents, as well as update the source file (in this case the zipped FGDB) from which it was originally published.

By updating from the feature layer's page, you only have to upload the new data once.

 

- Josh Carlson
Kendall County GIS

View solution in original post

5 Replies
jcarlson
MVP Notable Contributor

Here's the relevant section of the AGOL docs.

In brief: from the feature layer's page in your Contents, click Update Data → Overwrite Entire Layer, then find and add the file geodatabase. The filename needs to be the same as before. Doing this will both update the hosted layer's contents, as well as update the source file (in this case the zipped FGDB) from which it was originally published.

By updating from the feature layer's page, you only have to upload the new data once.

 

- Josh Carlson
Kendall County GIS
RichardHowe
Occasional Contributor

Josh, thanks for the reply. I read that too, but where I come unstuck, for want of a better word is:

a. Why does the gdb item not have it's modified date changed when I do this? I would have more faith that it was happening if it did :)

and

b. What's the purpose of the "Update data" button on the geodatabase item?

0 Kudos
jcarlson
MVP Notable Contributor

Good questions! When I tested this, my FGDB did get a new update timestamp, so that seems a bit odd.

jcarlson_0-1612280747846.png

 

As to the second question, not every file in your contents is going to be a published feature layer, and indeed many filetypes can't be, but you would still want the ability to update it. For example, you might have PDF maps, layout templates, etc., that need to be updated. That, I think, is what the other update button is for.

At our County, we actually do have a FGDB or two that we don't publish as a hosted layer, but maintain as a portal item for users to download, so that would be a situation in which the GDB item's update button becomes relevant.

- Josh Carlson
Kendall County GIS
RichardHowe
Occasional Contributor

 Josh, thanks again. I'm going to retest the update against another gdb/feature layer and see if I get the same behaviour. The gdbs in question are quite large, containing multiple feature classes and serving multiple feature layers, so I guess it could be that the timestamp hasn't changed (yet) as it's still updating all the feature layers. I'll recheck tomorrow and report back!

Excellent second point as regards non-spatial/feature data in AGOL, hadn't thought of that. :)

RichardHowe
Occasional Contributor

In the interests of completeness on this topic I just want to report back, that @jcarlson was correct in his assessment. Many thanks Josh/

I updated one of our feature layers and left it updating overnight. When I revisited this morning all the individual feature layers had updated, AND the souce gdb item had updated as well.