(GLUE-1905) Generate and Execute Variants for Query Extraction
This document describes the process of creation and subsequent execution of variants for BW query extraction by using the Datavard tool Task Handler. After execution of the variant for the BW query extraction, the standard SAP job is created that replicates the specified data into external storage.
Generation of query variants
To generate variants for query extraction proceed as follows:
- Run the transaction /DVD/GL_GEN_QVAR
- Specify the following parameters:
- Extractor - name of the extractor for which the variants should be generated. You may use F4 help.
- Variant Name Prefix - prefix of the variant name. The complete name of the variant is generated from this prefix and an incremental number.
- Description Prefix - prefix of the variant description. The complete description is also generated from this prefix and an incremental number.
- Package Size - maximum number of rows transferred within one package. This field defines package size for each variant you generate through next selection screen.
- Extractor - name of the extractor for which the variants should be generated. You may use F4 help.
- You may choose between two options on how to generate variants.
The first is to generate the query variants in the selection screen. In the selection screen, you can specify values for a variant generation.
Based on specified values, the program reads master data of an InfoObject and generates variants for all combination of selected values.To perform this:
- Click Continue.
- Mark checkboxes with variables you want to use for selection.
Specify values for previously selected variables under Values selection.
Variants generation example
Using the variants generator screen-shot below as an example, there will be the following variants generated:
Variant Name Smoker Manager Facility or State Park Variant 1 BENEDICT SHAFFER OPERATIONAL Variant 2 BENEDICT SHAFFER OPERATIONAL Variant 3 CAMERON SANTANA OPERATIONAL ... Variant N-1 REECE WEST OPERATIONAL Variant N REECE WEST OPERATIONAL
- The second option is to generate the query variants from a csv file.
To perform this:Select Generate template in the previous Generate Variant for Query Extractor screen. Using this template, you can manually define variants you want to generate.
See template.csv as an example of the generated template file.Select Generate variants from .csv.
Each variant is defined by a number of lines (depending on the number of query parameters), where each line represents a value for 1 parameter. A line consists of the following columns:- Variant name
- Query variable technical name
- Selection type - the type of the statement, either P - Parameter or S - Select option
- Sign - whether the result of the row condition is included in or excluded from the resulting set. Possible values are I - inclusive and E - exclusive.
- Option - selection operator. Possible values are EQ - equal, NE - not equal, GT - greater than, LT - less than, LE - less than or equal, GE - greater than or equal, and BT - between.
- Low value
- High value
- The following confirmation screen displays the exact number of variants, which will be generated. Confirm and then, check the results in the Extractor Workbench - newly generated query variants should appear under your extractor.
- After the variants are generated, you can find them under specified extractor in Glue Extractor Workbench.
Execution of query variants
If you want to execute multiple variants at the same time, we recommend to use the Datavard tool Task Handler (transactions /DVD/TH_EDIT and /DVD/TH_MONITOR). To execute variants proceed as follows:
Create a Task run ID
- Run the transaction /DVD/TH_EDIT.
- Specify the Process ID "GLUE_VAR_EXEC", select Open existing process and Execute (F8).
Click Create run (F8), fill in your new Task run ID and Confirm.
Generate a execute the variant execution task
- Click Generate variant execution tasks.
- Specify the name of your query extractor or find it with the help of F4 help and Execute (F8).
- Go back to the previous screen and check if the variant execution tasks were generated and if their status is set to green. If not, please check if the variants were generated, as described in 1085210795 and if the variants are active.
- To execute variants double click on Variants execution, specify the desired number of parallel jobs and confirm.
- Double-click on the Monitor button to track the variants execution process or monitor it directly in Extractor Request Browser, see more information under (GLUE-1905) Manage the Executed Extraction of an Extractor.