Select to view content in your preferred language

Import .CSV to enterprise geodatabase — Import schema only

497
5
10-24-2024 12:35 PM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

ArcGIS Pro 2.9.5; Oracle 18c 10.7.1 EGDB:

When importing a .CSV into an enterprise geodatabase as a standalone table:

It would be great if we could import the schema only, not the data.

Use case: Modify the field data types in the new table via the Fields View before importing the data, since field types can only be changed when the table is empty. I'm aware that I can import the rows and then delete them. But that seems unnecessarily cumbersome.

Catalog > right-click a .SDE connection > Import > Table > Table to Table GP tool

5 Comments
Bud
by

Yes, the field data types can be defined when importing. https://community.esri.com/t5/arcgis-pro-ideas/define-field-data-types-as-part-of-import-process/idc...

But I still want the option of importing an empty table and then fiddling with the fields before importing the data.

Bud
by

@AlfredBaldenweck might like this workaround:

Use the SQL expression WHERE 1=2 to exclude all rows from the import, importing the schema only.

AlfredBaldenweck

That is extremely sneaky. I love it.

Bud
by

For my notes, Table to Table (ArcGIS Pro 2.9.5) has been replaced with the Export Table geoprocessing tool in newer versions of Pro. 

https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/table-to-table.htm

 

Bud
by

An alternative option:

Create a table from scratch using Catalog and import the fields/schema from the CSV, instead of importing the CSV as a new table. Creating a table from scratch would allow me to easily adjust the imported field types and lengths while creating the table.

Bud_0-1730370212669.png