ArcGIS Pro

How to convert field types with Data Engineering

We’ve all been there – we’re ready to do a join or run our analysis tool in ArcGIS Pro – then we realize our field is the wrong data type. You can use the fields panel in Data Engineering to quickly identify if a field has a data type that might not be compatible with your analysis. But how can you fix this?

Well, it turns out, the first option doesn’t even involve Data Engineering – it involves using the Export Features or Export Table tool with the field map to define the type. Check out the short video to see how this works.

 

If you don’t want to make a copy of your layer, you can use the Copy Data to New Field option from the right-click menu of the field in the Data Engineering fields panel. This opens the Calculate Field tool pre-configured to copy the field, so you can select the field type you would like to convert to then run the tool. The short video below shows you how to access this option.

 

Bonus: if your data is a delimited text file, you have another option for converting field type. You can modify the schema.ini file to override the data type that ArcGIS Pro has defaulted to. Check out this documentation to find out how.

A note of caution – some field type conversions can cause data loss. For example, if you convert from type long to type short, a value like 6,900,513 will have too many digits to be stored in the short field. If you tried to do this using the Copy Data to New Field option, the tool would output a null for this conversion.

View more resources about how to use Data Engineering

Watch all the Data Engineering: How to videos on our channel

About the authors

Lynne Buie is a Product Engineer on the Spatial Statistics team. She helps build spatial statistics tools and Data Engineering capabilities for ArcGIS Pro. She's passionate about using GIS to help make the world a better place.

Connect:

Ankita Bakshi is a Technical Product Engineer on Spatial Statistics Team at Esri. With a background in environmental engineering and computer science, she is passionate about solving social, economic and environmental problems with Spatial Analysis and Data Science. In her role, Ankita enjoys researching, finding solutions to build software, and loves creating video and written content to make the software tools more approachable and applicable to real world challenges. Outside of work Ankita enjoys going on hikes, painting landscapes, and dancing to Bollywood music.

Connect:

Alberto Nieto is a Product Engineer on Esri’s Spatial Statistics team. In his role, he helps research, build, and maintain spatial data science capabilities in ArcGIS and works closely with government agencies to learn about the problems our software can help solve. Alberto’s background includes fourteen years of experience, including previous roles as a GIS Developer at Capital One and NOAA's Climate Prediction Center, and as a GIS Analyst at the Census Bureau and the Alachua County Environmental Protection Department.

Connect:
0 Comments
Inline Feedbacks
View all comments

Next Article

ArcGIS Field Maps Early Access update (September 2022)

Read this article