Creating a Local Table (File)

Create a local table (file) to store data in the object store. Load data to your local table (file) via replication flows and transform the data with transformation flows.

Prerequisites

To create local tables, you must have a scoped role that grants you access to a space with the following privileges:
  • Data Warehouse General (-R------) - To access SAP Datasphere.

  • Data Warehouse Data Builder (CRUD----) - To create, edit, and delete Data Builder objects.

  • Space Files (CRUD----) - To create, read, update, and delete objects in your spaces.

The DW Modeler role template, for example, grants these privileges. For more information, see Privileges and Permissions and Standard Roles Delivered with SAP Datasphere.

Context

SAP Datasphere supports two types of local table to persist data:

You cannot create views and analytic models in file spaces, but you can share local tables (file) to standard spaces where they can be consumed by views, flows, and analytic models (see Sharing Entities and Task Chains to Other Spaces). You can also share a local table (file) to another space file.

SAP HANA Cloud, data lake allows SAP Datasphere to store and manage mass-data efficiently in a secured environment. The SAP HANA native SQL on files feature gives you a direct access to the data stored in the object store and enables large data-based business scenarios at lower costs.

As a local table (file) is capturing delta changes via flows, it creates different entities in the repository after it is deployed:
  • An active records entity for accessing the delta capture entity through a virtual table. It excludes the delta capture columns and deleted records, and keeps only the active records.

  • A delta capture entity that stores information on changes found in the delta capture table. It serves as target for flows at design time. In addition, every local table (file) has a specific folder in file storage (inbound buffer) to which data updates are stored until they are pushed to the local table (file) by a merge task (see Creating a Task Chain, Monitoring Local Tables (File) and Creating a Replication Flow). You can monitor the buffer merge status using the Local Tables (File) monitor (See Monitoring Local Tables (File).

Create a Local Table (File)

Procedure

  1. In the side navigation area, select (Data Builder), select a space if necessary, and select New Table to open the editor.

  2. Enter the following properties as appropriate:

    Property Description

    Business Name

    Enter a descriptive name to help users identify the object. This name can be changed at any time.

    Technical Name

    Displays the name used in scripts and code, synchronized by default with the Business Name.

    To override the default technical name, enter a new one in the field. Technical names can contain only alphanumeric characters and underscores.

    Semantic Usage

    Select the way your entity should be used for data modeling purposes.

    Choose from the following:

    Allow Data Transport

    [dimensions only] [SAP Business Data Cloud formation tenants only] Allow users to include the table data in a package when transporting the table.

    This feature is intended to allow you to transport limited quantities of data for static and slowly changing dimensions, text entities, and relational datasets. If the local table is created by the import (or if it already exists but is empty), the transported data will be imported to it.

    See Transporting Local Table Data.

    Storage

    [read-only] Displays the table storage.

    For local tables created in a space with SAP HANA Cloud data lake storage, the value is "File".

    Status

    [read-only] Displays the deployment and error status of the object.

    For more information, see Saving and Deploying Objects.

  3. Review (and update if needed) the Change Tracking section of your local table (file):

    • Delta Capture: If enabled, it tracks the delta changes that are made in the local table adding 2 delta capture columns: Change Type and Change Date. It cannot be changed after deployment.

    • Delta Capture Table: When Delta Capture is enabled, this field is added, and a default name for the delta capture table is defined (Technical name + _Delta).

    • Deletion Vector: Deletion vectors optimize how delete and update operations are processed for local tables (file). When enabled, rows that are deleted or updated are tracked using lightweight metadata markers rather than rewriting the underlying data files. Without deletion vectors, modifying even a single row requires rewriting the entire file that contains that row. With deletion vectors enabled, only metadata is updated to identify changed rows, which can improve replication performance and reduce storage overhead for delta capture operations. The performance benefits depend on the workload. For update operations that affect only a subset of the data, Spark resource consumption and run time can improve by up to approximately 90%, as Parquet files do not need to be rewritten. However, for full-table update scenarios, deletion vectors may increase resource consumption and reduce performance compared to tables that do not use deletion vectors

  4. Based on the Semantic Usage of your entity, review and modify its ColumnsAttributes, and/or Measures:

    Columns can have the following properties:
    Property Description

    Key

    Select the checkbox to specify that the column is a primary key column. Key columns cannot be null.

    Business Name

    Enter a descriptive name to help users identify the object. This name can be changed at any time.

    Technical Name

    Displays the name used in scripts and code, synchronized by default with the Business Name.

    To override the default technical name, enter a new one in the field. Technical names can contain only alphanumeric characters and underscores.

    Data Type

    Select the type of data that the column will contain.

    Not Null

    Select this option to indicate that the column must contain a value.

    Change Type

    This column will track the type of last change made to a record.

    Note that deleting a record will not physically delete it, so that the changes can be propagated to the different objects that consume it in delta mode. It is however filtered out when accessing the local table (using the Active Records Table). The handling of the different change types is implemented internally by SAP Datasphere apps that consume the Delta Capture Table with no need for consideration in modeling. For more information on records deletion, see Load or Delete Local Table Data

    Change Date

    The column will track the last date and time of the last change to an individual record. Current UTC timestamp.

  5. Create associations to other entities if needed (see Create an Association to Define a Semantic Relationship Between Entities).

  6. Business Purpose - Provide a description, purpose, contacts, and tags to help other users understand your entity.

  7. Partition Columns- Define partitions.

    Partitions for a local table (file) must be based on columns (and not on range of values as for local tables stored on SAP HANA database). Some data types are not supported for partitioning. The dialog will propose only columns with supported data types. For more information, on data types supported, see Data Types Supported By Local Tables (File).

    For more information on partitions, see Partitioning Local Tables.

  8. Dependent Objects- If your entity is used as a source or a target (for example, table with delta capture enabled) or as association target for other entities, then they are listed here. For more information, see Review the Objects That Depend on Your Table or View.

  9. Click (Save)Start of the navigation path Next navigation step SaveEnd of the navigation path to save your entity or click (Deploy) to save and deploy it immediately.

    For more information, see Saving and Deploying Objects.

  10. Once your local table (file) is deployed, you can consume it or share it.