Bulk Import

This chapter describes using Bulk Import to load data from legacy or other external systems into the TCA Registry.

This chapter covers the following topics:

Bulk Import Overview

Use Oracle Trading Community Architecture (TCA) Bulk Import to load data from legacy or other external systems in bulk into the TCA Registry. TCA provides validations and optional de-duplication to ensure the quality of the imported information.

The import is only for information on the party level. To import both party and account information, use Customer Interface. See: Customer Interface.

Note: Customer Interface runs independently and does not regard party information already loaded in the TCA Registry. In particular, if the process does not find an existing account site or account contact point, it creates a new account site or contact point, as well as the associated party site or contact point, even if the party level versions already exist. As a result, if duplicates are created, use Party Merge or Oracle Customer Data Librarian to resolve them. See: Party Merge Overview or De-Duplication Overview, Oracle Customer Data Librarian User Guide.

Your administrator can set up for Bulk Import. See: Setting Up Bulk Import, Oracle Trading Community Architecture Administration Guide.

Bulk Import Process

  1. Load data into the interface tables. See: Loading Data into the Interface Tables.

  2. Run the Import Batch to TCA Registry program to import a batch into the TCA Registry. See: Import Batch to TCA Registry.

  3. Optionally run the Import Batch De-Duplication report to view results of batch de-duplication. See: Import Batch De-Duplication Report.

  4. Run the TCA Import Error report to view errors, and reload the corrected data. See: Resolving Errors.

  5. Purge data from the interface tables. See: TCA Import Batch Purge.

Related Topics

Using Oracle Trading Community Architecture

Loading Data into the Interface Tables

You should have a strong knowledge of the data and data structure to be imported. You can load data through:

Import Batches

A set of data to be loaded into the TCA Registry at one time is called a batch. The data in one batch must be from the same data source. The interface tables can store as many batches from different sources as needed, and any number of batches can be actively populating the interface tables at the same time. However, if a D&B import batch is being loaded into the interface tables, using the D&B Import Adapter request set, the tables are locked and all other batches must wait until the D&B batch is completed. The request set uses direct inserts into the interface tables, which requires table-level locks.

Note: When the request set is running, you also cannot run the Import Batch to TCA Registry program to transfer any batch from the interface tables into the TCA Registry.

Batch IDs

Each import batch must have a batch ID. Use the create batch procedure from the Create Import Batch API to guarantee that a unique batch ID is assigned.

Call the following script to create a batch ID:

Set serveroutput on;

DECLARE
x_batch_id NUMBER; 
x_return_status VARCHAR2(4000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(4000);

BEGIN

hz_imp_batch_summary_v2pub.create_import_batch(NULL,'&batchname','&batchdescription', 
     '&ORIGSYS','&loadtype',12,x_batch_id,x_return_status,x_msg_count,x_msg_data);

dbms_output.put_line(SubStr('x_batch_id = '||TO_CHAR(x_batch_id), 1, 255));
dbms_output.put_line(SubStr('x_return_status = '||x_return_status,1,255));
dbms_output.put_line(SubStr('x_msg_count = '||TO_CHAR(x_msg_count), 1, 255));
dbms_output.put_line(SubStr('x_msg_data = '||x_msg_data,1,255)); 

COMMIT;
EXCEPTION
WHEN OTHERS THEN
     dbms_output.put_line(SubStr('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM, 1, 255));
RAISE;
END; 

See: Create Import Batch API, Oracle Trading Community Architecture Technical Implementation Guide.

Unique IDs for Interface Table Records

You must provide a unique ID for each record in the interface table. The unique ID is a combination of:

In the HZ_PARTIES, HZ_PARTY_SITES, HZ_CONTACT_POINTS, and HZ_ORG_CONTACTS tables, these unique IDs are treated as source IDs for Source System Management. In other tables that do not support SSM, the ID is treated as a logical key. See: Source Systems Overview, Oracle Trading Community Architecture Administration Guide.

These IDs serve to link:

You should maintain all unique IDs locally in your system, and use them in the future to update specific information in the TCA Registry.

Unique Source IDs for Importing Associated Accounts

If you plan to use Customer Interface to import accounts that are associated with the imported parties, you must ensure that the source ID alone is unique across all source systems. Customer Interface uses only source IDs, not source system codes, so the imported account must have a unique source ID to link to the corresponding imported party.

For example, if you are importing a party and do not plan to import associated accounts, you pass for the imported party:

You only need to ensure that this combination is unique across all source systems. If you are importing a party and plan to import associated accounts, then you pass for the imported party:

You can concatenate the source system code and source ID values to use as the source ID for the party, or implement your own system to ensure that the source IDs alone are unique across all source systems. When you load the accounts with Customer Interface, you would pass the MKT141442 source ID to associate the accounts with the imported party. See: Customer Interface.

Inserts and Updates

Through import, you either insert new records into the Registry or update existing TCA records. An update means that the imported information, if not null, completely overwrites all values in the corresponding TCA record.

The matching phase of the import process determines whether the interface table record is an insert or update. See: Matching Records with Source System Management.

You can use the optional INSERT_UPDATE_FLAG column in the interface tables for insert or update protection: I for insert and U for update. The system matching must align with the action in this column. If not, the record is marked with error and not loaded into TCA. If the column is left blank, the system matching alone decides between insert or update for each record.

If the HZ: Use Data Sharing and Security During Import profile option is set to Yes, then the import process invokes Data Sharing and Security (DSS) each time that a TCA record is updated. DSS provides additional security against update and is enabled for these tables involved in import:

See: Data Sharing and Security Overview, Oracle Trading Community Architecture Administration Guide.

If the HZ: Validate Flexfields During Import profile option is set to Yes, then flexfield validation also applies to inserts and updates for these tables:

Null Values for Update

When a record in the interface table is designated to update an existing record upon import, any null values in that record would not update the TCA value. The existing value in TCA remains the same after import. You are not required to pass values in all interface table columns when values are optional and not available from a given source system.

If you want to intentionally overwrite a TCA value with NULL, you must pass a specific value, as defined in these profile options:

For example, the HZ: Date Value to Indicate NULL During Import profile option is set to 01-01-4000, and a record in the TCA Registry currently has an end date of 02-02-2005. If you want to update the date with a null value, then you must pass 01-01-4000 for that column.

Party and Party Site Numbers

The PARTY_NUMBER and PARTY_SITE_NUMBER columns in the TCA tables must contain unique values.

If values for these columns are passed in the interface tables, the import process checks for the uniqueness during the import.

If no values for these columns are passed, the import process generates values from an internal sequence.

You should maintain one of these strategies:

Primary Flags

Primary flags indicate which record is the primary one when multiple records exist. For example, if a party has multiple bill-to addresses, the main bill-to address is marked as primary.

Primary flags are exposed in these interface tables, which correspond to TCA tables that contain primary flags:

If a new party is inserted through import, you can define primary flags for any of the above child entities.

If an existing party in the Registry do not have any contact points and is being updated with one or more contact points, you can mark one of the imported contact points as primary. If you do not specify any of the new records as primary, the import process marks one at random. If you mark more than one record as primary, the import process will pick one of the marked records at random.

If the party already has an existing address, contact point, address use, or classification, then you cannot change the primary status through import. Even if you pass a value in the PRIMARY_FLAG column of the interface table, the value is ignored. You can only change primary statuses through a user interface or APIs.

Related Topics

Interface Tables

Bulk Import Overview

Interface Tables

This table shows the interface tables and the TCA tables that the data would be imported into. The interface tables do not include any columns that have been made obsolete in TCA.

Entity Interface Table TCA Table
Addresses HZ_IMP_ADDRESSES_INT HZ_LOCATIONS
HZ_PARTY_SITES
Address Uses HZ_IMP_ADDRESSUSES_INT HZ_PARTY_SITE_USES
Classifications HZ_IMP_CLASSIFICS_INT HZ_CODE_ASSIGNMENTS
Credit Ratings HZ_IMP_CREDITRTNGS_INT HZ_CREDIT_RATINGS
Contact Points HZ_IMP_CONTACTPTS_INT HZ_CONTACT_POINTS
Financial Numbers HZ_IMP_FINNUMBERS_INT HZ_FINANCIAL_NUMBERS
Financial Reports HZ_IMP_FINREPORTS_INT HZ_FINANCIAL_REPORTS
Parties HZ_IMP_PARTIES_INT HZ_PARTIES
HZ_PERSON_PROFILES
HZ_ORGANIZATION_PROFILES
Relationships HZ_IMP_RELSHIPS_INT HZ_RELATIONSHIPS
HZ_ORG_CONTACTS (optional)
HZ_PARTIES
Contacts HZ_IMP_CONTACTS_INT HZ_RELATIONSHIPS
HZ_ORG_CONTACTS
HZ_PARTIES
Contact Roles HZ_IMP_CONTACTROLES_INT HZ_ORG_CONTACT_ROLES

See: Bulk Import Interface Tables, Oracle Trading Community Architecture Reference Guide.

Interface Table Parent and Child Relationships

The parent and child relationships among the import interface tables are:

If a child entity record has an error, the parent entity record can still be imported if it has no errors. If a parent entity record has errors, however, all related child entity records will also fail.

Related Topics

Loading Data into the Interface Tables

Import Batch to TCA Registry

Use the Import Batch to TCA Registry program to import a batch from the interface tables into the TCA Registry. The program provides optional preimport processes you can perform on the data before the actual import into TCA:

Tip: You should purge data from the interface tables after the corresponding batch has been loaded to TCA, to reduce the overall size of the interface tables and improve performance for subsequent batch loads. See: TCA Import Batch Purge.

Prerequisites

Program Parameters

Use the following parameters to submit the Import Batch to TCA Registry program.

Batch ID

Enter the batch to import.

Import Run Option

Specify whether to run both preimport and import processes, or only the preimport processes.

If you plan to run batch de-duplication, you can run only preimport processes and then run the Import Batch De-Duplication report to preview batch de-duplication results.

Run Batch De-Duplication

Specify whether you want to run de-duplication on the batch or not.

Batch De-Duplication Match Rule

If you select to run batch de-duplication, you must enter the match rule to use. Only match rules of type Bulk Duplicate Identification are used for batch de-duplication.

Important: Do not select a match rule with user-defined custom attributes.

Action to Take on Duplicates

Specify how to resolve duplicates found with batch de-duplication. The specified action would be taken on the batch before the data is imported into the TCA Registry.

Run Address Validation

Specify whether you want to run address validation on the batch or not.

Run Registry De-Duplication

Specify whether or not you want to run de-duplication between the batch and the TCA Registry.

Registry De-Duplication Match Rule

If you select to run Registry de-duplication, you must enter the match rule to use. Only match rules of type Bulk Duplicate Identification are used for Registry de-duplication. You can select the same match rule as for batch de-duplication.

Important: Do not select a match rule with user-defined custom attributes.

If the specified match rule is designated for Automerge, then potential duplicates that reach or exceed the match rule's:

If the match rule is not enabled for Automerge, then all potential duplicates that reach or exceed the match threshold are included in SDI batches.

All records that do not reach the match threshold are considered not duplicates and inserted as new parties. All potential duplicates are also inserted into the TCA Registry as new parties, but then accordingly included in SDI batches or automatically merged.

Generate Fuzzy Key During Post Processing

Specify whether or not to generate fuzzy keys as part of the postimport processes.

Important: Skipping fuzzy key generation helps optimize performance, but select No only if you do not use Oracle E-Business Suite applications that use fuzzy keys.

See: Postimport Processes.

Related Topics

Import Process

Bulk Import Overview

Import Batch De-Duplication Report

If you run batch de-duplication as part of the Import Batch to TCA Registry program, you can run the Import Batch De-Duplication report:

The report shows the duplicates that were identified and resolved within the batch that you are importing from the interface tables. This de-duplication does not resolve duplicates between the batch and the TCA Registry itself.

Report Parameter

Batch ID

Enter the batch that was imported with batch de-duplication.

Related Topics

Import Batch to TCA Registry

Import Process

When the Import Batch to TCA Registry program is submitted, this process follows:

  1. The batch de-duplication and address validation runs, if selected.

    Duplicates found through batch de-duplication are resolved as you specified in the Action to Take on Duplicates parameter, for example, to keep the records that are last updated.

    If you chose to run preimport processes only so that you can preview preimport results, then address validation includes all records. If not, then address validation includes only records that batch de-duplication determines as not duplicates.

  2. The data in the interface tables are matched against source system mappings to determine if imported records are inserted as new parties or to update existing parties. See: Matching Records with Source System Management.

  3. For performance reasons, the records are populated into staging tables for processing before loading into the TCA tables.

  4. If you have selected the optional Registry de-duplication, then duplicates are identified between the batch that you are importing and the TCA Registry. All parties are to be inserted as new parties, but then the duplicates are resolved as described in step 7.

  5. After any selected preimport processes finish, depending on your choice, either:

    • The actual import into TCA starts immediately.

    • You start the actual import by rerunning the program, after you optionally:

      • Review preimport process statistics from the program output.

      • Run the Import Batch De-Duplication report for this import batch, if batch de-duplication was run. The report output provides a preview of the de-duplication results.

  6. Mandatory validations are performed on all data, and records that pass all validations are loaded into the TCA Registry. Records that fail are marked with error and not imported. See: Import Validations.

  7. If Registry de-duplication was run, then:

    • System Duplicate Identification batches are created with potential duplicates for merge consideration in Oracle Customer Data Librarian. See: System Duplicate Identification, Oracle Customer Data Librarian User Guide.

    • Duplicates are automatically merged through Automerge, if applicable. See: Automerge, Oracle Trading Community Architecture Administration Guide.

    • Records that are not duplicates are inserted as new parties.

  8. Postimport processes automatically run. See: Postimport Processes.

  9. If you ran batch de-duplication, optionally run the Import Batch De-Duplication report for this batch. The report output provides the de-duplication results.

Related Topics

Import Batch to TCA Registry

Import Address Validation

If you choose to validate the addresses in the interface tables before importing them into the TCA Registry, the addresses are validated using address validation adapters. An adapter connects TCA to an external source of information, which provides the validation service.

Each address is validated through the default adapter set up for each country. For example, if the Vision adapter is the default for Thailand, then all Thai addresses in the interface tables are validated against Vision's standard addresses.

If an address from the interface tables differs from the validated address, it is updated with the validated address only if it is valid above the threshold defined for the adapter. Such an update is called an address correction. For example, if the adapter configuration has the threshold at the municipality level, an address in the interface tables is corrected if at least its city or town is valid.

Note: Aside from the validation threshold, address correction only occurs if the update does not violate other validations, such as tax validation rules.

After the addresses are validated and corrected in the interface tables, they are ready for import into the TCA Registry.

Related Topics

Import Batch to TCA Registry

Matching Records with Source System Management

When the import into the TCA tables starts, the matching phase of the import process automatically begins to identify if each record in the interface table has an associated record in the TCA Registry. The matching determines whether an imported record is inserted as a new party or updates an existing party in the TCA Registry.

The unique ID of each record in the interface table is compared against the Source System Management (SSM) mappings. See: Unique IDs for Interface Table Records.

A SSM mapping links a TCA record to the original record from an external source. SSM mappings are enabled for these tables:

See: Source Systems Overview, Oracle Trading Community Architecture Administration Guide.

The unique ID indicates the source ID and source system of the interface table record. If that unique ID matches a SSM mapping, the interface table record will be used to update the corresponding existing record in TCA. If no match is found, the interface table record will be inserted into the TCA Registry as a new party.

For example, you import a record from the Vision source system, with source ID 100, for the first time. This record is inserted as a new party in TCA, and a SSM mapping is created between this TCA party and the source ID 100 from Vision. If you try to reimport the record from Vision with source ID 100, that record would be matched to the existing SSM mapping, and the reimported data would update the existing TCA party.

Note: Each combination of source ID and source system can update only one party in the TCA Registry.

You can choose to load only entities without the associated party, as long as the provided source ID and source system matches a parent record in the TCA Registry to be updated. For example, you can import addresses without parties, if the addresses are matched to existing parties. Otherwise, you must import associated parties along with addresses.

You cannot change the source ID of a record in the TCA Registry during the import process unless you are importing data from D&B.

Matching Addresses

If an address's source ID in the interface tables matches an existing SSM address mapping, then the interface table address is compared to the existing address.

Related Topics

Import Batch to TCA Registry

Import Validations

Before import from the interface tables into the TCA Registry, a record must pass import validations. All elements of an interface table record must succeed, or the entire record is considered with error.

Records that fail validations are marked, and all errors for one record are captured after the entire record is validated. After validation, only successful records are imported into the Registry.

The types of validations include:

The parent and child relationships of entities also affect whether a record succeeds or fails validation. See: Interface Table Parent and Child Relationships.

Related Topics

Bulk Import Interface Tables, Oracle Trading Community Architecture Reference Guide

Import Batch to TCA Registry

Postimport Processes

After data is loaded into the TCA Registry, the TCA Import Postprocessing program automatically runs and kicks off various postimport processes. Even before some of these processes finish, imported data can already be viewed and used in the Oracle E-Business Suite.

If the TCA Import Postprocessing program results in error, you can resubmit it from Standard Request Submission.

Program Parameters

Use these parameters to resubmit the TCA Import Postprocessing program for a previous run that resulted in error.

p_request_id

Enter the request ID of the Import Batch to TCA Registry submission that the failed postprocessing was originally run for.

p_num_of_worker

Enter the number of workers to run the program. The recommended number is four, and the maximum number is ten.

Related Topics

Import Batch to TCA Registry

Resolving Import Errors

Records with errors are marked with E in the INTERFACE_STATUS column of the interface table and associated with detail records in the import errors table, HZ_IMP_ERRORS. Use the TCA Import Error report to view the error details for a specific import batch.

To resolve errors:

  1. Run the TCA Import Error report, specifying the batch that was imported.

  2. Go to the report output to see import errors for the batch.

  3. Correct the data directly in the interface tables.

  4. Change the INTERFACE_STATUS column value to C for each corrected record.

  5. Run the Import Batch to TCA Registry program again for the same batch. Only records with an INTERFACE_STATUS column value of C is processed.

Resolving Postimport Errors

If the TCA Import Postprocessing program results in error, review the log of the program from Standard Request Submission. After you fix the errors, you can resubmit the TCA Import Postprocessing program. See: Postimport Processes.

Related Topics

Bulk Import Overview

TCA Import Batch Purge

Use the TCA Import Batch Purge program to purge batches from the import interface tables, as well as internal tables such as staging and error tables. You permanently remove all records in the batch from all these tables.

You should purge batches after a satisfactory number of records are successfully imported into the TCA Registry from that batch.

Purging the interface tables improves import performance. To archive imported data, you should copy the data to a set of custom tables.

Program Parameters

Use the following parameter to submit the TCA Import Batch Purge program.

Batch Identifier

Enter the batch ID of the batch that you want to purge.

Related Topics

Bulk Import Overview