|
In this section: |
In TIBCO DQ, a service represents a workflow that implements the logic to verify and cleanse data. Services can either be generic or domain specific.
TIBCO DQ provides a set of built-in services that can be exposed as rules.
For more information, see Built-in Services.
|
In this section: |
This section describes how to add new services in TIBCO DQ.
|
In this section: |
To add a new service in TIBCO DQ, the new service must comply with the following TIBCO DQ service specifications.
The service must support HTTP POST.
The service may require basic authentication (user ID and password), but no other security mechanism is supported.
For example, an email cleanse service should have an input variable called in_email.
Example: An email cleanse service should have an output variable called out_email.
Example: An email cleanse service can generate thee following types of tag values:
Services may optionally specify a set of parameters. Parameters represent name-value pairs that can be included as request variables on the service URL.
Example: The cleanse_email service specifies its URL as http://server.com/cleanse_email and a possible parameter as default_email, which allows a rule author to set up a default email that replaces invalid email addresses in the output. Execution of the rule would result in the following URL:
http://server.com/cleanse_email?default_email=service@myco.com
|
In this section: |
This section describes service registration requirements.
Create a definition for the service in JSON format (an example is provided below). All fields except credentials and parameters are required.
|
Attribute |
Description |
|---|---|
|
name |
Name of the service, has to be unique in the “custom” workspace |
|
workspace |
always set to “custom” |
|
description |
A brief description of the service |
|
createdBy |
User name of the account that is registering this service |
|
location |
Service location URL |
|
sendFullDataSet |
Set this to “true” if the service expects the entire data set as input as opposed to one row at a time. |
|
supportsJson |
Set this to “true” if the service can interpret the request body in JSON format and generate a response in JSON format. |
|
inputColumns |
An array of paired values that have:
|
|
outputColumns |
An array of paired values that have:
|
|
parameters |
An array of values that have:
|
|
credentials |
A pair of values that have:
|
The following is an example JSON document for a new service called cleanse_vin:
{
"name": "cleanse_vin",
"workspace": "custom",
"createdBy": "john_smith",
"description": "Cleanse vehicle identification number",
"location": "http://service.mysite.com/cleanse_vin",
"sendFullDataSet": false,
"supportsJson": true
"inputColumns": [
{
"name": "in_vin",
"description": "value to be cleansed or verified"
}
],
"outputColumns": [
{
"name": "out_vin",
"description": "input value when tag_category is VALID, cleansed value when tag_category is CLEANSED, default value when tag_category is MISSING or INVALID"
},
{
"name": "tag_value",
"description": "Tag value that provides explanation for malformed, unexpected or missing data"
},
{
"name": "tag_category",
"description": "Tag category that categorizes tags as Missing Data, Cleansed Data or Invalid Data"
}
],
"tags": [
{
"name": "EMPTY_OR_WHITESPACES",
"description": "Input value is an empty string or contains all whitespaces"
},
{
"name": "INVALID_VIN",
"description": "Value does not represent a valid email address"
},
{
"name": "VALID_VIN",
"description": "Input value is Valid"
},
{
"name": "NORMALIZED_VIN",
"description": "Input value was reformatted or cleansed"
}
],
"parameters": [
{
"name": "default_vin",
"description": "Default value when tag_category is MISSING or INVALID"
}
]
}To test a new service against the TIBCO DQ service requirements, POST the service definition JSON (described above) to the following endpoint:
https://{{host}}:9803/api/v1/service/testThe service will return a set of validation messages. If the message set is empty, then the service was successfully tested.
To register a new service, POST the service definition JSON (described above) to the following endpoint:
https://{{host}}:9803/api/v1/service The response will contain the ID of the new service.
If a new service is successfully registered, it will be available for rule authors to create new TIBCO DQ rules using the new service. For more information, see Managing Rules.
|
In this section: |
Developers familiar with TIBCO Omni-Gen Data Quality Server (DQS) can create new projects and add them to their Data Quality server. Set the online file for the project to be of type Generic Http with a CSV input format and include parameters as shown below. Set all input columns to be of type string and prefix them with in_.

Set the output format to be of type CSV with parameters, as shown in the following image.

Note: The service must meet the service requirements as mentioned in Service Requirements.
Create the service with a directory structure, as shown below:

Copy the service to the running tdq-dqs container by executing the following command from the root of the project folder:

Follow the instructions in Service Registration to register the new DQS service. Inspect the DQS log for more information on any service-related errors.