(Glue-2108) Create a Glue Table

More information on what is a Glue table can be found in the chapter (Glue-2108) Glue Objects Explained.

To create a Glue table

Step 1: Create a Glue table definition

  1. Run the transaction /DVD/GL11 to open Data Dictionary.
  2. Enter the name of a new table and click Create.


  3. Enter the description of the table in Short Description.
  4. Under the Attributes tab fill in the following fields based on your preference:
    • Enable update (optional) – simulates the update operation for tables on storages that don't support the update operation. More information can be found in the section Enable update.
  5. Choose, if you prefer transparent or binary storage for the target table: 
  6. Select Storage Management. It will navigate you to the Storage Management setup where you can see and manage (if you have the rights to do so) storages.

Step 2: Insert fields manually or import them from an existing SAP DDIC table, an InfoProvider, a file, or a BEx Query/View 

You can either manually insert fields or import them from an existing SAP DDIC table, an InfoProvider, a file, or a BEx Query/BEx Query View. You may define fields (columns) of a new table. 

a. Import fields from an existing SAP table

To generate the field structure of a Glue table based on existing SAP DDIC table, an InfoProvider, a file, or a BEx Query/View

  1. Select the Fields tab.
  2. Select Import Fields. (Field names, data elements, types, lengths, and descriptions are imported from the selected source.)
    1. To import fields from a table, mark From table.
    2. To import fields from an InfoProvider, mark From InfoProvider.
    3. To import fields from a file, mark From File.
    4. To import fields from a BEx Query or a BEx Query View, mark Bex Query/View. The program then automatically finds out which type of object is specified in the corresponding parameter. It finds out whether it is a BEx Query or a BEx Query View and it translates query elements to the DDIC fields form.

      If you cannot import fields from BEx Query or BEx Query View due to unsupported structure (e.g. Characteristics in columns (axis X), enabled Hierarchy or multiple structures in rows (axis Y)), adjust your query in BEx Query Analyzer or Query Monitor (TCODE RSRT), save it as Query View and use it to import the fields.

  3. You can use standard SAP field names or the "meaningful" ones. To use the meaningful fields select Use meaningful fields. More information can be found in the section Meaningful fields.



An example of imported fields.

      

The RAW fields will be added to the Glue table with an empty data element. Before the activation, you must manually define the data element or remove the field from the Glue table.

b. Insert fields manually 

If you choose to manually insert fields

  1. Select the Fields tab.
  2. To insert or append a new field, click Insert or Append row.
  3. Fill in:
    • Field name – name of the field
    • Key field – mark, if it is a key field

The total number of characters for the primary Key field value is restricted to 338.

    • Data element
    • Data Type – automatically filled according to the Data element or you can set it up manually by clicking Data Type/Element specification . You can then manually specify the Data Type, Length, Decimal Places, Short text.

      The following data types are not supported when you create a Glue table: LRAW, RAW, RSTR, VARC.

    • Partitioning
      You may set the partitioning for fields, based on which data is distributed into blocks during the extraction. This step enables you to modify the data grouped in these blocks. By default, the partitioning is set on the GLREQUEST field.

      If you use a Hive or an Impala storage, please keep in mind which fields you choose for Partitioning. Selecting too granular data for partitioning may decrease the performance and the stability of the whole cluster.

    • Reference Fieldname – the reference field for Data enrichment, containing the name of the field with original values. More information can be found in the section Data Enrichment.

      To delete a row, highlight the particular row and click Delete Row. You may view the following ALV operations:

    • Add deletion flag button - appends a field GLDELFLAG with data element /DVD/GL_DELFLAG (CHAR1), which will be automatically detected in the Extraction Process and Delete flag transfer rule assigned.

4. Save. (You can save the table anytime during your work.) All actions you have made so far are performed on the SAP side and have no effect on the Hadoop system.

5. If the table was not saved before, the system will ask you to fill in the Package.

6. Activate. Only after you activate the Glue table, it is created on external storage (for example Hadoop). The activation of a Glue table doesn't influence other Glue components.