(GLUE-1808) Create Variant
The extractor can be used only when there is a variant created for it.
To create a variant:
- Right-click on existing extractor and select Create Variant (Create variant for extract) or click on the Create Variant button in the Extractor toolbar (Create variant for extractor from the toolbar).
Create a variant for the extractor
Create a variant for extractor from the toolbar
2. Fill in the following fields:
- Variant name – technical name of the variant
- Description
- Extractor name – technical name of the extractor for which the variant is being created. If the popup triggered by right-clicking on the specific extractor, this field is pre-filled.
Create a variant for the extractor – popup
3. The variant screen is open with the basic information about it, displayed in the Variant Details section.
In the Options section, you can specify the size of the Package. This defines the number of records which are transported to Hadoop in a single package. If a higher number of records is about to be transported, they are divided into multiple packages.
You can also set up a filtering of the data in the Variant Selection section. Only the filtered data is then transferred to Hadoop.
Variant details
Once the variant is created and activated, you can trigger a job to perform data extraction. Use this link for more information.
Select option enhancements
Select option supports enhancements. if you have complicated logic behind your selection, you can use /DVD/GL_EXT_VAR_SELOPT enhancement spot. Simply create Enhancement implementation, define a filter and implement the class with /DVD/GL_IF_SELECTION_DEF interface.
To trigger the Enhancement implementation during the runtime, you have to use the same value as you used in your Enhancement Implementation Filter. Value from this filter must be inserted into the Select-Options with sign "$" as a prefix.
Badi creation and registering it for runtime
In the se19 transaction, you can create new enhancement implemnetation:
You have just created enhancement implementation with its first badi implementation.
At this point class is already created and you have to only fill in the relevant implementation for its interface methods:
Our enhancement spot has a filter. Therefore you have to define the filter value that will specify your badi implementation. Click on Combination to create a new row. Then double-click on the new row to enter values. The value you will specify here in filter will be used in extractor variant to connect variant selection with your badi implementation.
Now, you can specify this filter in any select option of Extractor variant. Mind, that filter value is case-sensitive. You can put this value to any selection field, but you always have to put "$" as a prefix.