Question

SDE reader - don't read geometry

  • 7 November 2017
  • 3 replies
  • 2 views

Badge

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


3 replies

Badge +10

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

Userlevel 4

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
Badge

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.

Reply