SPAN8.
SPAN4.
在FME 2018.0中与数据库表相关联快速且轻松使用新的featurejoiner.transformer. The FeatureJoiner combines the attributes of features based on common attribute values, similar to a SQL join operation. In this tutorial, you will learn how to join features from two database tables based on a primary key, but this method can be modified to combine features from multiple data types (for example, shapefile and database table).
注意:因为你是在公共面对的数据库上工作,偶尔可以覆盖和/或修改表。如果您的翻译会产生意外结果,请参阅重置Postgis培训数据库文章。或者,您可以下载提供的文件并用适当格式的读卡器替换PostGIS阅读器。
在本练习中,您将学习如何基于主键加入两个表。在这种情况下,您有兴趣根据地址ID加入两个表,因为您希望具有完整邮件地址的数据集。
注意:如果表名与现有表匹配,则数据将被覆盖。
注意:通过单击读取器上的箭头,您将公开已读取的属性列表。如果在地址点和vanhomes读卡器上展开该属性,您会注意到地址表使用滴定表,而VANHOMES表使用小写。
You will be performing an inner join so the position (left and right) of the inputs is not important since the output will only contain matched features; however, if you were performing a left join (matched features and all unmatched left features) the position is important otherwise you will have an unexpected result. For a more detailed explanation on how to use joining transformers, see the使用合并/加入变压器(如何选择正确的变压器)。
运行工作区后,您的数据库将有一个新的表(public.joinedAddresses)与已连接的字段。您可以通过选择编写器并单击“选择”选定时出现的快捷菜单中的“检查”按钮查看新表。
In exercise 2, you will be adding new columns to your table using the FeatureMerger. Rather than creating a column and assigning values, you will be appending longitude and latitude data from another file into your database table. You will be performing a join on fields that are common in both your database table and the CSV file that you are reading in (i.e. an inner join).
有关创建翻译的更多信息,请参阅桌面基本课程手册。
注意:当需要清空表并向数据库架构进行更新时,使用删除和创建。例如,当您希望使用新内容更新表并要求将新列添加到表中时使用这一点。
注意:自动属性定义是当工作台自动定义属性列表时,具体取决于连接的读取器功能类型。此外,Writer功能类型上的属性列表将在更改属性(即,重命名,删除等)时自动更新。有关用户属性和属性定义的更多信息,请参阅文件。
要了解有关在FME中使用基于钥匙的变换器的更多信息,请参阅桌面基本课程手册。
只有匹配的功能通过FeatureMerger,它将导致重复的行(即,从CSV文件中的名称以及Postgis表中的名称)。
Note: you can also remove unwanted attributes using transformers such as the AttributeManager, AttributeRemover, or BulkAttributeRemover or by setting the Writer Attribute Definition to Manual and removing attributes. For more information on managing/removing attributes, see the桌面基本课程手册。
默认情况下,FME Workspace参数设置为终止转换,如果TeatureMerger拒绝任何功能,则导致工作区停止。您可以了解有关拒绝功能处理的更多信息桌面基本课程手册。
After running the translation, your table will have latitude and longitude columns. You can view the new table by selecting the writer feature type and clicking the Inspect button in the shortcut menu that appears when the writer is selected.
本教程中使用的数据源自可提供的开放数据温哥华市, 不列颠哥伦比亚省。它包含根据开放政府许可证的信息 - 温哥华。
©2020 S亚搏在线afe Software Inc |合法的