SQL执行器
对进入转换器的每个特性向数据库发出一个查询。查询结果然后通过结果港口。
输入端口
Features that trigger a SQL query to be executed.
Output Ports
Features that result from the SQL queries.
输入发起者具有附加属性的功能(_matched_records) that contains the number of features generated as the result of SQL query initiated by that feature.
当SQL执行失败时,原始发起者功能通过这个端口输出,并带有一个名为_读卡器错误包含最后一条错误消息。
Parameters
Select the database format and dataset, including any format-specific parameters.
可以保留默认设置,也可以使用坐标系库中的选择。
Specify the SQL query using the text editor.
Multiple SQL commands can be delimited by a character specified using the keywordFME_SQL_DELIMITER,嵌入在SQL语句的最开头。紧跟在该关键字后面的单个字符将用于拆分SQL,然后将SQL发送到数据库执行。(注意:在字符前面加一个空格。)
单个语句前面可以加上连字符,表示应该忽略错误。
The following example contains two SQL commands where errors from the first command will be ignored:
FME_SQL_DELIMITER ;
选择*从TABLEA;
从表B中选择*;
输入要在查询创建的功能上公开的属性的名称。属性将按列表中指定的相同顺序输出。
注:默认情况下,生成的特征的属性是隐藏的。通过输入属性名称指定要公开的属性。单击要公开参数的属性旁边的浏览按钮。您还可以使用SQL语句填充列表,方法是按“从SQL查询填充…”,然后输入SQL查询。第一个匹配功能中的列将用于填充属性列表。
结果Attributes Only: The result feature attributes consist solely of the query results.
Keep Initiator Attributes if Conflict:结果功能属性是查询结果和发起程序功能属性的组合。如果存在冲突,则从启动器功能获取属性值。
Keep Result Attributes if Conflict: The result feature attributes are a combination of both the query results and initiator feature's attributes. If there is a conflict, attribute values are taken from the query results.
结果Geometry Only:结果特征的几何图形仅由SQL查询生成的几何图形组成。
仅启动器几何体:The geometries of result features consist only of those present in the initiator features.
聚合启动器和结果几何体: Result features are populated with geometries from both the initiator features and the SQL query.
使用说明
在SQL查询完成之前,不会输出进入此转换器的功能。此行为确保附加的SQLExecutor转换器(如果存在)在上一个查询完成之前不会执行其查询。
关系特征合并
The FeatureMerger joins two datasets and uses a simple, single attribute key to match features. The FeatureMerger is also able to perform certain geometric operations on incoming features using itsMerge Type参数。
关系内联查询器
If all the data to be queried already exists in a SQL-capable data source, it is always more efficient to use the SQLCreator or SQLExecutor, because this allows the queries and filtering of the data to be executed directly by the database before it enters the FME environment.
关系细木工
当流经FME的数据与数据库中保存的数据之间存在一对一或一对多的关系时,Joiner是非常有用和有效的。如果可以使用,那么Joiner可以比使用InlineQuerier或SQLCreator/SQLExecutor更有效,前提是Joiner键字段在源数据库中有索引。Joiner使用简单,不需要任何SQL知识。
Example
编辑变压器参数
使用一组菜单选项,可以通过引用工作空间中的其他元素来指定转换器参数。更高级的功能,如高级编辑器和算术编辑器,也可以在一些变压器。要访问这些选项的菜单,请单击在适用参数旁边。有关详细信息,请参阅变压器参数菜单选项.
变压器类别
搜索FME知识中心
在上搜索有关此变压器的示例和信息FME Knowledge Center.