To import CSV data in Reference 360 using REST Call in Informatica IDMC, you can follow these steps:
Prepare your CSV file. The CSV file must start with two header rows, followed by the data rows. The first header row must contain the names of the columns in the CSV file. The second header row must contain the following values:
- System Reference Data Value - The key value for the system reference data value that you want to assign.
- Code Value - The code value for the system reference data value.
Upload the CSV file to a cloud storage location, such as Amazon S3 or Google Cloud Storage.
Send a POST request to the following endpoint:
https://XXX-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/import
In the request body, include the following information:
file - The name of the CSV file that you uploaded to cloud storage.
importSettings - A JSON object that specifies the import settings. The following import settings are required:
- delimiter - The delimiter that is used in the CSV file.
- textQualifier - The text qualifier that is used in the CSV file.
- codepage - The codepage that is used in the CSV file.
- dateFormat - The date format that is used in the CSV file.
- containerType - The type of container to which you want to import the data. For example, to import code values, you would specify
CODELIST
. - containerId - The ID of the container to which you want to import the data.
In the request headers, include the following information:
- Authorization - Your Informatica IDMC API token.
- IDS-SESSION-ID - Your Informatica IDMC session ID.
Send the request.
If the request is successful, Informatica IDMC will start importing the data from the CSV file. You can check the status of the import job by sending a GET request to the following endpoint:
https://XXX-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/import/{jobId}
Where {jobId}
is the ID of the import job.
Once the import job is complete, you can view the imported data in Reference 360.
Here is an example of a POST request to import code values from a CSV file:
POST https://XXX-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/import HTTP/1.1
Authorization: Bearer YOUR_API_TOKEN
IDS-SESSION-ID: YOUR_SESSION_ID
Content-Type: multipart/form-data; boundary=YUWTQUEYJADH673476Ix1zInP11uCfbm
--YUWTQUEYJADH673476Ix1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=import-code-values.csv
--YUWTQUEYJADH673476Ix1zInP11uCfbm
Content-Disposition: form-data; name=importSettings
Content-Type: application/json;charset=UTF-8
{
"delimiter": ",",
"textQualifier": "\"",
"codepage": "UTF8",
"dateFormat": "ISO",
"containerType": "CODELIST",
"containerId": "676SJ1990a54dcdc86f54cf",
"startingRow": null
}
--YUWTQUEYJADH673476Ix1zInP11uCfbm--
Replace YOUR_API_TOKEN
with your Informatica IDMC API token and YOUR_SESSION_ID
with your Informatica IDMC session ID. Replace import-code-values.csv
with the name of your CSV file and 676SJ1990a54dcdc86f54cf with the ID of the code list to which you want to import the data.
Learn more about Importing CSV Data in Reference 360 in IDMC