Skip to main content
Best Answer

Can you use a WHERE clause on a Format attribute?

  • December 4, 2018
  • 2 replies
  • 39 views

drc43
Contributor
Forum|alt.badge.img+12

I have a large dataset in an Intergraph Geomedia SQL Server feature class that is a compound feature class. It is a combination of line and area features, but I only want the area features. Because of the size of the dataset, I would like to get the database to do the work separating the two as it reads in the data (not using a GeometryFilter on the canvas).

To do this, I'm trying to use a WHERE clause on the reader that only selects a certain geometry type from an exposed Format attribute ("fme_geometry" = 'fme_polygon'). But this isn't working. I've been successful with a similar WHERE clause on a User attribute, but can't get any results with the Format attribute.

Is it even possible to use a WHERE clause on a Format attribute?

Best answer by daveatsafe

Hi @drc43,

FME uses the Where clause as part of the SQL query sent to the target database. This is quite effective in offloading the filtering to the (much faster) database engine.

However, the format attributes are created by the FME reader to hold structural information about the features, and so are not known to the database.

If Geomedia had a SQL function that would return the geometry type in the database, you could use that in the where clause instead.

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.

2 replies

daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • Best Answer
  • December 5, 2018

Hi @drc43,

FME uses the Where clause as part of the SQL query sent to the target database. This is quite effective in offloading the filtering to the (much faster) database engine.

However, the format attributes are created by the FME reader to hold structural information about the features, and so are not known to the database.

If Geomedia had a SQL function that would return the geometry type in the database, you could use that in the where clause instead.


drc43
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • December 5, 2018

Hi @drc43,

FME uses the Where clause as part of the SQL query sent to the target database. This is quite effective in offloading the filtering to the (much faster) database engine.

However, the format attributes are created by the FME reader to hold structural information about the features, and so are not known to the database.

If Geomedia had a SQL function that would return the geometry type in the database, you could use that in the where clause instead.

Okay, I was wondering if something like that was happening. That makes sense, thanks for clarifying that for me Dave.