Select to view content in your preferred language

Create XY Event Layer from a Query Layer in Modelbuilder

2156
3
04-28-2014 09:32 AM
ShawnHibbs
Deactivated User
I have been trying to make a model that will create an XY Event Layer from a Query Layer of an sql database. I can do it manually with no problems but when I try it in Modelbuilder I get this error "ERROR 000223: Cannot extract event table properties
Failed to execute (Make XY Event Layer)."

I have tried to convert it to a table and get errors every time. Is there a solution to this?

Thanks
Tags (2)
0 Kudos
3 Replies
WilliamCraft
MVP Regular Contributor
From your query layer, try creating a Table View first and then go ahead with making your XY event layer using the table view instead.  When I looked at the Esri documentation for the acceptable inputs to generate the XY event layer, a table view was listed as the data type.  Give that a shot and post back with your results.
0 Kudos
ShawnHibbs
Deactivated User
Tried that to. Kept getting an error that it could not access the data from the query. In fact, it seems that anything I try to run on the query layer in model builder is giving me an error. I have permission rights and can do all the same processes manually with no problems. I just can't figure out why model builder is not liking it.
0 Kudos
WilliamCraft
MVP Regular Contributor
How complex is the SQL for your query layer?  You might be able to generate the table view directly from the table in the database instead, and then make the XY Event Layer... thus bypassing the query layer altogether.
0 Kudos