Getting Started with Cloud Data Profiling REST API

Getting Started with Cloud Data Profiling REST API

Update a profile

Update a profile

You can change the profile definition, add or remove filters, add or remove rules, edit schedule details, edit the email address for notifications, and edit advanced options.
Update an existing profile to include a verifier to an existing profile.
To include a verifier, you need to perform the following steps:
  1. Perform the following GET call:
    https://usw3.dm-us.informaticacloud.com/frs/v1/Documents('<documentID>') .
    The documentID is the frsId of a rule.
  2. Navigate to
    nativedata
    documentblob
    in the API Response as shown in the following sample:
    { "@odata.context": "$metadata#Documents/$entity", "id": "8ThGKZS2NeLlnDpGVdJw6x", "name": "verifier_asset", "description": "verifier desciption", "owner": "1vcXL5Kw7jNgTUNO7sS9gF", "createdBy": "1vcXL5Kw7jNgTUNO7sS9gF", "lastUpdatedBy": "1vcXL5Kw7jNgTUNO7sS9gF", "lastAccessedBy": "1vcXL5Kw7jNgTUNO7sS9gF", "createdTime": "2021-01-15T20:13:03Z", "lastUpdatedTime": "2021-01-18T13:43:20Z", "lastAccessedTime": "2021-01-18T13:43:20Z", "expiresBy": "2038-01-18T00:00:00Z", "parentInfo": [ { "parentId": "7cCn5thwWFLhiZoSosphKL", "parentName": "REG", "parentType": "Space" }, { "parentId": "1o6t1YLAVL4jcR0thsaIET", "parentName": "DEFAULT", "parentType": "Project" }, { "parentId": "7kltpW4eBsSdaUuQHkXxeD", "parentName": "Folder1", "parentType": "Folder" } ], "documentType": "VERIFIER", "contentType": "Binary", "documentState": "VALID", "aclRule": "org", "subcontainerCount": 0, "customAttributes": { "stringAttrs": [], "numberAttrs": [], "dateAttrs": [] }, "repoInfo": { "repoParams": [], "repoPath": "", "repoHandle": "8ThGKZS2NeLlnDpGVdJw6x", "frsPath": "" }, "isSourceControlled": false, "checkedOutById": null, "
    nativeData
    ": { "id": "8ThGKZS2NeLlnDpGVdJw6x", "
    documentBlob
    ": "{\"name\":\"verifier_asset\",\"description\":\"Verifier description\",\"type\":\"AV\",\"logicalModel\":{\"mode\":\"Multiline\",\"inputFields\":[{\"name\":\"FormattedAddressLine#1\",\"precision\":128,\"groupId\":\"Multiline\",\"friendlyName\":\"Formatted Address Lines 1\"},{\"name\":\"Country#NAME#1\",\"precision\":50,\"groupId\":\"Multiline\",\"friendlyName\":\"Country 1\"}],\"outputFields\":[{\"name\":\"OUT#Organization#COMPLETE#1\",\"precision\":128,\"groupId\":\"AddressElements\",\"friendlyName\":\"Organization 1\
  3. From the response fetch the
    Inputfields
    and
    Outputfields
    details.
  4. Fetch the profile that you want to update using the Get profile by ID API call.
  5. Add the Input fields and output fields under the profileable fields section as shown in the following sample JSON:
    { "createdByName": "john", "samplingOptions": { "samplingType": "ALL_ROWS", "id": null, "rows": -1 }, "updatedBy": "jAXvnn4fdEnbXZYApFIM04", "updatedByName": "john", "description": "Creating profile using Automation.", "updateTime": 1599650798292, "profileableFields": [{ "fieldName": "MULTILINE_ADDRESS", "isDeleted": false, "id": "18e57c30-97f7-4cc0-9b3d-20afb8701f55", "sourceName": "CP_AV_MULTILINE_SRC", "columnKey": 10001, "fieldType": "DATASOURCEFIELD" },
    { "frsId": "3w3m1yAVC9dkGv7tdieha9", "isDeleted": false, "ruleType": "VERIFIER", "inputFields": [{ "dataSourceFieldName": "MULTILINE_ADDRESS", "inFieldName": "Formatted Address Lines 1", "isDeleted": false }], "fieldType": "MAPPLETFIELD", "outputFields": [{ "isDeleted": false, "outFieldName": "Organization 1" }] }],
    "source": { "sourceType": "DATASOURCE", "name": "CP_AV_MULTILINE_SRC", "id": "633a5065-5c35-4324-a296-9ccc6dd215c4", "fields": [{ "pcType": "STRING", "isDeleted": false, "dataType": "varchar", "precision": 100, "name": "COUNTRY", "scale": 0, "id": "f4754aa4-dd96-4f45-901e-f71c2af81e99", "isMetadataUpdated": false, "order": 1 }, { "pcType": "STRING", "isDeleted": false, "dataType": "varchar", "precision": 255, "name": "MULTILINE_ADDRESS", "scale": 0, "id": "6cb2baee-3afc-4d1f-9b9d-85961df3936e", "isMetadataUpdated": false, "order": 0 }], "dataSourceType": "UNSET" }, "drillDownType": "ON", "version": 0, "orgId": "1LNZt1DIRhul0G5Tvm9JG8", "profileKey": 43620, "frsId": "3NgJyVCd9anj2a1iBDj1eq", "runtimeOptions": { "runtimeEnvironmentId": null, "id": "9ff035e2-8e0d-4c43-8557-130500fab52c", "scheduleId": null, "defaultEmailNotification": true }, "createdBy": "jAXvnn4fdEnbXZYApFIM04", "createTime": 1599650798287, "name": "CP-3738_Profile_Execution_With_Verifier_45010", "connectionId": "4hIEd9LwM9gbGTh3jJ28E2", "id": "5ed3f875-fa31-4a66-aa0b-38ebeb61e28b", "isFilterEnabled": null }
  6. Submit the updated JSON in the body and perform a PUT call with the following API: https://usw3.dm-us.informaticacloud.com/profiling-service/api/v1/profile/{​​​​​{​​​​​profileId}​​​​​}​​​​​
The following table lists the comparison between the sample JSON for a profile with and without rules:
Sample JSON of a profile without rules
Sample JSON of a profile with rules
{ "createdByName": "john", "samplingOptions": { "samplingType": "ALL_ROWS", "id": null, "rows": -1 }, "updatedBy": "jAXvnn4fdEnbXZYApFIM04", "updatedByName": "john", "description": "Creating profile using Automation.", "updateTime": 1599650798292, "profileableFields": [{ "fieldName": "MULTILINE_ADDRESS", "isDeleted": false, "id": "18e57c30-97f7-4cc0-9b3d-20afb8701f55", "sourceName": "CP_AV_MULTILINE_SRC", "columnKey": 10001, "fieldType": "DATASOURCEFIELD" }], "source": { "sourceType": "DATASOURCE", "name": "CP_AV_MULTILINE_SRC", "id": "633a5065-5c35-4324-a296-9ccc6dd215c4", "fields": [{ "pcType": "STRING", "isDeleted": false, "dataType": "varchar", "precision": 100, "name": "COUNTRY", "scale": 0, "id": "f4754aa4-dd96-4f45-901e-f71c2af81e99", "isMetadataUpdated": false, "order": 1 }, { "pcType": "STRING", "isDeleted": false, "dataType": "varchar", "precision": 255, "name": "MULTILINE_ADDRESS", "scale": 0, "id": "6cb2baee-3afc-4d1f-9b9d-85961df3936e", "isMetadataUpdated": false, "order": 0 }], "dataSourceType": "UNSET" }, "drillDownType": "ON", "version": 0, "orgId": "1LNZt1DIRhul0G5Tvm9JG8", "profileKey": 43620, "frsId": "3NgJyVCd9anj2a1iBDj1eq", "runtimeOptions": { "runtimeEnvironmentId": null, "id": "9ff035e2-8e0d-4c43-8557-130500fab52c", "scheduleId": null, "defaultEmailNotification": true }, "createdBy": "jAXvnn4fdEnbXZYApFIM04", "createTime": 1599650798287, "name": "CP-3738_Profile_Execution_With_Verifier_45010", "connectionId": "4hIEd9LwM9gbGTh3jJ28E2", "id": "5ed3f875-fa31-4a66-aa0b-38ebeb61e28b", "isFilterEnabled": null }
{ "createdByName": "john", "samplingOptions": { "samplingType": "ALL_ROWS", "id": null, "rows": -1 }, "updatedBy": "jAXvnn4fdEnbXZYApFIM04", "updatedByName": "john", "description": "Creating profile using Automation.", "updateTime": 1599650798292, "profileableFields": [{ "fieldName": "MULTILINE_ADDRESS", "isDeleted": false, "id": "18e57c30-97f7-4cc0-9b3d-20afb8701f55", "sourceName": "CP_AV_MULTILINE_SRC", "columnKey": 10001, "fieldType": "DATASOURCEFIELD" },
{ "frsId": "3w3m1yAVC9dkGv7tdieha9", "isDeleted": false, "ruleType": "VERIFIER", "inputFields": [{ "dataSourceFieldName": "MULTILINE_ADDRESS", "inFieldName": "Formatted Address Lines 1", "isDeleted": false }], "fieldType": "MAPPLETFIELD", "outputFields": [{ "isDeleted": false, "outFieldName": "Organization 1" }] }],
"source": { "sourceType": "DATASOURCE", "name": "CP_AV_MULTILINE_SRC", "id": "633a5065-5c35-4324-a296-9ccc6dd215c4", "fields": [{ "pcType": "STRING", "isDeleted": false, "dataType": "varchar", "precision": 100, "name": "COUNTRY", "scale": 0, "id": "f4754aa4-dd96-4f45-901e-f71c2af81e99", "isMetadataUpdated": false, "order": 1 }, { "pcType": "STRING", "isDeleted": false, "dataType": "varchar", "precision": 255, "name": "MULTILINE_ADDRESS", "scale": 0, "id": "6cb2baee-3afc-4d1f-9b9d-85961df3936e", "isMetadataUpdated": false, "order": 0 }], "dataSourceType": "UNSET" }, "drillDownType": "ON", "version": 0, "orgId": "1LNZt1DIRhul0G5Tvm9JG8", "profileKey": 43620, "frsId": "3NgJyVCd9anj2a1iBDj1eq", "runtimeOptions": { "runtimeEnvironmentId": null, "id": "9ff035e2-8e0d-4c43-8557-130500fab52c", "scheduleId": null, "defaultEmailNotification": true }, "createdBy": "jAXvnn4fdEnbXZYApFIM04", "createTime": 1599650798287, "name": "CP-3738_Profile_Execution_With_Verifier_45010", "connectionId": "4hIEd9LwM9gbGTh3jJ28E2", "id": "5ed3f875-fa31-4a66-aa0b-38ebeb61e28b", "isFilterEnabled": null }

0 COMMENTS

We’d like to hear from you!