We have data that is tied to a SQL server, in order for it to update, and theoretically be almost real time data, in the ESRI Enterprise, I need to publish it as reference registered data.
I found when doing this there is no editing capability because it is a feature layer. There I cannot add columns to the data. I found that in order for me to be able to add columns it must be a hosted feature layer, then I can edit.
I can publish it as copy all data, and then it is a hosted feature layer and I can edit it, but it won't update automatically.
So my question is, is there a way to be able to edit the data and still have it update automatically?
Thank you very much,
Annette
Solved! Go to Solution.
Oh, that's true, you can't add columns from the Portal interface, you'd have to do it from something that has direct access to the database, then republish. You just can't modify it in-place in Portal.
If you make it into a hosted feature layer, you'll just need some kind of scripted process to keep the hosted layer up to date with the original source. We do have a few layers like that, and a basic Python script to update the hosted layer takes less than a minute to run, so we can keep our layer as up to date as we want.
You'd need some automated process in place to append / overwrite, but that can be tricky, and certainly wouldn't be near-real-time without some careful coding.
With your registered data layer, you can turn off the setting to lock the schema. If you make any changes to the schema, you can always republish the service, too.
Hello,
I unlocked the schema and it didn't work for my purposes. And actually I can edit the data in the attribute table. But I can't edit the data, under items details. I want to edit it here because I want to add new columns with dropdowns. Problem I believe is that this is NOT a hosted feature layer. And I believe because it is data connected to our SQL server and is live data it has can't be hosted.
I am trying to add to the new fields in the items details page, under data, then fields. But there is no + ADD section. See the two samples below.
I am going to try this. Take the feature layer and make it a hosted feature layer, but I am not sure if it will update as it does. I don't think it will update, I will test it.
Any other suggestions? Thank you.
Oh, that's true, you can't add columns from the Portal interface, you'd have to do it from something that has direct access to the database, then republish. You just can't modify it in-place in Portal.
If you make it into a hosted feature layer, you'll just need some kind of scripted process to keep the hosted layer up to date with the original source. We do have a few layers like that, and a basic Python script to update the hosted layer takes less than a minute to run, so we can keep our layer as up to date as we want.
@jcarlson I have the same type of question as the OP. While it's three years later now, if you remember what your python did specifically that could help me update my reference layers.
I would be interested to see @jcarlson's script if he still has it. The process is not hard if you are only moving data in one direction (from SQL to portal or vice versa), that would just be a simple append to capture data that has been added or a truncate and append if you need to post new data and edits to existing records. But the process gets much more complicated if you are trying to move data in both directions to: reconciling edits between the two locations and adding new records.