Skip to main content

生成 ID 属性规则 (数据管理工具)

汇总

创建可生成查询中字段的唯一值的属性规则。

工具会创建一个 .csv 文件,包含基于输入的 ArcGIS Arcade 属性规则、包含在工作空间中生成序列的代码的 Python 文件和可视化生成的 ID 的 ID 文件。

用法

  • 输出文件夹参数用于指定使用输入要素类名称创建的文件夹位置。 包含属性规则的输出 .csv 文件将使用输入表参数值的名称。 如果多次运行该工具,其他 .csv 文件将在同一文件夹中创建。

  • 工具运行后,请导入属性规则并将其应用到相应数据集中。 如果数据集位于企业级地理数据库中,您必须是数据所有者才能应用输出的模板属性规则。

    了解关于属性规则导入的详细信息

  • 在设置 ID 构建器参数的按查找排序值时,系统将为创建属性规则时存在的相交数据集 Sequence by lookup 字段中的每个相异值生成数据库序列。 需要手动包含在写入规则后创建的要素。

  • 如果目标要素需要 ID,请将 ID 字段配置为不允许为空。

参数

标注 说明 数据类型

输入表

将应用新规则的数据集。

Table View

输出文件夹

用于保存输出 .csv 文件的文件夹。 文件名称将取自输入表参数值。

Folder

字段

将应用该规则的现有字段的名称。

Field

表达式

(可选)

SQL 表达式用于限制应用属性规则的行。

SQL Expression

创建序列

(可选)

指定数据库序列是否将在指定的工作空间中创建。

  • 选中将创建数据库序列。 这是默认设置。

  • 未选中将不创建数据库序列。

Boolean

定义类型

(可选)

指定将用于定义 ID 格式的方法。

  • 构建器ID 格式将使用 ID 构建器参数进行构建。

  • ID 格式将使用 ID 定义表参数从表中定义。

  • 代码值将为所选字段的每个编码值组合生成一个配置条目和序列。

String

ID 构建器

(可选)

一组将定义属性规则的格式选项。 这包括一个 SQL 表达式,该表达式将用于为每个资产应用不同的格式和序列以及填充、前缀和后缀值。

字符串的预览将显示在地理处理窗格中,其中包含在格式选项中输入的值。

值表列:

  • Filter SQLAn optional SQL expression that will be used to determine whether the sequence will be applied to the row.

  • DescriptionAn optional description of the entry that will be added to the rule settings in the attribute rule.

  • Sequence NameThe name that will be assigned to the database sequence. For enterprise geodatabases, the name must meet sequence name requirements for the database platform you're using and must be unique in the database. For file geodatabases, the name must be unique to the file geodatabase.

  • Starting ValueThe starting number of the sequence. If you do not provide a starting number, the sequence will start at 1. If you do provide a starting number, it must be greater than 0.

  • Increment ValueDescribes how the sequence numbers will be incremented. For example, if the sequence starts at 10 and the increment value is 5, the next value in the sequence is 15, and the next value after that is 20. If you do not specify an increment value, sequence values will increment by 1.

  • PrefixAn optional string or value that will be placed before the sequence value.

  • SuffixAn optional string or value that will be placed after the sequence value.

  • PaddingAn optional positive number that represents the number of digits in which zeros will be used to fill the unused digits. For example, a value of 5 will represent the sequence value of 1 as 00001.

  • SeparatorAn optional value that will be used to join the prefix, sequence, and suffix.

  • Sequence by lookupAn optional value that will be used to create unique sequences for each distinct value in the field.

Value Table

ID 定义表

(可选)

定义 ID 格式的表或记录集。 这包括 SQL 表达式,该表达式将用于为每个资产应用不同的格式和序列以及填充、前缀和后缀值。

表必须包含以下字段:

  • WhereClause—可选 SQL 表达式,用于确定是否将序列应用于行。

  • Description—将添加到属性规则中的规则设置中的条目的可选描述。

  • SequenceName—将被分配给数据库序列的名称。 对于企业级地理数据库,该名称必须符合当前使用的数据库平台的序列名称要求,并且在数据库中必须唯一。 对于文件地理数据库,该名称在文件地理数据库中必须唯一。

  • StartingValue—序列的起始编号。 如果不提供起始编号,序列将从 1 开始。 如果您确实提供了起始编号,则其必须大于 0。

  • IncrementValue—描述序号的递增方式。 例如,如果序列从 10 开始且增量值为 5,则序列中的下一个值为 15,之后下一个值为 20。 如果未指定增量值,则序列增量值将为 1。

  • Prefix—可选字符串或值,将放置在序列值之前。

  • Suffix—可选字符串或值,将放置在序列值之后。

  • Padding—可选正数,表示数字的位数,其中将使用零来填充未使用的位。 例如,值 5 代表序列值 1 为 00001。

  • Separator—用于连接前缀、序列和后缀的可选值。

  • IntersectClass—包含相交数据集的完整路径的可选值。

  • ClassIDField—一个可选字段值,用于为字段中的每个相异值创建唯一序列。

  • ClassFilter—可选的 SQL 表达式,用于确定是否将序列应用于相交数据集中的行。

Record Set

编码值字段

(可选)

用于生成 ID 的 SQL 表达式和配置的字段。

Field

按相交排序

(可选)

相交数据集中的要素,用于在输入要素中生成唯一 ID 值。 相交数据集中的可选字段值将用于按查找排序值。

值表列:

  • Intersect ClassThe features from the intersecting dataset that will be used to generate unique ID values in the input features.

  • Row ID FieldThe optional field value from the intersecting dataset will be used for the sequence by lookup value.

Value Table

派生输出

标注 说明 数据类型

输出规则 CSV

输出 .csv 文件,包含基于输入的 Arcade 属性规则。 该字段用于将属性规则导入到数据集。

File

ID 定义表

序列定义配置的表。 该文件可以进行编辑,并由该工具使用定义类型参数的选项进行重复使用。

File

Python 序列脚本

输出 Python 序列文件。 该文件可在其他工作空间中使用,或由任何有权限创建数据库序列的用户使用。

File

环境

此工具不使用任何地理处理环境。

许可信息

  • 基本: 否
  • 标准: 是
  • 高级: 是