Running Enterprise 11.1 and Python 3.9.11.
We have an on-prem back up for a separate application that handles most of our operational business data stored on an MS SQL Server database, including fire hydrant locations and various associated data. I created a script that accesses the SQL Server and runs a query. That query is read by Pandas and converted to a spatial data frame using the ArcGIS API (from_xy). We then identify an existing hosted feature layer, truncate the only table in that layer, and use the "adds" parameter for edit_features to load the spatial data frame into the hosted feature layer.
We have been able to get this to run and produce the desired outputs on ArcGIS Online, but when I replace our ArcGIS Online org with our Portal in the script, the script runs without any tracebacks and we get the right number of features in the hosted feature layer, but the attribute table has blank rows for all of the features. Even stranger, all of the points are in the right locations, so it's clearly able to read the data in the X and Y columns, but even those columns show up empty in the attribute table. When troubleshooting, I've gone through and run print commands on each of the intermediate steps, and at no point is the data missing from the dataframe until the edit_features() tries to append the data to the hosted feature layer.
Resetting the ArcGIS connection to ArcGIS Online from Portal makes it work as expected once again.
Any help would be appreciated. Thanks in advance.