The Space Definition File Format

Space properties are set and retrieved in the space definition file format and stored as a .json file. A space definition file must not exceed 25MB.

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>,
	"longDescription": "<Space_Description>",
      "auditing": {
        "dppRead": {
          "retentionPeriod": <days>,
          "isAuditPolicyActive": true|false
        },
        "dppChange": {
          "retentionPeriod": <days>,
          "isAuditPolicyActive": true|false
        }
      },
      "allowConsumption": true|false,
      "enableDataLake": true|false,
      "members": [],
      "dbusers": {},
      "hdicontainers": {},
      "workloadClass": {
        "totalStatementMemoryLimit": {
          "value": 0,
          "unit": "Gigabyte|Percent"
        },
        "totalStatementThreadLimit": {
          "value": 0,
          "unit": "Counter|Percent"

    }
  }
}
Parameters are set as follows:

Parameter

Space Property

Description

<SPACE_ID>

Space ID

[required] Enter the technical name of the space. Can contain a maximum 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.

Default value: <Space_ID>

assignedStorage

Disk (GB)

Enter the amount of storage allocated to the space in bytes. You can enter any value between 100000000 bytes (100MB) and the total storage size available in the tenant.

Default value: 2000000000 bytes (2GB)

assignedRam

Memory (GB)

Enter the amount of ram allocated to the space in bytes. You can enter any value between 100000000 bytes (100MB) and the total storage size available in the tenant.

Default value: 1000000000 bytes (1GB)

longDescription

Description

Enter a description for the space. Can contain a maximum of 4 000 characters.

dppRead.isAuditPolicyActive

dppRead.retentionPeriod

dppChange.isAuditPolicyActive

dppChange.retentionPeriod

Enable Audit Log for Read Operations

Keep Logs for <n> Days

Enable Audit Log for Change Operations

Keep Logs for <n> Days

Enter the audit logging policy for read and change operations and the number of days that the logs are retained. you can retain logs for any period between 7 and 10000 days.

Default values: false, 30, false, 30

allowConsumption

Expose for Consumption by Default

Choose the default setting for the Expose for Consumption property for views created in this space.

Default value: false

enableDataLake

Use This Space to Access the Data Lake

Enable access to the SAP HANA Cloud data lake. Only one space can connect to the data lake.

Default value: false

members

User Assignment

See Members.

dbusers

Database Users

See Database Users.

hdicontainers

HDI Containers

See HDI Containers.

For example, the following file will create a new space, with all default properties:
{
  "NEWSPACE": {
    "spaceDefinition": {
      "version": "1.0.4"
    } 
  } 
}
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
    } 
  } 
}

Database Users

The dbusers area of the space definition file is deprecated and ignored. To create, update, or delete database users, use the datasphere dbusers commands (see Managing Database Users via the Command Line).

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 HANA for SQL Data Warehousing HDI Containers) using the following syntax:
{
  ...
  "hdicontainers":{
    "<Container_Name>":{}
    },
Parameters are set as follows:

Parameter

Space Property

Description

<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": {},
      } 
    } 
  } 
}

When updating HDI containers, you must always list all HDI containers that you want to have assigned to the space. To delete an HDI container, remove them from the hdicontainers section.

Table, View, and Data Access Control Definitions

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)Information published on SAP site). 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
          }
        }
      }
    }
  }
}