Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The creation of the Glue table requires a few additional steps in comparison with creating a table on transparent storage. You can find the common procedure on page Create a Glue Table and during the selection of the Storage ID (Load) you need to follow these steps:

  1. Fill a Storage ID (Load) with a valid File storage ID. You should see the File storage options button. You might need to press enter (after filling storage ID) in order to see this button.

    Image RemovedImage Added
  2. Press the File storage options button. You should see the following popup:

    Image RemovedImage Added
  3. Fill the parameters based on your requirements or leave the default one, if suitable.

    1. Container name – directory where files generated by Glue are stored (obligatory parameter). You can also specify a path to the container by using a slash sign as a separator between the containers.

    2. Delimiter type – character which separates values in generated .csv files. This character can be selected from F4 help (obligatory parameter).

    3. Put values into quotes – option for putting values into the quotes (use when there is a delimiter character present in data).

    4. Use extending escaping (optional) – replaces escape characters, such as newline, backspace, tabulator, etc., by the 'space' character. This can be customized in the table /DVD/RL_EXT_ESC and a default set of values can be filled by transaction /DVD/RL_DEFAULT_ESC.

    5. Include header (optional) – includes a header line at the beginning of the file with data.

    6. One file extraction (optional) – keeps all data in one file (data from one extraction is stored in only one file).

    7. Compress file(optional) – compresses the file into a gzip. This feature cannot be selected if the parameter One file extraction is enabled and vice versa.

    8. Compression level - compression level of the gzip file. Available values can be selected from F4 help. The default value is 5. The parameter will appear only if the Compress file option is checked.

  4. Confirm your selection. Now you can continue with Step 2 of Create a Glue table procedure.

Glue table on File storage explained

On file-based storages, no structures like database tables are created and data is stored within a specific location in .csv files. To keep track of the Glue tables created, the .json metadata file is generated at a specific location (defined in Container name) during Glue table activation. A similar metadata file is also transferred in case an alter operation is performed on the Glue table. The naming convention for the Glue table name can be customized via Glue Settings - Binary Storage settings parameter called Binary table metadata file name.

JSON metadata structure

The metadata for each Glue table created on file storage is stored in the JSON file and contains the technical description of the Glue table. This file can be used by an external processing application to process the Glue table correctly.
In the next section, we discuss the JSON metadata structure and the meaning of particular attributes.

Example file content

Code Block
languagejson
{
  "Table" :{
    "TableName" :"ZGLUE_TABLE",
    "Description" :"Example Glue Table",
    "DevClass" :"ZMS_TEST",
    "StorageID" :"AWS_Q1",
    "Delimiter" :","
  },
  "Fields" :[
    {
      "FieldName" :"CALMONTH",
      "Position" :"0002",
      "KeyFlag" :"X",
      "RollName" :"/BI0/OICALMONTH",
      "DataType" :"NUMC",
      "Length" :"000006",
      "Decimals" :"000000",
      "Domain" :"",
      "Description" :"Calendar year/month",
      "Partitioning" :"",
      "ReferenceFieldName" :""
    }
  ]
}

Attributes description

The whole table metadata is encapsulated into a single JSON object that consists of two main attributes named “Table“ and “Fields“.

Attribute “Table“ contains general information about the table, that are represented as standard JSON attributes in “name“ : ”value” format these attributes are:

  • “TableName“ - The name of the Glue table that was provided during the Glue table creation process

  • “Description“ - Description assigned to Glue table during Glue table creation process

  • “DevClass“ - Development class (package) in SAP, where the Glue table was created

  • “StorageID“ - Technical ID of the storage used for Glue table creation

  • “Delimiter“ - Delimiter used for separating values within CSV data files

Attribute “Fields“ contains information about all fields defined within the Glue table. The information is represented by an array of JSON objects, where each contains the following information:

  • “FieldName“ - Technical name of a field defined within the Glue table

  • “Position“ - Position of the field within Glue table definition. Also represents the position of the field (column) within the CSV data file

  • “KeyFlag“ - Indicates whether the field was defined as a key field. Value “X“ indicates that the field is a key field, the value ““ indicates the non-key field

  • “RollName“ - Name of the data element defined within SAP DDIC that is assigned to the field of the Glue table

  • “DataType“ - ABAP Dictionary data type of the field

  • “Length“ - Length/Character length of the field in the ABAP dictionary

  • “Decimals“ - Number of decimal places

  • “Domain“ - Name of the ABAP dictionary domain

  • “Description“ - Meaningful description of the field provided by user/DDIC data element

  • “Partitioning“ - Indicates whether the field is used as a partitioning field or not. “X“ - True, ““ - False

  • “ReferencedFieldName“ - Referenced field name used for Data Enrichment functionality.