span8
span4
Previous: Adding a Column to a Table
Sorting tabular data can be done multiple ways using FME. You can sort attributes using the FME Data Inspector to manually order columns or by using the分拣机变压器的工作台。分拣机的功能类似于SQL函数:ORDER BY。在本教程中,您将学习如何排序的FME数据检查表格数据,并使用分拣机的变压器。
注:由于你是一个面向公众的数据库上工作,表可以偶尔被覆盖和/或修改。如果你的翻译会产生意想不到的效果,请参阅Resetting the PostGIS Training Databasearticle.或者,您可以下载提供的文件(s) and replace the PostGIS reader with a reader of the appropriate format.
In this scenario, you want to have the ability to sort your tabular data in ascending or descending order (either alphabetically or numerically) using the FME Data Inspector.
If the attributes aren’t sorting correctly you may be using the wrong sorting method. Right-click on the column header and select the Sort Numeric Ascending sorting method from the drop-down list.
In this scenario, you want to have the ability to sort your tabular data by multiple columns. First, you want your table sorted alphabetically by the maintainer field then numerically by the fountainid field in descending order.
Note: The scenario presented here is likely different than the intended real-world application. Because of the challenges of working with a public facing database, here you will read from the DrinkingFountains table and eventually write to a table named DrinkingFountainsSorted. You might notice DrinkingFountainsSorted already exists with the intended data model because other users would have also run the same workspace. In reality, you would likely read from DrinkingFountains, and use the Table Handling "Use Existing" since you are only reordering features in the table.
Note: the shortcut to generate a workspace is Ctrl+G
Note: Drop and Create is used when a table needs to be emptied and an update is made to the database schema. For example, drop and create is used to remove the table structure, possibly to add or remove columns, change data types, etc. For more information on Writer Feature Type Parameters such as Table Handling, see theDocumentation.
Note: An Automatic Attribute Definition is when Workbench automatically defines the list of attributes, depending on which Reader feature types are connected. Further, the list of attributes on the Writer feature type will update automatically whenever attributes are changed (i.e. renamed, removed, etc.) in the workspace. For more information on User Attributes and Attribute Definitions, see theDocumentation.
注:排序依据操作的顺序将决定列进行排序第一(在列表的顶部被第一排序)。您可以调整每个排序条件使用向上和向下箭头接近对话框底部的顺序。
运行表后,您的表将在分拣机参数中定义的排序方法进行排序。您可以通过选择作家和点击选择作家时出现的快捷菜单中检查按钮来查看新表。
数据在从通过提供开放的数据本教程中使用的源自温哥华市, British Columbia. It contains information licensed under the Open Government License - Vancouver.
© 2020 Safe Software Inc |法律