XY Table To Point Dropping Fields

533
3
03-10-2022 07:06 AM
by Anonymous User
Not applicable

I have a table in a SQL2019 database that contains X, Y coordinate information and various attributes. Work is being done in ArcGIS Pro 2.7.3

Method 1

Right-click is used to Export -> Table to Point Feature Class is executed from the Database connection, the resulting feature class does not have all of the fields in the original Table.

Method 2

Table is added to map from the database connection and then XY Table to Point is run from the geoprocessing pane, the resulting feature class has all of the expected fields.

Any idea why these results are not the same? Happy to provide more information if told what could be useful.

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

What are the field names that are being dropped?  Reserved names? or do they have no apparent pattern?


... sort of retired...
0 Kudos
by Anonymous User
Not applicable

Yes. I meant to initially include this information. The highlighted 'Date'  fields are dropping off using method one. They are maintained in method 2.

DateFields.PNG

0 Kudos
DanPatterson
MVP Esteemed Contributor

Your second option, of not using the shortcut but the tool is the way to go.  It appears from the script

"C:\... Your_Install_Folder ...\Resources\ArcToolBox\Scripts\XYTableToPoint.py"

That it use cursors to complete the work, so I would expect a better handling of dates and times.  There are lots of threads on the web about how to handle datetime and csv outputs, many are language specific and many suggest converting to text fields first.  I would skip doing workarounds and let the arctoolbox tools/scripts handle the work


... sort of retired...
0 Kudos