Getting Started with Cloud Data Profiling REST API

Getting Started with Cloud Data Profiling REST API

Create and run queries

Create and run queries

You can create and run one or more queries on the source object. You can view the query results, update, and delete queries in Data Profiling.
You need the
Query - Create
privilege to create queries, and the
Query - Submit
privilege to run queries and view query results.

Creates Query

Creates a query on the source object.
POST request
Use the POST method to create a query on the source object.
The following table lists the parameters that you need to specify to create a query on the source object:
Property
Value
URL
Enter a URL to create a query on the source object. Use the following format: https://usw3-dqprofile.dm-us.informaticacloud.com/profiling-service/api/v1/query
API parameters
The following table lists the important query parameters exposed for this API:
Property
Value
name
Enter the name of the query.
operator
The logical operator to aggregate multiple query results.
Select
AND
or
OR
as the logical operator.
columnType
The source, mapplet output, or profileable column on which the query is generated.
Select
PROFILEABLECOLUMN
,
DATASOURCEFIELD
, or
MAPPLETFIELD
as the column type.
columnID
The unique identifier of the column based on the column type in the Data Profiling asset. For example, c5c51e8d-14b9-4d0d-a956-b643c72cd87b
Copy the column ID from the list all columns API response.
operationType
The search criteria, such as percentage of unique values in columns, column pattern, or column data type.
Select
VALUE
,
PATTERN
, or
DATATYPE
as the operation type.
When you select the Pattern operator, Data Profiling shows the inferred patterns for the current profile run. When you select Data Type operator, Data Profiling shows the documented data type and inferred data types in the current profile run.
Data Profiling does not show any inferred pattern if you select a column that is not included in the latest profile run. In this case, you can enter a pattern.
valueFunctiontype
Choose an operator to filter the search results.
You can select Equals, Not Equals, Less Than, Less Than or Equals, Greater Than, Greater Than or Equals, Between, In, Not In, Is Null, Is Not Null, Patterns, Data Types, Starts With, Ends With, or Contains operator for a condition.
values
Enter the string values as necessary.
queryType
Choose
PERSISTENT
to query on the profile source. Choose
DRILLDOWN
to view the filtered drill down results.
profileId
The unique identifier of the Data Profiling asset on which the query runs. For example, 908ed64e-cfd0-4544-bb69-5f5414e2f18b
To retrieve the profileId, see the Prerequisites section.
connectionID
Specifies the flat file connection ID to connect to the data source. Data Profiling runs the query on the runtime environment associated with the flat file connection.
To retrieve the connectionID, see the Prerequisites section.
Sample request
{"description":"","name":"A1","operator":"AND","profileId":"b9b05365-3790-494d-82f4-352a211feae2","queries":[{"$id":"infa-cp-13","operationType":"VALUE","valueFunctiontype":"EQUAL","values":["Hi I am good"],"columnId":"517cda8b-76d0-4446-b751-17337644139a","columnName":"varchar_col","columnType":"DATASOURCEFIELD"}],"queryType":"PERSISTENT"}
API response code
200 OK

Get Query Result

Gets the query results.
GET request
Use the GET method to view the query results.
The following table lists the parameters that you need to specify to view the query results:
Property
Value
URL
Enter a URL to view the query results. Use the following format: https://usw3-dqprofile.dm-us.informaticacloud.com/profiling-service/api/v1/query/{queryId}/queryResults
API parameters
The following table lists the important query parameters exposed for this API:
Property
Value
queryID
Enter the unique identifier of the query.
API response code
200 OK

Get Query by Id

Gets the query results based on the query ID.
GET request
Use the GET method to view the query results based on the query ID.
The following table lists the parameters that you need to specify to view the query results based on the query ID:
Property
Value
URL
Enter a URL to view the query results based on the query ID. Use the following format: https://usw3-dqprofile.dm-us.informaticacloud.com/profiling-service/api/v1/query/{id}
API parameters
The following table lists the important query parameters exposed for this API:
Property
Value
ID
Enter the unique identifier of the query.
API response code
200 OK

Lists all Query by Data Profile Asset

Lists the query results based on the profile ID.
GET request
Use the GET method to list the query results based on the profile ID.
The following table lists the parameters that you need to specify to list the query results based on the profile ID:
Property
Value
URL
Enter a URL to list the query results based on the profile ID. Use the following format: https://usw3-dqprofile.dm-us.informaticacloud.com/profiling-service/api/v1/query
API parameters
The following table lists the important query parameters exposed for this API:
Property
Value
profileId
The unique identifier of the Data Profiling asset. For example, 908ed64e-cfd0-4544-bb69-5f5414e2f18b
To retrieve the profileId, see the Prerequisites section.
API response code
200 OK

Execute drill down or query on profile

Executes the drill down or query operation on the profile.
POST request
Use the POST method to execute the drill down or query operation on the profile.
The following table lists the parameters that you need to specify to execute the drill down or query operation on the profile:
Property
Value
URL
Enter a URL to execute the drill down or query operation on the profile. Use the following format: https://usw3-dqprofile.dm-us.informaticacloud.com/profiling-service/api/v1/query/{id}/execute
API parameters
The following table lists the important query parameters exposed for this API:
Property
Value
ID
Enter the unique identifier of the query.
API response code
200 OK

Update Query

Updates the query.
PUT request
Use the PUT method to update a query.
The following table lists the parameters that you need to specify to update a query:
Property
Value
URL
Enter a URL to update a query. Use the following format: https://usw3-dqprofile.dm-us.informaticacloud.com/profiling-service/api/v1/query/{id}
API parameters
The following table lists the important query parameters exposed for this API:
Property
Value
ID
Enter the unique identifier of the query to be updated.
name
Enter the name of the query.
operator
The logical operator to aggregate multiple query results.
Select
AND
or
OR
as the logical operator.
columnType
The source, mapplet output, or profileable column on which the query is generated.
Select
PROFILEABLECOLUMN
,
DATASOURCEFIELD
, or
MAPPLETFIELD
as the column type.
columnID
The unique identifier of the column based on the column type in the Data Profiling asset. For example, c5c51e8d-14b9-4d0d-a956-b643c72cd87b
Copy the column ID from the list all columns API response.
operationType
The search criteria, such as percentage of unique values in columns, column pattern, or column data type.
Select
VALUE
,
PATTERN
, or
DATATYPE
as the operation type.
When you select the Pattern operator, Data Profiling shows the inferred patterns for the current profile run. When you select Data Type operator, Data Profiling shows the documented data type and inferred data types in the current profile run.
Data Profiling does not show any inferred pattern if you select a column that is not included in the latest profile run. In this case, you can enter a pattern.
valueFunctiontype
Choose an operator to filter the search results.
You can select Equals, Not Equals, Less Than, Less Than or Equals, Greater Than, Greater Than or Equals, Between, In, Not In, Is Null, Is Not Null, Patterns, Data Types, Starts With, Ends With, or Contains operator for a condition.
values
Enter the string values as necessary.
queryType
Choose
PERSISTENT
to query on the profile source. Choose
DRILLDOWN
to view the filtered drill down results.
profileId
The unique identifier of the Data Profiling asset on which the query runs. For example, 908ed64e-cfd0-4544-bb69-5f5414e2f18b
To retrieve the profileId, see the Prerequisites section.
connectionID
Specifies the flat file connection ID to connect to the data source. Data Profiling runs the query on the runtime environment associated with the flat file connection.
To retrieve the connectionID, see the Prerequisites section.
Sample request
{"id":"4785a121-0dc5-4e61-99c4-8217f2165602","description":"","name":"A11","operator":"AND","profileId":"b9b05365-3790-494d-82f4-352a211feae2","queries":[{"id":"58d5f674-29d2-40af-8035-7a98dd16da30","columnType":"DATASOURCEFIELD","columnId":"e75e7103-4503-4fa3-acc9-61a80a596a07","columnName":"char_col","operationType":"VALUE","valueFunctiontype":"EQUAL","values":["Hi I am good"]}],"queryType":"PERSISTENT"}
API response code
200 OK

Delete Query

Deletes the query.
DELETE request
Use the DELETE method to delete the query.
The following table lists the parameters that you need to specify to delete the query:
Property
Value
URL
Enter a URL to delete the query. Use the following format: https://usw3-dqprofile.dm-us.informaticacloud.com/profiling-service/api/v1/query/{id}
API parameters
The following table lists the important query parameters exposed for this API:
Property
Value
ID
Enter the unique identifier of the query to be deleted.
API response code
200 OK

0 COMMENTS

We’d like to hear from you!