Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Info
Database target Target service has been deprecated. Adeptia recommends you to use Advanced use the Advanced Database Target service instead of this service. With this, you can 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 activity and Database Layout.

...


Steps to create a Database Target Activity

...

:

  1. Click Configure > TARGETS > Database Target.
    Image Removed
  2. Click CREATE Database Target.
    Image Removed
  3. On Create Database Target window, enter Enter the name and description of the new Database Target in the Name and Description textboxes respectively.
    Image Removed
  4. Select the database info activity and database schema activity from the drop-down list of Database Info and Schema Name respectively.


     

    Info

    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.

     

     

      


    Info
    If the specified database operation fails on any source data, error records are created. 
     
    To learn, how to use Process Designer, refer to the section Using Process Designer. 
    To learn how to handle error records, refer to the section Handling Error Records.
    Info
    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 of the activity from the drop-down list of Project.
    Image Removed
  7. Click Save.