ArcSDEQuerier
From Fmepedia
ArcSDEQuerier is a Workbench Transformer.
Performs queries on an ArcSDE spatial database. The queries can have both a spatial as well as 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. If the query mode is <delete>, the results of the query are deleted from ArcSDE before they are output from the transformer).
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. Here is an example of the syntax to use in the where clause if you want to do an attribute query based on an attribute on a feature entering the query:
AttributeInSdeTable = @Value(AttributeOnFeatureEnteringQuerier)
e.g.
OBJECTID = @Value(RecordID)
Remark: If your Field is a UUID, it might be necessary to put apostrophes around the @Value()-Function for the database to accept the query.
Like this: OBJECTID = '@Value(RecordID)'
The <search order> parameter controls the manner in which the search is performed. If it is not specified, or OPTIMIZE is specified, or 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.
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> 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 feature's 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.
If the Drop User Names parameter is set to Yes, then user names will not be prepended to table names. As such, only the current user’s tables will be accessible. This makes the workspace more portable across users and sites.
If the Drop User Names parameter is set to No, then user names will be prepended to table names. As such, all accessible tables will be available for querying.
If the Combine Attributes parameter is set to None, then no attributes will be copied from the query features to the result features.
If the Combine Attributes parameter is set to Add, then attributes will be copied from the query features to the result features, possibly overwriting any existing attributes on the result features.
If the Combine Attributes parameter is set to Merge, then attributes will be copied from the query features to the result features, without overwriting any existing attributes on the result features.
An attribute named "_table_name" will be added to each result feature, specifying which table the result feature came from.
If you do not want to specify a "service name" in the ArcSDE Querier, put "port:5151" as a default value into the transformer settings under "SDE instance".

If you do not want to specify a "service name" in the ArcSDE Querier, put "port:5151" as a default value into the transformer settings.