Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

The Database Target service provides the ability to specify a database as target. This section describes how to create a Database target service.

As this Database Target service has now been deprecated in Connect, it is recommended that you use Advanced Database Target to specify multiple tables of a database as the target. Click here to know how to create an Advanced Database Target service.

Prerequisites

Ensure that you have created Database Info and Advanced Database Layout services.


Follow the steps below to create a Database Target:

  1. Click Configure > TARGETS > Database Target.
  2. Click Create Database Target.
  3. Enter the name and description of the new Database Target in the Name and Description text boxes respectively.



  4. Select the database info service and database schema service from the drop-down list of Database Info and Schema Name respectively.

    Database target can insert/update current date in the database. This current date is added in the input XML in two ways:

    • Source XML

    • Mapping

      It can be added through the source XML that has the current date already defined in its code.

      It can be added through mapping, if current date is defined as a constant in the Date field, or as a variable which has the value "Current Date". In this case, when mapping is done, then database target accesses the current date and inserts/updates it accordingly.

  5. Database Operation specifies how data records are inserted into database tables. Select one of the following database operations: 
    • Insert
    • Update
    • Insert/Update
    • Update/Insert

    Database Operation

    Effect on Database

    Insert

    This option is selected when you want to insert records into the database tables. If records already exist in the database table, new records are added in the database table along with existing records. When a column e.g. Company Name of database table is marked as Primary Key, more than one record cannot exist in the database table for the same Company Name. In this case if data of a company i.e. Microsoft Corporation already exist, insert operation fails and data is not inserted into the database.

    Update

    This option is selected when you want to update the existing record. To use updated option a column of database must be marked as Primary Key. When Update option is selected, database target first checks which column of the database table is marked as Primary Key. Suppose Company Name column is marked as Primary Key. Now database target check whether data of a company e.g. Microsoft Corporation already exist or not. If data for Microsoft Corporation already exists, database target updates the existing records. If none of the column is marked as Primary key, Update operation fails.

    Insert/Update

    This option is selected when the database target first tries to insert the data into database table. If insert operation fails, database target tries to update the data.

    Update/Insert

    This option is selected when the database target first tries to update the database table. If update operation fails, database target tries to insert the data.

      

    When an excel file is used as a database target, only Insert operation is supported. The Update, Insert/Update and Update/Insert operations are not supported. 
    When an excel file is used as a database target, the error records are not generated in case of data type mismatch.
  6. Expand Advanced Properties and select the project from the drop-down list of Project.
  7. Click Save.


     

  • No labels