Tasks > Masking tasks > Staging database
  

Staging database

You can perform data subset operations in a masking task. H2 is a database that you use to stage subsets of data.
The masking task uses the H2 database to stage record IDs, data subset for simple entities, entities with junction objects, multipath relationships, and lookup based relationships, and masking fields.
The H2 staging database installer is packaged with the Secure Agent. You can run the H2 package installer to install the staging connection. You can either start the staging database connection from the Schedule page of the masking task wizard, or manually run the H2 startup script.
You can view the subset record count in the logs. The task reads the record IDs that are selected for subset from the staging database and uses standard API to read those records from the source. The task uses standard or bulk API to load data into the target.

Start the staging connection

You can start the staging database connection from the Schedule page before you run a masking task.
Select a Secure Agent and start the staging database service. The task uses the staging database to store the data during the subset operations.
The following image shows the staging connection details:
The Configure Staging Connection dialog box shows the Secure Agent, status of the staging database service, JVM type, and staging connection details.
You can view the JVM type and configure the JVM heap size for a staging connection. The JVM type specifies the type of JVM that the staging database uses. The JVM heap size specifies the heap memory for the staging database. Configure the JVM heap size to process large amount of data in the staging database in a short time. JVM type can be of 32-bit or 64-bit. When the JVM type is 32-bit, the default maximum heap size is 512 MB. When the JVM type is 64-bit, the default maximum heap size is 4096 MB. You can increase or decrease the heap size based on the amount of memory that the system can support.
You can select a Secure Agent and stop the staging database service.

H2 database configuration requirements

You must consider the maximum file size of the file system, cache size, and heap size when you configure the H2 database.
The H2 staging database has the following requirements:
The following example contains the section of code from the startup script file with the properties that you can configure:
@echo off
:: Script location
set H2_JAR_DIR=%~dp0
:: H2 Cache size in KBs
set H2_CACHE_SIZE=2097152
:: H2 Jar Name
set H2_JAR_PATH=%H2_JAR_DIR%h2-1.3.176.jar
:: H2 DB Name
set H2_DB=dmask
:: JVM path
set JVM_PATH=%H2_JAR_DIR%..\..\..\..\..\..\..\jre\bin
:: JVM Options. Initial and maximum heap size
set JVM_OPTS=-Xms128m -Xmx4g
You can change the H2_CACHE_SIZE value and the JVM_OPTS value to increase or decrease memory requirement for the H2 database. Higher memory allocation ensures better staging and subset computation performance.
Note: Do not make other changes to the script file. Changes to other properties can damage the file.
The H2 startup script is available in the following location:
<Agent installation directory>\apps\Data_Integration_Server\$$Version\ICS\main\tomcat\cmask\h2_start.bat

Installing and configuring H2 database manually on Windows

After you install the Secure Agent, you must run the H2 staging database installer that is packaged with the Secure Agent. In Informatica Intelligent Cloud Services, you must create a connection to connect to the H2 database.
    1Browse to the following location:
    <Secure Agent installation directory>\apps\Data_Integration_Server\$version\ICS\main\tomcat\cmask
    2Run the h2_start.bat startup script.
    The database starts up and the Command Prompt displays the parameters that you need to configure the connection in Informatica Cloud. Keep the Command Prompt open.
    3Log in to Informatica Intelligent Cloud Services.
    4Perform one of the following steps:
    5Click New Connection.
    The New Connection page appears.
    6Enter the connection name for the H2 database.
    Connection names are not case sensitive. Connection names can contain alphanumeric characters, spaces, and the following special characters:
    _ . + -
    7Optionally, enter a description for the connection. Maximum length is 255 characters.
    8Select the JDBC_IC (Informatica Cloud) connection type.
    The JDBC_IC connection properties appears.
    9Enter the Secure Agent group that runs the masking task.
    10Enter the JDBC Connection URL that appears in the Command Prompt.
    11Enter the path to the JDBC jar directory that appears in the Command Prompt.
    12Enter the database schema.
    13Enter the user name and password that appears in the Command Prompt to connect to the H2 database.
    14To test the connection, click Test Connection.
    15To create the connection, click Save.

Installing H2 database manually on Linux

You can install H2 database on Linux and configure the connection in Informatica Intelligent Cloud Services.
Provide read, write, and execute access to the following directory:
<Secure Agent installation directory>\apps\Data_Integration_Server\$version\ICS\main\tomcat\cmask
    1Browse to the following location:
    <Secure Agent installation directory>\apps\Data_Integration_Server\$version\ICS\main\tomcat\cmask
    2To run the H2 startup script, enter the following command:
    nohup sh h2_start.sh &
    The H2 database starts up and lists all the parameter values that you need to configure the connection in Informatica Cloud.
    Note: To stop the database, identify the process ID and enter the following command:
    ps -ef | grep "h2", kill -9 processid
    3To view the parameter values, open nohup.out file in a text editor or run the following command:
    vi nohup.out
    4Log in to Informatica Intelligent Cloud Services.
    5Perform one of the following steps:
    6Click New Connection.
    The New Connection page appears.
    7Enter the connection name for the H2 database.
    Connection names are not case sensitive. Connection names can contain alphanumeric characters, spaces, and the following special characters:
    _ . + -
    8Optionally, enter a description for the connection. Maximum length is 255 characters.
    9Select the JDBC_IC (Informatica Cloud) connection type.
    The JDBC_IC connection properties appears.
    10Enter the Secure Agent group that runs the masking task.
    11Enter the JDBC Connection URL that appears in the nohup.out file.
    12Enter the path to the JDBC jar directory that appears in the nohup.out file.
    13Enter the database schema.
    14Enter the user name and password that appears in the nohup.out file to connect to the H2 database.
    15To test the connection, click Test Connection.
    16To create the connection, click Save.