Skip to main content
Solved

Can you use a WHERE clause on a Format attribute?


drc43
Contributor
Forum|alt.badge.img+11
  • Contributor

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.

View original
Did this help you find an answer to your question?

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • 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+11
  • Author
  • Contributor
  • December 5, 2018
daveatsafe wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings