Python API Import_Data Sanitize_Columns Arg Not Honored in AGOL Notebooks, Desktop Notebook (ArcGIS Pro 3.0) Does...

537
0
08-01-2022 11:56 AM
Status: Open
Labels (1)
DannyGant
New Contributor II

Using the "import data" function (and I believe others as well) there is a command argument to "sanitize columns" which I set to false. If you set this to true it will alter the field names which is NOT what we want for this particular script. Setting to false is our desired workflow. That said, the online version of notebooks DOES NOT honor this setting to false and thus "sanitizes" the field names anyway. At least when importing a Spatial Dataframe.  Works in desktop (ArcGIS Pro 3.0) notebooks, doesn't in online notebooks. Same exact command. Would be nice if these arguments where honored in both environments (online/desktop notebooks). As of now, we can only run our script on the desktop side.  Ideal workflow is on AGOL as a scheduled task.

newitem = mygis.content.import_data(feat_sdf,target_sr=int(targetSR),sanitize_columns=False)

 

Tags (3)