Validate Workflow#
Once the REST HTTP service is up and running, to validate a workflow setup and database connections, run:
curl -X 'POST' \
'http://${API_SERVICE_URL}:${API_SERVICE_PORT}/api/v1/validate-workflow' \
-H 'Content-Type: multipart/form-data' \
-F 'validateWorkflowRequest={
"input_connection": {
"jdbc_url": "jdbc:${SOURCE_DRIVER_PREFIX}://${SOURCE_URL}:${SOURCE_PORT}",
"user": {
"type": "raw",
"value": "${SOURCE_USERNAME}"
},
"password": {
"type": "raw",
"value": "${SOURCE_PASSWORD}"
}
},
"output_connection": {
"jdbc_url": "jdbc:${DESTINATION_DRIVER_PREFIX}://${DESTINATION_URL}:${DESTINATION_PORT}",
"user": {
"type": "raw",
"value": "${DESTINATION_USERNAME}"
},
"password": {
"type": "raw",
"value": "${DESTINATION_PASSWORD}"
}
}
};type=application/json' \
-F 'config=@${TRANSFORMATION_CONFIG_FILE_PATH}'
Where:
input_connection
is the configuration of the database to whichtesting-suite
connects. The database configuration has the following parameters:jdbc_url
(required): JDBC url of the source database, e.g.jdbc:postgresql://39.176.0.1:5432/
.user
: Username to access the database. Please see credentials to know more about supported formats.password
: Username’s password to access the database. Please see credentials to know more about supported formats.
output_connection
is the configuration of the database wheretesting-suite
writes the synthesized data. The same parameters asinput_connection
are used here, but for the target database.in
config
, transformation parameters can be added here as described in the configuration file guide.
Note
The config
parameter in cURL expects a YAML formatted string, which
contains connection parameters specified above and other configuration parameters. For
ease of use, it is recommended to store all these configuration parameters into a config.yaml
file, and then
the cURL command can be simplified to:
curl -X 'POST' \
'http://localhost:8081/api/v1/validate-workflow' \
-H 'Content-Type: multipart/form-data' \
-F 'validateWorkflowRequest={
"input_connection": {
"jdbc_url": "string",
"user": {
"type": "raw",
"value": "string"
},
"password": {
"type": "raw",
"value": "string"
}
},
"output_connection": {
"jdbc_url": "string",
"user": {
"type": "raw",
"value": "string"
},
"password": {
"type": "raw",
"value": "string"
}
}
};type=application/json' \
-F 'config=@config.yaml'
Where config.yaml
is a file like:
default_config:
mode: "GENERATION"
Note
It is important to specify content type application/json
for the JSON part of the request.