span8
span4
span8
span4
以下是如何加入或一起通过一个共同的领域合并两组数据 - 没有编码或脚本必要的。FME的DatabaseJoiner变压器能与许多由FME支持的格式使用。This demo will join CSV and database data based on address values.你会看到如何设置数据使用额外的变压器的加盟,再加上得到最大限度地提高性能的提示。
The goal is to match CSV data of crime information to a database table of road information so that we can determine which roads show the most criminal activity.The DatabaseJoiner will be used to perform this task, and the output is written to Excel.
注:该视频使用FME 2016年,接口可能会有所不同。以下是如何加入或一起通过一个共同的领域合并两组数据 - 没有编码或脚本必要的。FME的DatabaseJoiner变压器能与许多由FME支持的格式使用。该演示将根据地址值加入CSV和datbase数据。你会看到如何设置数据使用额外的变压器的加盟,再加上得到最大限度地提高性能的提示。
JoinCSVWithDatabase.zip(同时包含起始和完成的工作区与数据)
A starting workspace has been provided which reads the CSV data, and formats the Block attribute so it matches the formatting of the HBlock attribute in the Roads table.
1。打开开始工作区。
Open StartingWorkspace.fmw, In this workspace, a StringReplacer has been used to replace XX in the Block attribute with 00.A StringCaseChanger changes the Block attribute from uppercase to mixed case.
启动工作区
2。添加DatabaseJoiner。
Connect it to the StringCaseChanger.Open the properties of the DatabaseJoiner and connect to the database.
PostGIS connection details:
Select the Roads table in the public table
Select the feature attribute from the incoming CSV features, Block, and the corresponding PostGIS table attribute, HBlock, that will be used to find matches.Matches are made when the values of the CSV attributes equal the values of their corresponding PostGIS table fields.
For Fields to Add, select Type.
Open the Optimize panel on the DatabaseJoiner: Add a Prefetch Query to load all of the records from the database table into a
select * from public."Roads"
Because of the prefetch query, the DatabaseJoiner is not required to read from the database for each record.This can improve the performance, and reduce the number of queries back to the database.
使用DatabaseJoiner与HBlock加入座。然后设置省长查询选择*从公众。“路”
3。添加督察
Connect and Inspector to the DatabaseJoiner to confirm that the road type attribute has been added.
数据集的输出与所述数据检查联接字段
An AttributeFilter can be added to filter by the "type" attribute, and so on.
Or, an Excel writer could be added after the DatabaseJoiner, with the Sheet Name set up to get its value from the "type" attribute.This would result in an Excel file listing crimes with a tab for each road type.
数据归属
The data used here originates from open data made available by the温哥华市, British Columbia.It contains information licensed under the Open Government License - Vancouver.
© 2020 Safe Software Inc |Legal