Is it possible, and if so how, to use a hosted feature layer from our Enterprise Portal in an AGOL notebook? We don't have the Notebook Server Extension for Portal, so hoping to run a simple script from AGOL. Thanks!
Absolutely! We used to do that for nightly scripts. All you have to do is connect to your Portal in the notebook.
from arcgis.gis import GIS gis = GIS('your portal url', 'user', 'password') # do your stuff here
Thanks @jcarlson !
Of course!
I know you didn't ask about this, but some advice: if you're using the AGOL notebook env, you may run into situations where you really need some other module that's not part of the default environment. If that happens, don't forget about throwing terminal commands into a cell with a "!" prefix.
If it's a small one-off, you can have the notebook install modules ad-hoc.
import sys!{sys.executable} -m pip install some_other_module
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.