Summary

This operator creates or updates a TIS Table with the data and/or schema of the result table.

Configuration

Settings

Write modes

Some write modes have been renamed since the previous versions (Write TIS Table 7.1)

Name

Name in Write TIS Table 7.1

Name in Write TIS Table 5

TIS Table must exist

Description

SQL Expectation

SQL Reality

Internal ID

Replace table content

Replace table content
Replace table content (keep structure)

Yes

Default.

Replaces the content of an existing TIS Table.

Error, if the structure is different.

delete from  TIS_Table;

insert into TIS_Table select * from result_table;


ReplaceAllRows

Create table structure (delete all rows)

Write table structure (deletes all data)

No

Replaces an existing TIS Table's structure.

Deletes all rows.

Creates a new TIS Table with no rows.

drop table TIS_Table;

create table TIS_Table '<structure_from_result_table>';


STRUCTURE

Create table (replace existing table)

Replace entire table (incl. structure)

No

Replaces an existing TIS Table (rows and structure).

Creates a new TIS Table if the table does not exist.

drop table TIS_Table;

create table TIS_Table '<structure_from_result_table>';

insert into TIS_Table select * from result_table;


REPLACE

Create table (no action if table exists)

Create new table (no action if table exists)
Create new table if not exists

No

Creates a new TIS Table if the table does not exist.

No action if the TIS Table exists.

create table TIS_Table '<structure_from_result_table>' if not exists;

insert into TIS_Table select * from result_table;


CREATEONLY

Append rows with non-matching ID (all rows if no ID column is given)

Append rows (Identifier column required)

Yes

Appends all rows from the result table to the TIS Table where the result table's identifier does not exist in the TIS Table.
Appends all rows, if no identifier column is given.



APPENDONLY

Update rows with matching keys

Update rows with matching identifiers

Update (key column is necessary)

Yes

Deletes all rows from the TIS Table, that match an identifier in the result table.

Then adds all rows from the result table to the TIS Table that previously matched an identifier in the TIS Table.



UPDATE

Delete rows with matching ID

Delete rows with matching identifiers
Delete data with matching keys

Yes

Deletes all rows from the TIS Table, that match an identifier in the result table.



DELETEMATCHING

Delete rows with non-matching ID

Delete rows with non-matching identifiers
Delete data with non-matching keys

Yes

Deletes all rows from the TIS Table, that do not match an identifier in the result table.



DELETENOTMATCHING

Delete rows with matching ID, then add all rows

Delete rows with matching identifiers and add all other rows

Yes

Deletes all rows from the TIS Table, that match an identifier in the result table.

Then adds all rows from the result table to the TIS Table.



UPDATEREPLACEBYKEY

Want to learn more?

Examples

Example: Write result table into a TIS Table

Select a folder and enter a name for the table.


Select "Replace entire table (incl. structure). This writes the result table into the TIS Table as-is. It overwrites an existing table.


The table name can be defined via a parameter. The parameter value can be set within TIS Board.

#XI.TISPar('TIS Table Name')# refers to the Parameter "TIS Table Name"


Example: Create a TIS table

Situation

We have imported a table using CSV import but it does not show in our TIS tables.

Settings

Now we use the operator to write the table in our "TIS Files" so we may use it in other nodes and projects.

Just select a folder and the mode Create new table and use the TextBox "TIS Table" for a table name.

Then create the operation.

Result

 

Project File

-

Example: Overwrite a TIS table

Situation

This example is going to show you how to overwrite an existing TIS-table. 

First we need to create a table in a node.

Then we use the "Edit" operator to change our table in a different node where we've set the previous node as parent.

Now we've just edited the local table of the node but not the actual TIS table as you can see in the "TIS Flies".

So in reality we have 2 versions in different nodes but only the old version is saved.

Settings

After that we use the "Write TIS Table 8.0" operator in the node with the newer table to overwrite the older table in the "TIS Files".

Result

The result is a changed table in the "TIS Table" section of the menu.

Project File

-

Troubleshooting

Nothing known up to now


Related topics