Select to view content in your preferred language

Importing CSV — Is there a GP tool that correctly interprets values when setting field data types?

529
2
10-24-2024 05:37 PM
Bud
by
Esteemed Contributor

ArcGIS Pro 2.9.5; Oracle 18c 10.7.1 EGDB

I'm trying to import a CSV into an enterprise geodatabase: Catalog > right-click a .SDE connection > Import > Table > Table to Table GP tool

Unfortunately, Table to Table is doing a poor job of interpreting the values when setting the field data types in the new table.

For example, in a number field in the CSV, the first value is 0, and subsequent values have decimal places like 1.234. The new table's data type is automatically set to an integer due to the 0, so when loading the data, the decimal places in the other numbers are getting truncated (or rounded?) to integers, which is incorrect.

Is there a different tool that does a better job?

0 Kudos
2 Replies
Bud
by
Esteemed Contributor

It looks like Table to Geodatabase might be doing a better job at interpreting the values when setting field types.

Bud_0-1729820098247.png

Bud_1-1729820122357.png

The numbers are interpreted as doubles; a double field is created, not an integer, which is correct. The numbers with decimal places are loaded into the new table without issue.

0 Kudos
BarryNorthey
Frequent Contributor

This link might be relevant.