Running and Managing Tasks via the Command Line
You can use the datasphere command line interface to run and manage certain tasks.
Prerequisites
-
Data Warehouse General (-R------) - To access SAP Datasphere.
-
Space Files (-R------) - To read objects in your spaces.
-
Data Warehouse Data Integration (-RU-----) - To run tasks and task chains.
-
Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line Interface).
-
Log in to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client).
datasphere tasksFor general information about working with tasks in SAP Datasphere, see Managing and Monitoring Data Integration.
Run Task Chains
You can run, retry, and cancel a task chain, including providing values for input parameters and return the task ID.
datasphere tasks chains run
--space <id>
--object <technical_name>
[--input-parameters '<stringified-json>']
datasphere tasks chains retry --space <id> --object <id>
datasphere tasks chains cancel --space <id> --log <id>
|
Parameter |
Description |
|---|---|
|
--space <id> |
Enter the Space ID of the space. |
|
--object <technical_name> |
Specify the technical name of the task chain to run. |
|
--object <id> |
Enter the ID of the object. |
|
--log<id> |
Enter the ID of the log for the run. |
|
--input-parameters '<stringified-json>' |
[optional] Enter the names and values of input parameters in stringified json format. For example: '{"CATEGORY":"A","FISCAL_YEAR":"2025"}'
|
datasphere tasks chains run --space MySpace --object LoadChain --input-parameters '{"YEAR":"2026","DEPT":"Sales"}'
For more information about running and monitoring task chains, see Monitoring Task Chains.
Run Replication Flows
You can operate replication flows and individual replication objects.
datasphere tasks replication-flows <action> --space <id> —-technical-name <technical_name>
|
Parameter |
Description |
|---|---|
|
<action> |
Enter the desired action:
|
|
--space <id> |
Enter the Space ID of the space. |
|
--technical-name <technical_name> |
Specify the technical name of the replication flow to run. |
datasphere tasks replication-flows run --space MySpace --technical-name RepSalesTo obtain the status of object SalesHeader in replication flow RepSales, enter:
datasphere tasks replication-flows status --space MySpace --technical-name RepSales --object SalesHeader
For more information about running and monitoring replication flows, see Monitoring Flows.
Obtain Task Logs
You can obtain log information for a run at various levels of detail.
datasphere tasks logs list --space <id> --object <technical_name>To get the status or details of a particular run, enter the following command and press Return:
datasphere tasks logs get --space <id> --log-id <id> [--info-level status | details]To get the extended details of a particular run, enter the following command and press Return:
datasphere tasks logs get-extended --space <id> --log-id <id> [--accept <format>]
|
Parameter |
Description |
|---|---|
|
--space <id> |
Enter the Space ID of the space. |
|
--object <technical_name> |
Enter the technical name of the object. |
|
--log-id <id> |
Enter the ID of the log for the run. |
|
--info-level status | details |
[optional] Select whether to return:
|
|
--accept <format> |
[optional] Select whether to return:
|
Manage Consent for Scheduled Tasks
You can give or revoke consent for SAP Datasphere to run scheduled tasks on your behalf and obtain your current consent status.
datasphere tasks consent give|revoke|get [--verbose]
|
Command |
Description |
|---|---|
|
give |
Gives consent for SAP Datasphere to run scheduled tasks on your behalf. In verbose mode, returns one of the following response codes:
|
|
revoke |
Revokes consent. In verbose mode, returns one of the following response codes:
|
|
get |
Returns one of the following:
|