Output data for Decision
Optimization deployment jobs
Last updated: Dec 05, 2024
Output data for Decision Optimization deployment jobs
When your submit a job, you can define what output data you want to use and how you
collect it (as either inline or referenced data).
Inline Data
Copy link to section
You can define how to collect your output data as inline data.
This example collects solution.csv output as inline
data.
"output_data": [{
"id":"solution.csv"
}]
Copy to clipboardCopied to clipboard
Referenced data
Copy link to section
When using data or connection assets for tabular data, use
.csv as the data-identifier extension in the id field, regardless
of the asset type. The data-connector makes the necessary transformations, so that you can save data
in the target format without needing to change the format of the data. You can thus use the same
Decision
Optimization model with many different data-source types and formats by using a
data-connector to reference your data. If you use other data-identifier extensions, the data is
saved as a raw-data binary-file without any transformation.
To use referenced data in your request, you can adapt and use the following code examples.
Data assets
You can use data asset references to locate any data asset present in your space and benefit
from the data-connector integration capabilities.
You can specify the location for the output by
using an href, if the asset already exists in the space, and the asset is updated.
For example,
You can also save your output data as an asset with a different name by using the
name field. This example creates an output asset named
my_solution.csv in the current space.
You can also use a regular expression as an identifier. For more information, see
Regexp.
Connection assets
You can use connection assets to reference any data and then refer to the connection without
having to specify credentials each time. Referencing a secure connection without having to use
inline credentials in the payload also offers you better security. You can use the
id to identify connections. For example,
The <CONNECTION_ID> is the globally unique identifier for a
connection. You can find this identifier when you have created a connection and you then edit the
connection in your project. The identifier is visible in the Edit connection
window's URL.
You can use a Regexp as an identifier for all types of outputs. For example to
collect all .csv output files:
"id":".*\\.csv"
Copy to clipboardCopied to clipboard
Or all output files of any kind:
"id":".*"
Copy to clipboardCopied to clipboard
You can use a
Regexp as an identifier, and combine it with ${oaas_job_id} and
${oaas_attachment_name} place holders in the name, to create an
output asset each time the job is run.
This example creates a file in a job-specific COS/S3 folder for each output returned by the
model. If, for example, a solution.csv file is generated as output, this file is
saved in a folder that has the same name as the job number.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.