Configure subsetting
Last updated
Was this helpful?
Last updated
Was this helpful?
You can use the Tonic Structural API to configure for a workspace. You can also enable or disable subsetting for a workspace.
You can configure a table to be a or a . You can also remove the configuration.
You apply a subsetting configuration to individual tables.
A subsetting configuration identifies a table as a target table or a lookup table. For a target table, it also indicates how to identify the records to include in the subset.
The configuration includes:
The name of the schema that contains the table. For requests to update or delete a subsetting rule, the schema name is a request parameter and not in the request body.
The name of the table. For requests to update or delete a subsetting rule, the table name is a request parameter and not in the request body.
Whether the table is a lookup table (IgnoreUpstreamTables
is true
). If the table is not a lookup table, then it is a target table.
For a target table, to identify the records to include, either:
A WHERE
clause to filter the source records.
A percentage of source records.
The following example configures a table as a target table for which to include 5 percent of the records:
The following example configures a table as a target table for which to include records where the value of amount
is less than 100.
The following example configures a table as a lookup table:
To enable subsetting for a workspace, use:
To disable subsetting for a workspace, use:
To get the current list of subsetting configurations for a workspace, use:
To add a subsetting configuration, use:
The request includes the subsetting configuration to apply.
Structural checks whether the specified table has a current subsetting configuration.
If it does, then Structural uses the provided configuration to update it.
If it does not, then Structural returns an error.
To either add or update a subsetting configuration, use:
The request body provides the subsetting configuration to apply to the specified table.
Structural checks whether the specified table has a current subsetting configuration.
If it does, then Structural uses the provided configuration to update it.
If it does not, then Structural adds the subsetting configuration for the table.
To remove a subsetting configuration, use:
Structural removes the subsetting configuration for the specified table.