Category: Database
Performs queries on an ArcSDE spatial database. The queries can have both a spatial as well as a nonspatial component to them.
One query is issued to the ArcSDE database for each feature that enters the transformer. The results of the query are then output to the output port that matches the table name, if it exists; otherwise, results are output to the <OTHER> port. If the Mode parameter is set to Delete, the results of the query are deleted from ArcSDE before they are output from the transformer. If the Mode parameter is set to Update, the features in ArcSDE matching the query feature will be updated with that feature's complete set of attributes.
The query feature defines the geometry which will be used to define the spatial component of the query, unless the search method is SDE_NONE. In that case, only an attribute query as defined by the where clause will be executed.
If the Remove Table Qualifier parameter is set to Yes, then user names will not be included in table names when they are not required.
If the Table Name in Attribute parameter is blank, the set of tables to query is defined by the Tables parameter, which is set in the "ArcSDE Tables" panel. Alternatively, if the Table Name in Attribute parameter is not blank, the tables to query are read from the specified attribute in the input features. In this case, the tables to query should be specified as a colon-separated list.
The complete set of ArcSDE spatial query operators is supported and each is described below:
SDE_NONE: No spatial filtering is done. Any features matching the Where Clause parameter are output, and if no where clause was specified, then all features from each target table are output.
SDE_ENVELOPE: The envelope of the output feature overlaps or touches the envelope of the search feature.
SDE_COMMON_POINT: The search feature shares at least one common point with the output feature.
SDE_LINE_CROSS: The search feature and the output feature have intersecting line segments.
SDE_COMMON_LINE: The search feature and the output feature share one or more common line segments.
SDE_CP_OR_LC: The search feature and the output feature have line segments that intersect or have a common point.
SDE_AI_OR_ET: The search feature and the output area feature edge touch (ET) or their areas intersect (AI).
SDE_AREA_INTERSECT: The search feature and the output feature's area intersect.
SDE_AI_NO_ET: The output feature and search feature have intersecting areas with no edge touching. One feature is therefore contained in the other.
SDE_CONTAINED_IN: The search feature is contained in the output feature. For area features, this is clear. If search feature is a line, then a linear feature will be output when the search feature path is included in output feature. If search feature is a point, then the search feature will be one of the output features vertices.
SDE_CONTAINS: The output feature is contained by the search feature. If both features are linear features, then the output feature must lie on the search feature's path. Point features that lie on a search feature vertex are also output.
SDE_CONTAINED_IN_NO_ET: The returned feature must be an area feature that does not touch or share a vertex with the search feature. The returned feature contains the search feature.
SDE_CONTAINS_NO_ET: The returned feature is contained within the search feature. The returned features cannot touch the edge of, or share a vertex with, the search feature.
SDE_POINT_IN_POLY: The returned feature contains the first point of the search feature.
SDE_IDENTICAL: The returned feature has the same feature type and geometry. This is used to find duplicate data.
The Search Order parameter controls the manner in which the search is performed. If Optimize is specified, then the SDE engine decides how to perform the search. If Attribute First is specified, then the attribute portion of the search is performed first and then the spatial component is performed on the set resulting from the attribute set. If Spatial First is specified, then the spatial search is performed first and then the attribute search is performed on the resulting set. This is useful if the Optimize setting makes the wrong choice and you want to force the search to be performed in a different order.
Attribute Handling parameter settings:
Result Attributes Only: result feature attributes are based solely on the query results.
Keep Query Attributes if Conflict: result feature attributes are a combination of both the query results and the query feature's attributes. If there is a conflict, attribute values are taken from the query feature.
Keep Result Attributes if Conflict: result feature attributes are a combination of both the query results and query feature's attributes. If there is a conflict, attribute values are taken from the query results.
Geometry Handling parameter settings:
Result Geometry Only: result feature geometry is taken from the query results.
Query Geometry Only: result feature geometry is taken from the query feature.
Aggregate Query and Result Geometry: result feature geometry is an aggregate of the geometry from the query feature followed by the geometry from the query results.
The Process Duplicates parameter specifies whether or not duplicate features will be output from the transformer. If the Mode parameter is set to Update, this parameter also specifies whether duplicate updates will be performed.
The Get Spatial Relations parameter specifies whether or not the relationships between the query and result geometries should be computed. Refer to the SDE30QueryFactory factory documentation (in the FME Functions and Factories manual) for more information.
An attribute named '_table_name' will be added to each result feature, specifying which table the result feature came from.
An attribute named '_matched_records' will be added to each query feature, specifying how many database rows the query matched.
|
FME Function or Factory Used |
|
SDE30QueryFactory |