Export Table Using Saved Query
Use a complex saved query with bind variables to identify shipments to be exported.
Use Case Description
- Define Saved Query (GUEST.SQ_SHIP_ENROUTE) in OTM to select shipment PKs for
all shipments with their ENROUTE status in a certain
value:
select s.shipment_gid from shipment s, shipment_status ss where s.shipment_gid = ss.shipment_gid and ss.status_type_gid like 'GUEST.ENROUTE' and ss.status_value_gid = ?
- Submit Export Request with bind parameter of "GUEST.ENROUTE_COMPLETED".
curl -u username:password -X POST -H "Content-Type: application/json" -H "Prefer: respond-async" -d '
{
"schema": "PRIMARY",
"contentType": "text/plain",
"targetSystem": {
"targetURL": "https://objectstorage.us2.oraclecloud.com/...bucket-details.../o/",
"appendName": true,
"httpMethod": "PUT"
},
"tables" : {
"items" : [
{
"tableName": "SHIPMENT",
"selectList": "SHIPMENT_GID,START_TIME,END_TIME,TOTAL_ACTUAL_COST,INSERT_DATE,UPDATE_DATE",
"filterCriteria" : {
"copiedFrom": "GUEST.SQ_SHIP_ENROUTE",
"parameterValues": {
"1": "GUEST.ENROUTE_COMPLETED"
}
}
}
]
}
}'
https://servername.us2.oraclecloud.com/logisticsRestApi/data/v1/exportRequests
Note:
You can use a complex saved query with bind variables to identify shipments and child tables to be exported when exporting by a resource name. selectList isn't supported in this case of business object export.