Solved

How do I join a CSV to an Esri feature class in an oracle dB and write out the matched records to a feature class in a file geodatabase on my local machine?

  • 24 May 2023
  • 6 replies
  • 4 views

Badge +2

I'm currently using a CSV reader, Database Joiner and ESRI Geodatabase Writer. The join is working perfectly: Screenshot 2023-05-24 141658 

But when I connect the joined output to the geodatabase writer no records are written to the feature class in the file gdb and I get an error saying "Cannot write a non-area feature to an area feature class": Screenshot 2023-05-24 152920I have tried both Drop and Create and Truncate Existing for Table Handling.  

Screenshot 2023-05-24 153145Any suggestions are greatly appreciated.

icon

Best answer by hkingsbury 24 May 2023, 23:26

View original

6 replies

Userlevel 5
Badge +29

You're trying to write non spatial features to a spatial (polygon) layer.

You'll need to change the Geometry in your writer to "Table"

Badge +2

Thanks for your response hkingsbury. Changing to "Table" creates a fgdb table. How do I create a feature class?

Userlevel 5
Badge +29

Thanks for your response hkingsbury. Changing to "Table" creates a fgdb table. How do I create a feature class?

A table is a type of feature class. Are you expecting the data to be spatial? In its current form there is no geometry on the feature to make it spatial

Badge +2

Sorry for the confusion, Yes I'd like the output to be spatial. The dataset I'm joining the CSV to is a polygonal feature class in an oracle enterprise database. I want to join the matching record's attributes of the CSV to an existing buildings dataset and export to a file geodatabase on my local machine.

Userlevel 5
Badge +29

Sorry for the confusion, Yes I'd like the output to be spatial. The dataset I'm joining the CSV to is a polygonal feature class in an oracle enterprise database. I want to join the matching record's attributes of the CSV to an existing buildings dataset and export to a file geodatabase on my local machine.

Is the geometry coming through encoded in an attribute? If it is, you'll need to use a geometryreplacer to turn it spatial.

 

If its not coming through at all with the databasejoiner, you might need to look at using an oracle reader and join the data with a featuremerger or featurejoiner

Badge +2

This was the issue! The geometry wasn't coming through with databasejoiner. I used an oracle spatial reader and fed both datasets into Featurejoiner and was able to write out a polygonal feature class! Thanks so much hkingsbury I really appreciate the help.

Reply