Load Data into Caching Database from Customization module

The Load Data into Caching Database from Customization module allows you to work with data sources that Tosca Cloud doesn't support out-of the-box. You can integrate your own custom data reader into Tosca Cloud to load any data set into the SQLite caching database.

For example, if you have data formats that are less common and no ODBC/JDBC driver exists, such as certain EBCDIC files or data that is stored on remote locations and difficult to access, you can write a customization that reads the data and formats it like a table. Once you've integrated your customization into Tosca Cloud, you can use the Load Data into Caching Database from Customization module to store the data in the caching database.

This module contains the following values:

Value

Description

Optional

Table Name

Enter the name of the SQLite table into which Tosca Cloud loads the data.

 

Keep Existing Table Entries

Set to True to add the data of the text file to the existing table. Otherwise, Tosca Cloud drops the table before loading new data.

X

Custom Data Reader->Class Attribute Name

In the Value field, enter the name of your custom data source reader. The name is declared in the ClassAttributeName of your data source interface.

 

Custom Data Reader->Parameters->Key

Specify the key-value pair to pass information to your custom implementation code:

  • In the Name field, replace Key with the variable name.

  • In the Value field, specify the data item.

Example: name FilePath, value D:\TestFile.csv

If you work with our ready-made COBOL file reader or SAP data reader, you must use their specific parameters.

 

Column Renaming

Rename columns via file.

Specify the full file path to a text or CSV file with the column mappings. The file has to start with the header row Current Column Name;Mapped Column Name followed by one line for each column that you want to rename.

For example:

Name1;First Name

Name2;Last Name

X

Column Renaming-><Current Name>

Rename columns manually.

In the Name column, specify the name of the column you want to rename. In the Value column, specify the new name.

X

Cell Settings->All Columns->Option

Apply one of the actions for cell settings to all columns.

X

Cell Settings->Single Columns-><Name>

Apply one of the actions for cell settings to a specified column. To specify a column, replace <Name> with the column name.

X

Load Error Behavior->Ignore Load Errors

Set to True if you want Tosca Cloud to ignore load errors.

The default value is False.

X

Load Error Behavior->Max Errors

Define the maximum number of errors before Tosca Cloud aborts execution.

The default value is 100.

X

Load Error Behavior->File Name

Specify the absolute file path where Tosca Cloud logs errors. Tosca Cloud overwrites any existing file with the same name.

By default, Tosca Cloud doesn't log load errors.

X

Actions for Cell Settings

You can use the following actions for Cell Settings - All Columns and Cell Settings - Single Columns

Action

Description

Trim

Remove all leading and trailing whitespace characters.

Default scope: HeaderAndData

Trim[<character>]

Remove all leading and trailing occurrences of the specified character.

Default scope: HeaderAndData

Replace <character> with the character you want to remove.

For example: To remove a ", enter the " four times: Trim[""""].

TrimStart

Remove all leading whitespace characters.

Default scope: HeaderAndData

TrimStart[<character>]

Remove all leading occurrences of the specified character.

Default scope: HeaderAndData

Replace <character> with the character you want to remove.

For example: To remove a ", enter the " four times: TrimStart[""""].

TrimEnd

Remove all trailing whitespace characters.

Default scope: HeaderAndData

TrimEnd[<character>]

Remove all trailing occurrences of the specified character.

Default scope: HeaderAndData

Replace <character> with the character you want to remove.

For example: To remove a ", enter the " four times: TrimEnd[""""].

Replace[<search string>][<replace string>]

Replace all occurrences of the first string with the second string.

Default scope: Data.

Substring[<start index>]

Extract a part of a longer string. The extract starts at the defined start index position and runs until the end of the string.

Default scope: Data

For example: Substring[9] with input Project Manager returns Manager.

Substring[<start index>][<length>]

Extract a part of a longer string. The extract starts at the defined start index position and contains the number of characters specified in length.

Default scope: Data.

For example: Substring[9][3] with input Project Manager returns Man.

Right[<length>]

Extract a part of a longer string. The extract runs from the end of the string towards the beginning and contains the number of characters specified in length.

Default scope: Data.

For example: Right[7] with input Project Manager returns Manager.

Lowercase

Convert the string to lowercase using the currently active locale.

Default scope: Data.

For example: Lowercase with input Project Manager returns project manager.

Lowercase[Culture:<culture name>]

Convert the string to all lowercase. Lowercase[Culture:<culture name>] uses the given culture name to create a new locale.

Default scope: Data.

For example: Lowercase[Culture:zh-Hans] uses the culture information of "Chinese(simplified)" to convert uppercase to lowercase characters.

Uppercase

Convert the string to uppercase using the currently active locale.

Default scope: Data.

For example: Uppercase with input Project Manager returns PROJECT MANAGER.

Uppercase[Culture:<culture name>]

Convert the string to all uppercase. Uppercase[Culture:<culture name>] uses the given culture name to create a new locale.

Default scope: Data.

For example: Lowercase[Culture:en-us] uses the culture information of "English - United States" to convert lowercase to uppercase characters.

To change the default scope of an action, you can add a Scope parameter:

  • To apply the action to the header row only, add the parameter [Scope:Header].

  • To apply the action to all data rows but not the header, add the parameter [Scope:Data].

  • To apply the action to the header and all data rows, add the parameter [Scope:HeaderAndData].

For example, to replace all instances of the string CustomerDataAustria with the string CustomerDataUSA in the header and all data rows, define your action as: Replace[<CustomerDataAustria>][<CustomerDataUSA>][Scope:HeaderAndData]