Skip to main content
Question

SDE reader - don't read geometry

  • November 6, 2017
  • 3 replies
  • 20 views

setld_solutions
Contributor
Forum|alt.badge.img+8

Is there a way to tell an SDE reader to forget the spatial?

I can read as SQL Server Non Spatial, but I lose the SDE ST.Area attribute, which I need.

However, I don't need the actual geometry and reading it wastes 30 minutes.

---- Hoping for an "opposite of Geometry Only".

Thanks,

Jake

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

richardatsafe
Safer
Forum|alt.badge.img+10
  • Safer
  • 217 replies
  • November 6, 2017

Hi @setld_solutions,

I think the easiest route is to try using the sqlExecutor to select just the columns you need.

https://knowledge.safe.com/articles/19638/using-the-sqlexecutor-or-sqlcreator-to-issue-comma.html


david_r
Celebrity
  • 8394 replies
  • November 7, 2017

I agree with Richard, you could either use the SQLExecutor or the SQLCreator with the SQL Server non spatial reader. 

If your geometries are stored as sde.st_geometry objects, you can do something like:

SELECT 
  ATTRIBUTE_A, 
  ATTRIBUTE_B, 
  SDE.ST_LENGTH(SHAPE) AS SHAPE_LENGTH
FROM MY_SCHEMA.MY_TABLE

Or if they're stored as SQL Server Spatial geometry objects, it will probably look more like:

SELECT 
  ATTRIBUTE_A, 
  ATTRIBUTE_B, 
  SHAPE.ST_LENGTH() AS SHAPE_LENGTH
FROM MY_SCHEMA.MY_TABLE

setld_solutions
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 27 replies
  • November 7, 2017

Thanks guys. I use a lot of SQL Executor - tried it, but could only pull SHAPE. I've tried all syntax variants to pull what shows up as [SHAPE.STArea()] in ArcCatalog, without success. SSMS doesn't show this column (sub of SHAPE). I had hoped that since there is a "Geometry Only" setting, there'd be a "Table Only" setting for an SDE reader. Appreciate your input, but I think I'll go knock something else out now.