Select to view content in your preferred language

Apply Asset Package: float changes to double in enterprise geodatabase

477
11
Jump to solution
05-09-2024 12:28 PM
Andy_Morgan
New Contributor III

I'm using ArcGIS Pro 3.0.3 (UN schema version 3, untools version 3.0.0). Apply Asset Package changes my Float data type fields to Double data type in the output enterprise geodatabase.

Is this a known bug? Is there any way to prevent this conversion? Was it fixed in 3.1 or later? I don't understand why this happens if Float is a valid data type in EGDBs, too. Why can't it be retained? If asset packages cannot handle Float then that means I change my entire workflow and create all of them directly in the EGDB...which makes for a very inconvenient deployment preparation. Not only that, if you were to export the EGDB to asset package and bring it back in, you'd have to re-create all your fields again? ...or just accept Double 38 precision, 8 scale, instead of Float which is not ideal if you want to limit numbers, have smaller decimal places and save a little data storage.  

0 Kudos
11 Replies
PaulLeBlanc1
Esri Regular Contributor

untools 3.1.1.1 is uploaded here and can be used like so. This is a RC build, so caveat emptor, not supported, etc. Please reach out to pleblanc at esri dot com (or direct message me here) with any issues/questions.

 

import untools
import arcpy

# Override precision and scale for all float fields.
untools.common.settings.SINGLE_PRECISION_SCALE = (6, 1)
untools.common.settings.DOUBLE_PRECISION_SCALE = None  # The default.

arcpy.pt.AssetPackageToUtilityNetwork(...)

 

To install, open a python command prompt and run conda install solutionsdev/label/pro3.1::untools

Andy_Morgan
New Contributor III

Awesome, thanks so much Paul. I don't have Pro 3.1, but soon enough I'll upgrade and try this out. This seems like a good solution for most people (...who care at all about precision/scale properties).

0 Kudos