(GLUE-1905) Create a Glue Table
To create a Glue table
Step 1: Create a Glue table name
- Run the transaction /DVD/GL11 to open Data Dictionary.
- Enter the name of a new table and click Create.
Step 2: Create a Glue table definition
- Enter the description of the table in Short Description.
- Under the Attributes tab fill in the following fields based on your preference:
- Enable update (optional) – simulates the update operation for tables on storages which don't support the update operation, for more information see Enable update.
- Use meaningful values (optional) – transforms original values into more meaningful ones, for more information see Meaningful values.
- Data enrichment (optional) – includes data from SAP master data into transactional data, for more information see Data enrichment.
- Choose, if you prefer a transparent or a binary storage for the target table:
- For a transparent storage, enter its ID in the field StorageID (Load).
- For a binary storage:
- Enter its ID in the field StorageID (Load).
- Then, select Binary storage options.
- Fill in the following fields:
- Container name – directory where files generated by Glue are stored (obligatory parameter).
- Delimiter type – character which separates values in the generated .csv files. This character can be selected from F4 help (obligatory parameter).
- Put values into quotes – option for putting values into quotes (use when there is a delimiter character present in data).
- Use extending escaping (optional) – replaces escape characters, such as newline, backspace,tabulator, etc. by the 'space' character.
- Include header (optional) – includes a header line at the beginning of the file with data.
- One file extraction (optional) – keeps all data in one file (data from one extraction is stored in only one file).
- 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.
- Compression level - compression level of gzip file. Available values can be selected from F4 help. Default value is 5. The parameter will appear only if the Compress file option is checked.
- For a transparent storage, enter its ID in the field StorageID (Load).
- Select Storage Management, which navigates you to Storage Management setup, where you can see and manage (if your user has the rights to do so) storages.
Step 3: Insert fields manually or import them from an existing SAP DDIC table, an InfoProvider or a file
You can either manually insert fields or import them from an existing SAP DDIC table, an InfoProvider or a file. 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 or a file
- Select the Fields tab.
- Select Import Fields. (Field names, data elements, types, lengths, and descriptions are imported from the selected source.)
- To import fields from a table, mark From table.
- To import fields from a InfoProvider, mark From InfoProvider.
- You can use standard SAP field names or the "meaningful" ones. To use the meaningful fields select Use meaningful fields. For more information, see Meaningful fields.
An example of imported fields.
b. Insert fields manually
If you choose to manually insert fields
- Select the Fields tab.
- To insert or append a new field, click Insert or Append row.
- 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 partitioning for fields, based on which data is distributed into blocks during the extraction. This step enables you to modify 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. For more information see Data Enrichment.
To delete a row, highlight the particular row and click Delete Row. On the following figure you may view the ALV operations:
- Save. (You can save the table anytime during your work.)
All actions you made so far are performed on the SAP side and have no effect on Hadoop system. - If the table was not saved before, the system will ask you to fill in the Package.
- Activate.
Only after you activate the Glue table, it is created on an external storage (for example Hadoop). The activation of a Glue table doesn't influence other Glue components.