Adding Tables to a Channel
Adding tables to a channel is one of the steps performed when you create the channel for replication and involves selecting tables from a source location.
Option Add Tables corresponds to the hvradapt CLI command.
The Table Selection dialog allows you to add tables and views from specific database schema(s), select the tables to be included in or excluded from a channel, map (rename) schemas, tables and columns between locations, and assign a table group to tables.
The left pane of the Table Selection dialog is where you select tables from a source database. The left pane displays only the tables belonging to the schema selected in the Schema field. You can switch between schemas using the drop-down menu in the Schema field. This allows you to select tables from multiple schemas.
The right pane of the Table Selection dialog displays the tables picked for the channel:
- See the tables that have already been added to the channel by clicking Show [...] tables already in channel.
- See the names of these tables as they are in the channel by clicking Show/Hide name in channel.
- See the list of tables selected from the schema list in the left pane: the tables selected from the left pane are automatically added to the right pane.
Cancel/revert the table selection by clicking the cross icon displayed next to the chosen in the right pane or by unselecting the table in the left pane. Both panes are mutually dependent: unselecting a table in one pane automatically unselects it in the other pane.
Table Filtering
If the source database has many tables, use the search box to find the tables you need: only the tables matching a specified pattern will be displayed. For example, tab* will filter out all table names that start with 'tab'. This is called Basiс Filter.
Syntax for Table Filtering
This section describes the syntax for filtering tables. The syntax for filtering SAP tables is described in section Syntax for SAP Table Filtering.
[schema.]tablename [schema.]tablename [-tablename]...
Value schema can be a literal only and value tablename can be a literal or pattern. Pattern matching can be done using the special symbols *, ? or [characters]. The table name must be enclosed in double quotes if the table name contains a space, a special character (*, ?, /), or a new line. Since HVR 6.1.0/13, if the table name contains the special character /, then it is not required to enclose the table name in double quotes.
Special symbol - is used to define negative patterns. Tables matching the negative pattern are excluded from the preceding pattern's result. In the following example, the filter selects all tables whose name begins with t, but excludes all tables whose name begins with tmp or ends with _temp.
t* -tmp* -*_temp
Empty lines and comments (e.g. # Test) are ignored.
Examples For Filtering Tables and Schemas
tbl1 # Match table named 'tbl1' in default schema. schema1.* # Match all tables in 'schema1'. schema2.tbl1 # Match table named 'tbl1' in 'schema2'. history_* # Match all tables whose name begins with 'history_' in default schema. "my table" # Match table named "my table" in default schema. Use double quotes # if there is a space in table name.
Table Group
By default, the selected tables are assigned to group GENERAL. You can change the group name by entering a custom name in the Group name field. The name for the second option, Auto-assign schema as group name, is derived from a schema name which a table belongs to. If you select the second option, each table will be assigned to a group named according to its schema name. Group names are always capitalized.