Sap DATASPHERE
Sap DATASPHERE
Sap DATASPHERE
You can use our command line interface, datasphere, to connect to SAP Datasphere and manage certain
types of objects.
Note
The SAP Datasphere command line interface module has been renamed from dwc to datasphere. The
command dwc will be decommissioned at the end of 2023: please use the new datasphere command
instead. For more information, see https://www.npmjs.com/package/@sap/datasphere-cli .
To use datasphere, you must install it (see Install or Update the SAP Datasphere Command Line Interface
[page 4]).
We recommend that you log in via an OAuth client (see Log into the Command Line Interface via an OAuth
Client [page 6]).
Command Description
datasphere dbusers Users with the DW Space Administrator role (or equivalent privileges) can reset database
user passwords (see Reset Database User Passwords via the Command Line [page 28]).
datasphere Users with the DW Modeler role (or equivalent privileges) can manage data providers (see
marketplace Manage Data Marketplace Data Providers via the Command Line [page 36]) and data
products (see Manage Data Marketplace Data Products via the Command Line [page 54]).
datasphere scoped- Users with the DW Administrator role (or equivalent privileges) can manage scoped roles
roles (see Manage Scoped Roles via the Command Line [page 12]).
datasphere spaces Users with the: DW Administrator role (or equivalent privileges) can create spaces and
allocate storage and memory to them, while users with the DW Space Administrator role can
manage and staff spaces (see Manage Spaces via the Command Line [page 20]).
datasphere tasks Users with the DW Integrator role (or equivalent privileges) can orchestrate tasks and task
chains (see Manage Tasks and Task Chains via the Command Line [page 82]).
datasphere users Users with the DW Administrator role (or equivalent privileges) can manage SAP Datasphere
users (see Manage Users via the Command Line [page 9]).
Note
See the blog @sap/datasphere-cli: Command-Line Interface for SAP Datasphere: Overview (updated
September 2022) for a summary of blogs about working with the command line interface.
Context
Note
The SAP Datasphere command line interface module has been renamed from dwc to datasphere. The
command dwc will be decommissioned at the end of 2023: please use the new datasphere command
instead. For more information, see https://www.npmjs.com/package/@sap/datasphere-cli .
Prerequisites
You have installed the following on your system:
npm is distributed with Node.js. Therefore, when you download Node.js, npm is automatically installed. To
download the Node.js installer, see nodejs.org .
Note
You can test if Node.js and npm are installed on your system by executing the following commands:
• node -v
• npm -v
If Node.js and npm are already installed, then their current versions will appear. If you receive an error, you
have not installed them yet.
Procedure
Note
To update datasphere to the latest version at any time, you just need to run npm install -g
@sap/datasphere-cli again.
datasphere --version
3. Run the following command to download the file of available datasphere commands:
Where <url> is the URL of your SAP Datasphere tenant. You can copy the URL of any page in your tenant.
Note
If new commands become available for datasphere, you will be prompted to run this command again.
If you specify the url to your SAP Datasphere tenant with the host set command, you can issue any number
of other commands without the need to include the --host option.
Note
The SAP Datasphere command line interface module has been renamed from dwc to datasphere. The
command dwc will be decommissioned at the end of 2023: please use the new datasphere command
instead. For more information, see https://www.npmjs.com/package/@sap/datasphere-cli .
If an administrator has created an OAuth client for datasphere command line interface users to log into, there
are several methods for accessing it.
For information about creating an OAuth client, see Create OAuth2.0 Clients to Authenticate Against SAP
Datasphere.
Note
See the following blogs for more information about working with the command line interface and OAuth:
Note
The SAP Datasphere command line interface module has been renamed from dwc to datasphere. The
command dwc will be decommissioned at the end of 2023: please use the new datasphere command
instead. For more information, see https://www.npmjs.com/package/@sap/datasphere-cli .
You can log in by passing the OAuth client information as options on the command line.
Note
datasphere login
--client-id "<id>"
--client-secret "<secret>"
Note
You will be directed to log in with your SAP Datasphere username and password in a browser window once
at the beginning of your OAuth session to determine your space permissions.
Parameter Description
Note
The client ID must be encoded as a URI when passed as a parameter.
--token-url "<url>" [optional] Enter the Token URL provided by your administrator.
You can log in more securely by passing the OAuth client information in a secrets file instead of on the
command line.
Note
datasphere login
--secrets-file <file>.json
Note
You will be directed to log in with your SAP Datasphere username and password in a browser window once
at the beginning of your OAuth session to determine your space permissions.
Note
Secrets files use versions of the options with underscores instead of hyphens.
You can avoid running a login command (and entering your SAP Datasphere username and password) at the
beginning of each OAuth session by extracting the personal access and refresh tokens and passing them either
as options or in a secrets file.
To extract your tokens, log into datasphere as usual and then enter the following command and press
Return :
Example output:
Then copy the values for access_token and refresh_token. You can pass these values either as options on
the command line or in an options file.
Note
Your access and refresh tokens are valid for 720 hours (30 days).
Having extracted your tokens, you no longer need to log in at the beginning of your session and can pass your
tokens in a secrets file with any command.
Where the <options-file>.json contains appropriate options and the <secrets-file>.json contains
the following options:
{
"client_id": "<client-id>",
"client_secret": "<client-secret>",
"authorization_url": "<authorization-url>",
"token_url": "<token-url>",
}
Note
Secrets files use versions of the options with underscores instead of hyphens.
Log Out from the Command Line Interface via an Oauth Client
To log out from an account, use the datasphere logout command: this command allows you to optionally
specify the ID of the login/secret to remove using the option --login-id <id>.
datasphere logout
--login-id <id>
By default, when you omit the option --login-id <id> the login/secret with ID 0 is removed.
Parameter Description
--login-id <id> Optional: specifies the login ID (choices: "0", default: "0").
Users with a DW Administrator role (or with equivalent privileges) can list, create, update, and delete users via
the command line.
• Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line
Interface [page 4]).
• Login to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client [page
6]).
• Have a role of DW Administrator or equivalent privileges (see Command Line Roles and Privileges [page
86]).
To browse the available commands entering the following and press Return :
datasphere users
For general information about working with users in SAP Datasphere, see Managing SAP Datasphere Users
List Users
You can list the user in your tenant, and optionally write them to a file.
Parameter Description
--accept <format> [optional] Specify the format to return the user definition in. You can choose between:
• application/vnd.sap.datasphere.space.users.list+json - [de-
fault] Standard list including user name, first name, last name, display name, and email.
• application/vnd.sap.datasphere.space.users.details+json - In
addition, includes manager and roles.
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
Create Users
You can create users by providing definitions in a JSON file or an input string.
Parameter Description
--file-path [optional] Enter a path to a file with a .json extension containing your user definitions.
<file>.json
[
{
"userName": "<userID>",
"firstName": "<firstName>",
"lastName": "<lastName>",
"email": "<email>"
},
{
"userName": "<userID>",
"firstName": "<firstName>",
"lastName": "<lastName>",
"email": "<email>"
}
]
--input [optional] Provide your input in stringified json format instead of via the --file-path
'<stringified- option.
json>'
For example, to create users from a file, enter the following command and press Return :
[
{
"userName": "BBaxter",
"firstName": "Bob",
"lastName": "Baxter",
"email": "b.baxter@acme.com"
},
{
"userName": "JJones",
"firstName": "Jennifer",
"lastName": "Jones",
"email": "j.jones@acme.com"
}
]
Update Users
You can update the email or manager of a user by providing a new definition in a JSON file or an input string.
--file-path [optional] Enter a path to a file with a .json extension containing your user definitions.
<file>.json
[
{
"userName": "<userID>",
"email": "<email>"
},
{
"userName": "<userID>",
"manager": "<manager userID>"
},
{
"userName": "<userID>",
"manager": "<manager userID>",
"email": "<email>"
}
]
--input [optional] Provide your input in stringified json format instead of via the --file-path
'<stringified- option.
json>'
Delete Users
Parameter Description
--force [optional] Suppress the Confirm Deletion step and delete the scoped role without confirma-
tion.
Users with a DW Administrator role (or with equivalent privileges) can create, read, update, and delete scoped
roles via the command line.
• Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line
Interface [page 4]).
• Login to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client [page
6]).
• Have a role of DW Administrator or equivalent privileges (see Command Line Roles and Privileges [page
86]).
To browse the available commands entering the following and press Return :
datasphere scoped-roles
For general information about working with scoped roles in SAP Datasphere, see Create a Scoped Role to
Assign Privileges to Users in Spaces.
You can list the scoped roles in your tenant, and optionally write them to a file.
Parameter Description
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
You can read the CSN/JSON definition of a scoped role and optionally write it to a file.
To read the list of spaces that are assigned to a scoped role, and optionally write it to a file, enter the following
command and press Return :
To read the list of users assigned to a scoped role and optionally write it to a file, enter the following command
and press Return :
Parameter Description
PROFILE:<package>.<id>:<roleid>
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
You can create scoped roles by providing a definition in a JSON file or an input string.
--file-path [optional] Enter a path to a file with a .json extension containing your scoped role defini-
<file>.json tion.
{
"name": "<Name>",
"description": "<Description>",
"inheritance": [
"PROFILE:<package>.<id>:<Role_Template_Name>"
]
}
--input [optional] Provide your input in stringified json format instead of via the --file-path
'<stringified- option.
json>'
For example, to create the scoped role Sales_Modeler based on the role template Custom_Modeler, enter
the following command and press Return :
Where the file sales_modeler.json contains the following (where <package> and <id> for the tenant are t
and W respectively):
{
"name": "Sales_Modeler",
"description": "Modeler for Sales spaces",
"inheritance": [
"PROFILE:t.W:Custom_Modeler"
]
}
You can update the description or template role of a scoped role by providing a new definition in a JSON file or
an input string.
--file-path [optional] Enter a path to a file with a .json extension containing your scoped role defini-
<file>.json tion.
{
"name": "<Name>",
"description": "<Description>",
"inheritance": [
"PROFILE:<package>.<id>:<Role_Template_Name>"
]
}
--input [optional] Provide your input in stringified json format instead of via the --file-path
'<stringified- option.
json>'
You can add spaces to a scoped role as a comma-separated list of space IDs.
Note
You must add one or more spaces to a scoped role before you can assign users to it.
Parameter Description
PROFILE:<package>.<id>:<roleid>
For example, to add the two spaces SALES_EU and SALES_US to the scoped role Sales_Modeler, enter the
following command and press Return :
You can add users to a scoped role by providing a definition in a JSON file or an input string.
Parameter Description
PROFILE:<package>.<id>:<roleid>
--file-path Enter a path to a file with a .json extension containing the list of users to add. You must
<file>.json provide one entry for each user and each space you want to assign them to:
[
{
"id": "<userID>",
"scope": "<spaceID>"
},
{
"id": "<userID>",
"scope": "<spaceID>"
}
]
--input [optional] Provide your input in stringified json format instead of via the --file-path
'<stringified- option.
json>'
For example, to add the users BBAXTER and JJONES to the spaces SALES_EU and SALES_US via the scoped
role Sales_Modeler, enter the following command and press Return :
[
{
"id": "BBAXTER",
"scope": "SALES_EU"
},
{
"id": "BBAXTER",
"scope": "SALES_US"
},
{
"id": "JJONES",
"scope": "SALES_EU"
},
{
"id": "JJONES",
"scope": "SALES_US"
Note
Users with a DW Space Administrator role (or equivalent permissions) can add users to their space using
the datasphere spaces users add command (see Add Users to a Space [page 25]).
Parameter Description
PROFILE:<package>.<id>:<roleid>
--file-path [optional] Enter a path to a file with a .json extension containing the list of users to
<file>.json remove. You must provide one entry for each user and each space you want to remove them
from:
[
{
"id": "<userID>",
"scope": "<spaceID>"
},
{
"id": "<userID>",
"scope": "<spaceID>"
}
]
--input [optional] Provide your input in stringified json format instead of via the --file-path
'<stringified- option.
json>'
For example, to unassign BBAXTER and JJONES from SALES_EU via the scoped role Sales_Modeler, enter the
following command and press Return :
[
{
"id": "BBAXTER",
"scope": "SALES_EU"
Note
Users with a DW Space Administrator role (or equivalent permissions) can remove users from their space
using the datasphere spaces users remove command (see Remove Users from a Space [page 27]).
Parameter Description
PROFILE:<package>.<id>:<roleid>
For example, to remove the space SALES_EU from the scoped role Sales_Modeler, enter the following
command and press Return :
PROFILE:<package>.<id>:<roleid>
--force [optional] Suppress the Confirm Deletion step and delete the scoped role without confirma-
tion.
For example, to delete the scoped role Sales_Modeler and suppress the confirmation, enter the following
command and press Enter :
You can use the SAP Datasphere command line interface, datasphere, to create, read, update, and delete
spaces. You can set space properties, assign (or remove) users, create database users, create or update
objects (tables, views, and data access controls), and associate HDI containers to a space.
Note
The SAP Datasphere command line interface module has been renamed from dwc to datasphere. The
command dwc will be decommissioned at the end of 2023: please use the new datasphere command
instead. For more information, see https://www.npmjs.com/package/@sap/datasphere-cli .
• Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line
Interface [page 4]).
• Login to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client [page
6]).
• Have an appropriate role of (see Command Line Roles and Privileges [page 86]).
To browse the available commands entering the following and press Return :
datasphere spaces
List Spaces
To list the spaces available to you on the tenant, enter the following command and press Return :
Parameter Description
--host "<url>" Enter the URL of your SAP Datasphere tenant. You can copy the URL of any page in your
tenant. Alternatively, set a host value (see Set a Host Value to Identify Your SAP Datasphere
Tenant [page 5]).
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
Read a Space
To read a space definition to the console or to a file, enter the following command and press Return :
Parameter Description
--definitions [Optional] Read the object definitions contained in the space. You can use the --
[<obj1>,<obj2>] definitions parameter by itself to read all the objects, or specify a comma-separated
list of object technical names.
Object definitions are read using the standard CSN syntax (see Core Data Services Schema
Notation (CSN) ). The following objects can be read (exported):
• Local Tables - The definition of a local table contains the structure of the table only, and
does not have dependencies on any other objects.
• Remote Tables - The definition of a remote table contains information about its connec-
tion. Before importing a remote table, you must create the relevant connection with an
identical technical name in the receiving space.
Note
Remote tables exported from one space can be imported into another only if they
were originally imported from a connection created in v2021.19 or later.
• Views - The definition of a view contains the definitions of all its sources and any used
data access controls. When you export a view, these objects are exported too.
• Data Access Controls - The definition of a data access control contains the definition of
its permissions entity. When you export a data access control, the permissions entity is
exported too.
Note
You can also export content from and import content to your space via:
--no-space- [Optional] Suppress the display of the spaceDefinition property. When used with the
definition --definitions option, this allows you to read object definitions without seeing the
other properties of the space.
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
To create or update a space, you must first prepare a space definition file (see The Space Definition File Format
[page 29]).
You need only complete the parameters that you want to set. All other space properties are either set to
default values or keep their current values. If your file contains valid CSN object definitions, then these
entities will be created or updated in the space.
When your file is ready, enter the following command and press Return :
Parameter Description
--file-path Enter a path to a file with a .json extension containing your space definition.
<file>.json
--force-definition- [Optional] Deploy changes to objects even if they will generate validation messages warning
deployment of impacts to objects that depend on them. Using this option is equivalent to clicking the
Deploy Anyway button in the Validation Messages dialog (see Modifying Objects That Have
Dependent Objects).
--enforce-database- [Optional] Allow the deletion of database users and their associated Open SQL schemas,
user-deletion when the dbusers section is present in the space definition file. If any existing database
user is not included in the dbusers section and this option is omitted, then they will not be
deleted in order to protect against unintended data loss.
--input [Optional] Provide your space definition in stringified json format instead of via the --
'<stringified- file-path option. For example:
json>'
--input '{"MY_SPACE":{"spaceDefinition":
{"version":"1.0.4"}}}'
Note
If any parameters are set incorrectly, the creation or update is canceled and an error message is written to
the console.
Delete a Space
--force Delete the space without confirmation. If you do not include this option you will be
prompted to confirm the deletion.
If prompted, confirm that you want to delete the space. The space is deleted and a confirmation message is
written to the console.
Users with a DW Space Administrator role (or equivalent permissions) can manage user access to their space
via the command line.
• Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line
Interface [page 4]).
• Login to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client [page
6]).
• Have a role of DW Space Administrator or equivalent privileges (see Command Line Roles and Privileges
[page 86]).
To browse the available commands entering the following and press Return :
For general information about working with space users, see Control User Access to Your Space.
You can read a list of users in your space and optionally write it to a file.
Parameter Description
--accept <format> [optional] Specify the format to return the list in. You can choose between:
• application/vnd.sap.datasphere.space.users.list+json - [de-
fault] User IDs only.
• application/vnd.sap.datasphere.space.users.details+json -
User IDs and scoped roles.
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
To add a user to your space, you must add them to a scoped role that includes your space as a scope and gives
the appropriate privileges.
Parameter Description
--file-path Enter a path to a file with a .json extension containing the list of users to add and the
<file>.json scoped roles you want to add them to:
[
{
"id": "<UserID>",
"role": "<RoleID>"
},
{
"id": "<UserID>",
"role": "<RoleID>"
}
]
Each user must exist on your tenant and each scoped role that you assign them to must
include your space as a scope.
For example, to add the users BBAXTER and JJONES to the space SALES_US via the scoped role
Sales_Modeler, enter the following command and press Return :
Where the file add.json contains the following (where <package> and <id> for the tenant are t and W
respectively):
[
{
"id": "BBAXTER",
"role": "PROFILE:t.W:Sales_Modeler"
},
{
"id": "JJONES",
"role": "PROFILE:t.W:Sales_Modeler"
}
]
You can update the roles that are assigned to users for your space. For example you may want to remove a
user's modeling privileges and leave here only with viewing privileges
Parameter Description
--file-path Enter a path to a file with a .json extension containing containing the list of users to
<file>.json update and the new scoped roles you want them to belong to
[
{
"id": "<UserID>",
"roles": ["<RoleID>","<RoleID>"]"
},
{
"id": "<UserID>",
"roles": ["<RoleID>","<RoleID>"]
}
]
For example, to give BBAXTER the roles of both Sales_Modeler and Sales_Integrator, and to remove
JJONES from the role Sales_Modeler and to add her to Sales_Space_Admin, enter the following command
and press Return :
[
{
"id": "BBAXTER",
"roles":
["PROFILE:t.W:Sales_Modeler","PROFILE:t.W:Sales_Integrator"]
},
{
"id": "JJONES",
"roles": ["PROFILE:t.W:Sales_Space_Admin"]
}
]
Parameter Description
--file-path Enter a path to a file with a .json extension containing the list of users to remove and the
<file>.json scoped roles to remove them from:
[
{
"id": "<UserID>",
"role": "<RoleID>"
}, {
"id": "<UserID>",
"role": "<RoleID>"
}
]
For example, to remove BBAXTER from both the Sales_Modeler and Sales_Integrator roles, enter the
following command and press Return :
[
{
"id": "BBAXTER",
"role": "PROFILE:t.W:Sales_Modeler"
},
{
"id": "BBAXTER",
"role": "PROFILE:t.W:Sales_Integrator"
}
]
Users with the DW Space Administrator role (or equivalent privileges) can reset database user passwords from
the command line
To reset a database user password, enter the following command and press Return :
Note
We recommend that, for reasons of security, you specify to receive the new password in an output file.
Parameter Description
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
For example, to reset the password of the JEFF user in the SALES, and pretty-print it to the file jeff.json,
enter the following:
Note
You can create database users with a space definition file (see The Space Definition File Format [page
29]).
Space properties are set and retrieved in the space definition file format and stored as a .json file.
Space Properties
Users with the DW Administrator role can create spaces and set any space properties (see Create a Space)
using the following syntax:
{
"<SPACE_ID>": {
"spaceDefinition": {
"version": "1.0.4",
"label": "<Space_Name>",
"assignedStorage": <bytes>,
"assignedRam": <bytes>A space definition file must not exceed 25MB, and
can contain the following space,
"priority": <value>,
"injection": {
"dppRead": {
"retentionPeriod": <days>,
"isAuditPolicyActive": true|false
},
"dppChange": {
"retentionPeriod": <days>,
Note
Users with the DW Space Administrator role cannot create spaces, but they can set space properties except
SPACE_ID, assignedStorage, assignedRam, and priority.
<SPACE_ID> Space ID [required] Enter the technical name of the space. Can contain a maxi-
mum of 20 uppercase letters or numbers and must not contain spaces
or special characters other than _ (underscore). Unless advised to do
so, must not contain prefix _SYS and should not contain prefixes: DWC_,
SAP_ (See Rules for Technical Names).
version - [required] Enter the version of the space definition file fomat. This must
always be set to 1.0.4.
label Space Name Enter the business name of the space. Can contain a maximum of 30
characters, and can contain spaces and special characters.
assignedStorage Disk (GB) Enter the amount of storage allocated to the space in bytes. You can
enter any value between 100000 bytes (100MB) and the total storage
size available in the tenant.
Note
To set no size limit for the space (and disable the Enable Space Quota
option), enter 0 for both this parameter and assignedRam.
assignedRam In-Memory (GB) Enter the amount of ram allocated to the space in bytes. You can enter
any value between 100000 bytes (100MB) and the total storage size
available in the tenant.
Priority Space Priority Enter the prioritization of this space when querying the database. You
can enter a value from 1 (lowest priority) to 8 (highest priority).
Default value: 5
Enable Audit Log for Enter the audit logging policy for read and change operations and the
dppRead.isAudit
number of days that the logs are retained. you can retain logs for any
PolicyActive Read Operations
period between 7 and 10000 days.
dppRead.retenti Keep Logs for <n>
Default values: false, 30, false, 30
onPeriod Days
allowConsumptio Expose for Consump- Choose the default setting for the Expose for Consumption property for
n tion by Default views created in this space.
enableDataLake Use This Space to Ac- Enable access to the SAP HANA Cloud data lake. Enabling this option is
cess the Data Lake only possible if no other space already has access to the data lake.
Total Statement Mem- Enter the maximum number (or percentage) of GBs of memory that
workloadClass.t
statements running concurrently in the space can consume. You can
otalStatementMe ory Limit
enter any value or percentage between 0 (no limit) and the total amount
moryLimit.value GB/% of memory available in your tenant.
Total Statement Enter the maximum number (or percentage) of threads that statements
workloadClass.t
running concurrently in the space can consume. You can enter any value
otalStatementTh Thread Limit
or percentage between 0 (no limit) and the total number of threads
readLimit.value Threads/% available in your tenant.
For example, the following file will create a new space, with all default properties:
{
"NEWSPACE": {
"spaceDefinition": {
"version": "1.0.4"
Note
If a property is not set it will receive the default value (on creation) or will keep its current value (on update).
This second file will update NEWSPACE by modifying the Space Name and increasing the Disk (GB) and
In-Memory (GB) allocations:
{
"NEWSPACE": {
"spaceDefinition": {
"version": "1.0.4",
"label": "My New Space",
"assignedStorage": 6000000000,
"assignedRam": 5000000000
}
}
}
This third file will update the Space Priority, and will leave the other parameters as previously set:
{
"NEWSPACE": {
"spaceDefinition": {
"version": "1.0.4",
"priority": 4
}
}
}
Note
The following properties are not supported when creating, reading, or updating spaces using datasphere:
• Connections
• Time Data
• Space Status and other run-time properties
Members
Note
Following the introduction of scoped roles, it is not currently possible to assign users to spaces via the
command line.
Users with the DW Administrator, DW Space Administrator, or DW Integrator role can add database users to a
space (see Integrating Data via Database Users/Open SQL Schemas) using the following syntax:
{
...
"dbusers":{
"<Space_ID>#<DB_UserName>":{
"ingestion":{
"auditing":{
"dppRead":{
"retentionPeriod":<days>
"isAuditPolicyActive":false
},
"dppChange":{
"retentionPeriod":<days>
"isAuditPolicyActive":false
}
}
},
"consumption":{
"consumptionWithGrant":false,
"spaceSchemaAccess":false,
"scriptServerAccess":false,
"localSchemaAccess":false,
"hdiGrantorForCupsAccess":false
}
}
}
}
<SPACE_ID> Space ID [required] Must be the same as the <Space_ID> used at the root of the
space definition file.
<DB_UserName> Database User Name [required] Enter the name of the database user. Can contain a maximum
Suffix of 20 uppercase letters or numbers and must not contain spaces or
special characters other than _ (underscore).
Enable Audit Log for Enter the audit logging policy for read and change operations and the
ingestion.audit
number of days that the logs are retained. you can retain logs for any
ing.dppRead.isA Read Operations
period between 7 and 10000 days.
uditPolicyActiv Keep Logs for <n>
e Default values: false, 30, false, 30
Days
ingestion.audit
ing.dppChange.r
etentionPeriod
consumption.con With Grant Option Allow the database user to grant read access to the space schema to
sumptionWithGra other users.
nt
Default value: false
consumption.spa Enable Read Access Grant the database user read access to the space schema.
ceSchemaAccess (SQL)
Default value: false
consumption.scr Enable Automated Grant the database user access to the SAP HANA Cloud machine learn-
iptServerAccess Predictive Library ing libraries.
(APL) and Predictive
Analysis Library (PAL Default value: false
consumption.loc Enable Write Access Grant the database user write access to the OpenSQL schema.
alSchemaAccess (SQL, DDL, & DML)
Default value: false
consumption.hdi Enable HDI Grant the database user read access to HDI containers associated with
GrantorForCupsA Consumption the space.
ccess
Default value: false
For example, the following file will add a database user to NEWSPACE:
{
"NEWSPACE": {
"spaceDefinition": {
"version": "1.0.4",
"dbusers": {
"NEWSPACE#JJONES": {
"ingestion": {
"auditing": {
"dppRead": {
"retentionPeriod": 21,
"isAuditPolicyActive": true
}
}
},
When updating database users, you must always list all database users that you want to have assigned to
the space. To delete a database user, remove them from the dbusers section and include the --enforce-
database-user-deletion. If any existing database user is not included in the dbusers section and this
option is omitted, then they will not be deleted in order to protect against unintended data loss.
Note
You can use the datasphere dbusers password reset command to obtain a new password for a
database user (seeManage Spaces via the Command Line [page 20]).
HDI Containers
Users with the DW Administrator, DW Space Administrator, or DW Integrator role can associate HDI containers
to a space (see Exchanging Data with SAP SQL Data Warehousing HDI Containers) using the following syntax:
{
...
"hdicontainers":{
"<Container_Name>":{}
},
<Container_Name> HDI Container Name [required] Enter the name of an HDI container that is associated with
your SAP Datasphere instance and which is not assigned to any other
space.
For example, the following file will associate two HDI containers to NEWSPACE:
{
"NEWSPACE": {
"spaceDefinition": {
"version": "1.0.4",
"hdicontainers": {
"MyHDIContainer": {},
"MyOtherContainer": {},
}
}
}
}
Users with the DW Administrator or DW Space Administrator role can add tables and views, and data access
controls to a space using the standard CSN syntax (see Core Data Services Schema Notation (CSN) ). Users
with the DW Modeler role can add tables and views.
For example, the following file will create a table with two columns in NEWSPACE:
{
"NEWSPACE": {
"spaceDefinition": {
"version": "1.0.4"
},
"definitions": {
"Products": {
"kind": "entity",
"elements": {
"Product ID": {
"type": "cds.Integer64",
"key": true,
"notNull": true
},
"Product Name": {
"type": "cds.String",
"length": 5000
}
}
}
}
}
}
Note
To obtain more complex examples, read existing objects from a space into a file using the -D option (see
Read a Space [page 21]).
Note
The SAP Datasphere command line interface module has been renamed from dwc to datasphere. The
command dwc will be decommissioned at the end of 2023: please use the new datasphere command
instead. For more information, see https://www.npmjs.com/package/@sap/datasphere-cli .
The following sections, each representing one command, are available in this topic:
• Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line
Interface [page 4]).
• Login to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client [page
6]).
• Have a role of DW Modeler or equivalent privileges (see Command Line Roles and Privileges [page 86]).
To browse the available commands entering the following and press Return :
To get access to a data provider the user needs to be member of the data provider profile. If a
contentAggregatorID is given as parameter, only data provider profiles that are managed by that content
aggregator are returned.
Returns a simplified list of all data providers that the current user has access to.
If you want a detailed representation of a certain data provider, use the read command.
Parameter Description
-o, --output <output> Specifies the file in which the output of the command is
stored (optional).
Choices:
• application/vnd.sap.marketplace.providers.list+json
(default)
• application/vnd.sap.marketplace.providers.details+json
Reads the metadata of a certain data provider after specifying its UUID or its content aggregator UUID.
Parameter Description
-o, --output <output> Specifies the file in which the output of the command is
stored (optional).
Creates a new data provider or a new managed data provider (managed by a content aggregator) based on
a configuration following the data provider definition file format and stored as a .json file. See The Data
Provider Definition File Format [page 41] for more information.
Specify the full path to the input .json file, for example C:\temp\mydataproviderdefintion.json.
To create a managed data provider specify the contentAggregatorID in the request body.
Note
Managed providers can only be created if you are a member of the assigned content aggregator profile.
Parameter Description
Note
If you want to update specific properties only, use the update command.
Updates only selected properties of the specified data provider which are defined in the provided data provider
definition file.
Parameter Description
The properties of a data provider definition are set and retrieved in the space definition file format and stored
as a .json file.
A data provider definition file must not exceed 25MB, and can contain the following information:
Users with the DW Modeler role can create data providers and set any data provider properties (see Manage
Data Marketplace Data Providers via the Command Line [page 36]) using the following syntax:
Sample Code
{
"name": "<string>",
"contentAggregatorProviderID": "<string>",
"logo": "<string>",
"description": "<string>",
"homepageUrl": "<string>",
"linkedinUrl": "<string>",
"regionalCoverages": [
"<string>",
"<string>", ...
],
"dataCategories": [
"<string>",
"<string>", ...
],
"industries": [
"<string>",
"<string>", ...
],
"sapApplications": [
<regionalCoverages> Regional Coverage String values for each region the data
is applicable to. Multiple values can be
specified.
[ C001 - Benchmarking
Data, C011 - Company
Data, C021 - Countries,
Regions & Cities Data,
C031 - Culture & Sports
Data, C041 - Environmental
& Weather Data, C051
- Finance & Economy
Data, C061 - Geospatial
Data, C071 - Health
Data, C081 - Hospitality,
Travel & Tourism Data,
C091 - Industry-Specific
Data, C101 - Innovation
& Trend Data, C111 -
Legal & Justice Data,
C121 - Market & Consumer
Data, C131 - Media &
Entertainment Data, C141
- Mobility Data, C151 -
Natural Resources & Energy
Data, C161 - Political
Data, C171 - Product &
Services Data, C181 -
Public Sector & Society
Data, C191 - Science
& Technology Data, C201
- Social Media, News &
Communication Data, C206 -
Sustainability Data, C211
- Transport & Logistics
Data, C221 - Web, IoT &
Device Data, C231 - Other
Data Categories ]
Tech, Discrete
Industries:Industrial
Machinery and Components,
Service Industries,
Service
Industries:Airlines,
Service
Industries:Engineering,
Construction, and
Operations, Service
Industries:Media, Service
Industries:Professional
Services, Service
Industries:Railways,
Service Industries:Sports
& Entertainment, Service
Industries:Telecommunicati
ons, Service
Industries:Travel and
Transportation, Public
Services, Public
Services:Defense and
Security, Public
Services:Future Cities,
Public
Services:Healthcare,
Public Services:Higher
Education and Research,
Public Services:Public
Sector ]
[ HR & People
Engagement, HR &
People Engagement:Employee
in HR and People
Engagements, HR &
People Engagement:Employee
Experience Management, HR
& People Engagement:Core
HR and Payroll, HR &
People Engagement:Talent
Management, HR &
People Engagement:HR
Analytics and Workforce
Planning, CRM and
Customer Experience,
CRM and Customer
Experience:Customer Data,
CRM and Customer
Experience:Marketing,
CRM and Customer
Experience:Commerce,
CRM and Customer
Experience:Sales, CRM
and Customer
Experience:Service, ERP
& Finance, ERP &
Finance:SAP S/4HANA, ERP
& Finance:ERP for Small
and Midsize Enterprises,
ERP & Finance:Financial
Planning and Analysis,
ERP & Finance:Accounting
and Financial Close,
ERP & Finance:Treasury
Management, ERP
& Finance:Accounts
Receivable, Billing &
Revenue Management, ERP
& Finance:Cybersecurity,
Governance, Risk
& Compliance,
Network & Spend
Management, Network &
Spend Management:Supplier
Managemetn, Network &
Spend Management:Strategic
Sourcing, Network & Spend
Management:Procurement,
Network & Spend
Management:Services
Procurement and Contingent
Workforce, Network &
Spend Management:Selling
and Fulfillment, Network
& Spend Management:Travel
and Expense, Business
Technology Plattform,
Business Technology
Plattform:Database and
Data Management,
Business Technology
Plattform:Application
Development and
Integration,
Business Technology
Plattform:Analytics,
Business Technology
Plattform:Intelligent
Technologies, Digital
Supply Chain, Digital
Supply Chain:Supply
Chain Planning, Digital
Supply Chain:Supply Chain
Logistics, Digital Supply
Chain:Manufacturing,
Digital Supply Chain:R&D /
Engineering, Digital
Supply Chain:Asset
Management, Experience
Management, Experience
Management:Brand
Experience, Experience
Management:Customer
Experience, Experience
Management:Product
Experience, Experience
Management:Employee
Experience ]
<shipments> Data Shipment The shipment types which the data pro-
vider supports:
• <Direct>
• <External>
• <OpenSql>
For example, the following file will create a new data provider definition:
Sample Code
{
"name": "Example Provider",
"contentAggregatorProviderID": "string",
"logo": "image string",
"description": "Lorem Ipsum description of my Provider",
"homepageUrl": "www.mydataprovidercompany.com",
"linkedinUrl": "www.linkedin.com/mydataprovidercompany",
"regionalCoverages": [
"Germany",
"France"
],
"dataCategories": [
"C001",
"C031"
],
"industries": [
"Financial Services",
"Energy and Natural Ressources"
],
"sapApplications": [
"HR & People Engagement",
"ERP & Finance"
],
"contactEmail": "max.user@companymail.com",
"sapEmail": "max.user@sap.com",
"country_code": "DE",
"zipCode": "12345",
"city": "Walldorf",
Use the .json file format to store the data product definition. It is needed for the upload which is part of the
create command for example.
You can find more information on data provider profiles in the Data Provider's Guide under Maintaining your
Data Provider Profile.
You can use the SAP Datasphere command line interface, datasphere, to manage and orchestrate Data
Marketplace data products.
Note
The SAP Datasphere command line interface module has been renamed from dwc to datasphere. The
command dwc will be decommissioned at the end of 2023: please use the new datasphere command
instead. For more information, see https://www.npmjs.com/package/@sap/datasphere-cli .
You can create new data products in mass operations, or update properties, such as pricing information,
publishing status, or context assignments. It is also possible to list all data products that belong to a certain
data provider and delete data products.
Note
To create new releases for data products, you must use the Data Sharing Cockpit (see The Data Sharing
Cockpit). This operation is not available via the command line.
The following sections, each representing one command, are available in this topic:
• Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line
Interface [page 4]).
• Login to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client [page
6]).
• Have a role of DW Modeler or equivalent privileges (see Command Line Roles and Privileges [page 86]).
To browse the available commands entering the following and press Return :
In environments where you are managing data products for multiple providers, you can use the following
command:
Returns a simple list of all existing data products assigned to your user.
Listed are all data products of all data providers and content aggregators you are a member of.
Parameter Description
-o, --output <output> Specifies the file in which the output of the command is
stored (optional).
Choices:
• application/vnd.sap.marketplace.providers.list+json
(default)
• application/vnd.sap.marketplace.providers.details+json
Lists the properties of a single data product. You need to specify the data products UUID.
Parameter Description
-o, --output <output> Specifies the file in which the output of the command is
stored (optional).
Creates a new data product based on a configuration following the data product definition file format and
stored as a .json file. See The Data Product Definition File Format [page 64] for more information.
Specify the full path to the input .json file, for example C:\temp\mydataproductdefinition.json.
The new data product is created in status Draft. You can change the status with the command change-
lifecycle-status.
Overwrites all properties of the specified data product with the provided data in the data product definition file.
Parameter Description
Specify the full path to the input .json file, for example C:\temp\mydataproductdefinition.json.
Note
If you want to update specific properties only, use the update command.
Updates only selected properties of the specified data product which are defined in the provided data product
definition file.
Parameter Description
Specify the full path to the input .json file, for example C:\temp\mydataproductdefinition.json.
With this command you can change the lifecycle status of a data product. A newly created data product is
automatically set to status Draft.
• Listed
• Delisted
• Deactivated
Parameter Description
Parameter Description
Parameter Description
-o, --output <output> Specifies the file in which the output of the command is
stored (optional).
Choices:
• application/vnd.sap.marketplace.providers.list+json
(default)
• application/vnd.sap.marketplace.providers.details+json
Lists the properties of a single data product. You need to specify the technical ID and data provider UUID or
content aggregator UUID.
Parameter Description
-o, --output <output> Specifies the file in which the output of the command is
stored (optional).
Parameter Description
Overwrites all properties of the specified data product with the provided data in the data product definition file.
Note
If you want to update specific properties only, use the update command.
Parameter Description
Updates only selected properties of the specified data product which are defined in the provided data product
definition file.
Parameter Description
With this command you can change the lifecycle status of a data product. A newly created data product is
automatically set to status Draft.
• Listed
• Delisted
• Deactivated
Parameter Description
Properties of a data product are set and retrieved in the space definition file format and stored as a .json file.
A data product definition file must not exceed 25MB, and can contain the following information:
Users with the DW Modeler role can create data products and set any data product properties (see Manage
Data Marketplace Data Products via the Command Line [page 54]) using the following syntax:
Sample Code
{
"dataProviderProductID": "<string>",
"contentAggregatorProductID": "<string>",
"name": "<string>",
"description": "<string>",
"space": "<string>",
"pricingModel": "OneTime|Monthly",
"pricingDescription": "<string>",
"price": "<number>",
"pricePerMonth": "<number>",
"priceCurrencyCode": "<string>",
"licenseKeyUrl": "<URL>",
"regionalCoverages": [
"<string>",
"<string>", ...
],
"dataCategories": [
"<string>",
"<string>", ...
],
"industries": [
<dataProviderProductID> not set manually in Data Sharing Cock- The unique ID of the given product in
pit the system of the data provider.
<contentAggregatorProductID> not set manually Data Sharing Cockpit The unique ID of the given product in
the system of the content aggregator
(if the corresponding data provider is
managed by a content aggregator).
<pricingModel> Pricing Model Select the pricing model for your data
product: One Time or Monthly. This
setting is only relevant for contract type
LicenseKey.
<licenseKeyUrl> URL for License Key Purchase Enter the URL to the shop of the
data provider where consumers can
purchase licenses for the data product.
<regionalCoverages> Regional Coverage String values for each region the data
is applicable to. Multiple values can be
specified.
Ethiopia, Falkland
Islands (Malvinas), Faroe
Islands, Fiji, Finland,
France, French Guiana,
French Polynesia, French
Southern Territories,
Gabon, Gambia, Georgia,
Germany, Ghana, Gibraltar,
Greece, Greenland,
Grenada, Guadeloupe,
Guam, Guatemala, Guernsey,
Guinea, Guinea-Bissau,
Guyana, Haiti, Heard
and Mc Donald Islands,
Holy See (Vatican
City State), Honduras,
Hong Kong, Hungary,
Iceland, India, Indonesia,
Iran, Islamic Republic
of, Iraq, Ireland,
Isle of Man, Israel,
Italy, Jamaica, Japan,
Jersey, Jordan, Kazakstan,
Kenya, Kiribati, Korea,
Democratic People's
Republic of, Korea,
Republic of, Kosovo
(temporary code), Kuwait,
Kyrgyzstan, Lao, People's
Democratic Republic,
Latvia, Lebanon, Lesotho,
Liberia, Libyan Arab
Jamahiriya, Liechtenstein,
Lithuania, Luxembourg,
Macao, Macedonia,
Madagascar, Malawi,
Malaysia, Maldives, Mali,
Malta, Marshall Islands,
Martinique, Mauritania,
Mauritius, Mayotte,
Mexico, Micronesia,
Federated States of,
Moldova, Republic
of, Monaco, Mongolia,
Montenegro, Montserrat,
Morocco, Mozambique,
Myanmar, Namibia, Nauru,
Nepal, Netherlands,
Netherlands Antilles, New
Caledonia, New Zealand,
Nicaragua, Niger, Nigeria,
Niue, Norfolk Island,
Northern Mariana Islands,
Norway, Oman, Pakistan,
Palau, Palestinian
Territory, Occupied,
Panama, Papua New
Guinea, Paraguay, Peru,
Philippines, Pitcairn,
Poland, Portugal, Puerto
Rico, Qatar, Republic of
Serbia, Reunion, Romania,
Russia Federation, Rwanda,
Saint BarthŽlemy, Saint
Helena, Saint Kitts &
Nevis, Saint Lucia, Saint
Martin, Saint Pierre and
Miquelon, Saint Vincent
and the Grenadines, Samoa,
San Marino, Sao Tome and
Principe, Saudi Arabia,
Senegal, Serbia and
Montenegro, Seychelles,
Sierra Leone, Singapore,
Sint Maarten, Slovakia,
Slovenia, Solomon Islands,
Somalia, South Africa,
South Georgia & The
South Sandwich Islands,
South Sudan, Spain,
Sri Lanka, Sudan,
Suriname, Svalbard and Jan
Mayen, Swaziland, Sweden,
Switzerland, Syrian Arab
[ C001 - Benchmarking
Data, C011 - Company
Data, C021 - Countries,
Regions & Cities Data,
C031 - Culture & Sports
Data, C041 - Environmental
& Weather Data, C051
- Finance & Economy
Data, C061 - Geospatial
Data, C071 - Health
Data, C081 - Hospitality,
Travel & Tourism Data,
C091 - Industry-Specific
Data, C101 - Innovation
& Trend Data, C111 -
Legal & Justice Data,
C121 - Market & Consumer
Data, C131 - Media &
Entertainment Data, C141
- Mobility Data, C151 -
Natural Resources & Energy
Data, C161 - Political
Data, C171 - Product &
Services Data, C181 -
Public Sector & Society
Data, C191 - Science
& Technology Data, C201
- Social Media, News &
Communication Data, C206 -
Sustainability Data, C211
- Transport & Logistics
Data, C221 - Web, IoT &
Device Data, C231 - Other
Data Categories ]
Industries:Industrial
Machinery and Components,
Service Industries,
Service
Industries:Airlines,
Service
Industries:Engineering,
Construction, and
Operations, Service
Industries:Media, Service
Industries:Professional
Services, Service
Industries:Railways,
Service Industries:Sports
& Entertainment, Service
Industries:Telecommunicati
ons, Service
Industries:Travel and
Transportation, Public
Services, Public
Services:Defense and
Security, Public
Services:Future Cities,
Public
Services:Healthcare,
Public Services:Higher
Education and Research,
Public Services:Public
Sector ]
[ HR & People
Engagement, HR &
People Engagement:Employee
in HR and People
Engagements, HR &
People Engagement:Employee
Experience Management, HR
& People Engagement:Core
HR and Payroll, HR &
People Engagement:Talent
Management, HR &
People Engagement:HR
Analytics and Workforce
Planning, CRM and
Customer Experience,
CRM and Customer
Experience:Customer Data,
CRM and Customer
Experience:Marketing,
CRM and Customer
Experience:Commerce,
CRM and Customer
Experience:Sales, CRM
and Customer
Experience:Service, ERP
& Finance, ERP &
Finance:SAP S/4HANA, ERP
& Finance:ERP for Small
and Midsize Enterprises,
ERP & Finance:Financial
Planning and Analysis,
ERP & Finance:Accounting
and Financial Close,
ERP & Finance:Treasury
Management, ERP
& Finance:Accounts
Receivable, Billing &
Revenue Management, ERP
& Finance:Cybersecurity,
Governance, Risk
& Compliance,
Network & Spend
Management, Network &
Spend Management:Supplier
Managemetn, Network &
Spend Management:Strategic
Sourcing, Network & Spend
Management:Procurement,
Network & Spend
Management:Services
Procurement and Contingent
Workforce, Network &
Spend Management:Selling
and Fulfillment, Network
& Spend Management:Travel
and Expense, Business
Technology Plattform,
Business Technology
Plattform:Database and
Data Management,
Business Technology
Plattform:Application
Development and
Integration,
Business Technology
Plattform:Analytics,
Business Technology
Plattform:Intelligent
Technologies, Digital
Supply Chain, Digital
Supply Chain:Supply
Chain Planning, Digital
Supply Chain:Supply Chain
Logistics, Digital Supply
Chain:Manufacturing,
Digital Supply Chain:R&D /
Engineering, Digital
Supply Chain:Asset
Management, Experience
Management, Experience
Management:Brand
Experience, Experience
Management:Customer
Experience, Experience
Management:Product
Experience, Experience
Management:Employee
Experience ]
<shipments> Data Shipment Specify the shipment types you are of-
fering. These shipment types are used
if a customer filters offerings for a dis-
tinct shipment type. It is particularly
important if the data provider has no
products listed yet as only the ship-
ment types given here are used for the
search.
• Direct
The data is copied directly into the
space that the consumers select.
• External
The data is delivered by sharing
files outside SAP Datasphere.
• OpenSql
The consumers need to provide an
Open SQL Schema to you, using
the Data Inbox. Once activated, the
data is accessible through the Data
Builder and the provided schema
appears as a source.
String Array
Note
If you create a data product in full
delivery using the CLI, you cannot
create a release with the CLI. Make
sure to manually create a release
in the Publishing Management sec-
tion of the Data Sharing Cockpit. In-
deed, a release is mandatory if you
want to list your data product for
instance.
<deliveryPatternDescription> Delivery Pattern Description Free text that provides additional infor-
mation when exactly a customer can
expect an update of the product data.
For example, the following code snippet defines a new data product:
Sample Code
{
"dataProviderProductID": "My_Data_Product",
"contentAggregatorProductID": "CW_4711",
"name": "Sales Sample Data for SAP",
"description": "Lorem Ipsum description of my Provider",
"space": "SAMPLE_SPACE",
"pricingModel": "OneTime",
"pricingDescription": "string",
"price": 599.99,
"pricePerMonth": 9.99,
"priceCurrencyCode": "string",
"licenseKeyUrl": "http://mysapdatalicenseshop.com",
"regionalCoverages": [
"Germany",
"France"
],
"dataCategories": [
"C001",
"C031"
],
"industries": [
"Financial Services",
"Energy and Natural Ressources"
],
"sapApplications": [
"HR & People Engagement",
"ERP & Finance"
],
"shipments": [
"OpenSql"
],
"productArtifacts": [
{
"name": "My_View",
"dataFilter": "country = 'france' and year = '2019'",
"columns": [
{
"name": "string"
}
]
}
],
"dataDocumentation": [
{
"name": "My_DataDocumentation_File.pdf",
"description": "My data documentation file",
"blobData": "string",
Use the .json file format to store the data product definition. It is needed for the upload which is part of the
create command for example.
You can find more information on creating data products in the Data Provider's Guide under Creating a Data
Product.
1.9 Manage Tasks and Task Chains via the Command Line
A collection of SAP Datasphere CLI commands that can be used to control and manage tasks and task chains.
The basic CLI command to manage tasks and task chains is datasphere tasks. Then, there are three
subcategories of task and task chain commands you can use. Consent, Application, and Logs.
• datasphere tasks consent get - retrieves information whether consent has been given or consent has
expired.
• datasphere tasks consent give - provides consent to perform tasks and task chains.
• datasphere tasks consent revoke - revokes consent to perform tasks and task chains.
Command Description
Application Commands
• datasphere tasks chains run - runs a specified task chain in a given space.
Command Description
• datasphere tasks logs get - returns log information about a specific task chain run.
• datasphere tasks logs list - returns log information about all runs of a specific task chain.
Command Description
These options are available for all or most datasphere commands used in the command line interface.
Indeed, only the command specific options are displayed in the SAP Datasphere command line interface. All
the generally available options are listed here.
Option Description
--options-file [optional] Enter a path to a .json file containing all of some of your datasphere op-
<file>.json
tions, listed using the full option names.
--host "<url>" Enter the URL of your SAP Datasphere tenant. You can copy the URL of any page in your
tenant. Alternatively, set a host value (see Set a Host Value to Identify Your SAP Datasphere
Tenant [page 5]).
Note
The client ID must be encoded as a URI when passed as a parameter.
--secrets-file [optional] Enter a path to a .json file containing the following OAuth options, using the full
<file>.json option names
{
"client_id": "<client-id>",
"client_secret": "<client-secret>",
"authorization_url": "<authorization-url>",
"token_url": "<token-url>",
}
Note
Secrets files use versions of the options with underscores instead of hyphens.
Passing this file with the tokens allows you to run any command without having first to log
in.
--access-token [optional] Enter the access token for interactive oauth session authentication.
"<token>"
--refresh-token [optional] Refresh the access token for interactive oauth session authentication.
"<token>"
--code "<code>" [optional] Enter the code for oauth token retrieval.
--token-url "<url>" [optional] Enter the Token URL provided by your administrator.
--passcode <code> [optional] If you are not logged into an OAuth client, you must provide a passcode that you
have obtained from your SAP Datasphere tenant.
You can include a passcode with your command using the --passcode parameter. If you
do not include the --passcode parameter, datasphere will prompt you to obtain a
passcode:
1. Enter y and datasphere will open the passcode page for your tenant.
2. If you are not already logged in, you must enter your username and password.
3. When you arrive at the passcode page, copy the temporary authentication code and
paste it into the command line.
Note
If you are not logged into an OAuth client, you must enter a new passcode for each
command that you issue with datasphere.
--expires-in [optional] Enter the date when the interactive oauth session authentication expires.
"<expires>"
--output [optional] Enter a path to a .json file to write the output to.
<file>.json
If you do not include this option, the output will be printed to the command line.
Command Description
datasphere config cache init --host Download the file of available datasphere commands
"<url>" from the SAP Datasphere instance.
datasphere config cache clean Delete the local file of available datasphere commands.
datasphere <command> --help --host Display help for the specified datasphere command.
"<url>"
datasphere config secrets show Display the parameters for the OAuth client you are logged
into.
datasphere config passcode-url --host Display the passcode url for the SAP Datasphere server.
"<url>"
The config command is a top level command that reveals all the CLI configuration-related commands such as
cache, secrets, host, and so on:
Command Description
The command line interface requires the same privileges to perform actions as are needed to use the standard
graphical interface.
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
• Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
• The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
• SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
• Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering an SAP-hosted Web site. By using
such links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Bias-Free Language
SAP supports a culture of diversity and inclusion. Whenever possible, we use unbiased language in our documentation to refer to people of all cultures, ethnicities,
genders, and abilities.
SAP and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP
SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their
respective companies.