Annotate Stream (step)
Overview
The Annotation Stream step helps you refine your data table for the Streamlined Data Refinery by creating measures, link dimensions, or attributes on column(s) that you specify.
The Annotation Stream step helps you refine your data for the Streamlined Data Refinery by creating measures, link dimensions, or attributes on column(s) that you specify.
If you want, you can create multiple annotations on the same field; for example, you might want to create an average measure and a sum measure on the same field. You can also create multiple Annotation Streams to modify the same data model.
The Annotate Stream modifies the default model produced from the Build Model job entry.
After you are done annotating your data model, you are ready to publish it.
Using the Annotate Stream Step
These sections describe the different ways that you can create annotations. The annotation type that you create determines which properties are shown in the dialog box to complete that annotation.
- Locate the Annotate Stream step from the Design pane in PDI.
- Drag and drop the Annotate Stream icon onto the transformation canvas.
You can also double-click on icons in the Design pane to add them to the canvas. - Double-click the Annotate Stream icon to open the dialog box.
You can also double-click on icons in the Design pane to add them to the canvas. - Fill out the information in the dialog box:
- Step Name - type a name for your entry in this field.
- Local or Shared - choose if you want to save your step locally or share it.
- Select Fields - click this button to select from a list of available fields for annotation.
- Model Action - select an annotation type: Create Measure, Create Attribute, or Create Link Dimension.
- Click OK to continue or Cancel to close the dialog box.
- If you make a change to an annotation, click Apply to save them or Cancel to close the dialog box.
This is an example of the Annotate Stream dialog box, along with a table that has more details about each field.
Options | Description |
---|---|
Step Name | Displays the name of the step. |
Local | Choose Local if you want to save the annotations locally into the transformation. |
Shared | Choose Shared to select, create, or rename a shared group for use by PDI users. |
Description | Use this space to enter a description for local annotations or shared group. |
Annotations | Displays a list of fields and annotations. |
-Edit | Use to edit a field that you have highlighted from the Field list. |
-Delete | Use to delete a field that you have highlighted from the Field list. |
-Field | Lists the names of the fields selected for annotation. |
-Model Action | Specifies which model action is being taken: Create Measure, Create Attribute, Link Dimension. |
-Summary | Displays a summary of that specific annotation. |
Select Fields | Displays a list of fields to be be annotated or linked to a shared dimension. |
Apply | Applies changes to the annotation. |
Help | Provides a link to the Help documentation. |
OK | Click OK to save. |
Cancel | Click Cancel to close the window. |
Creating Annotation Groups
Annotation groups are useful when data sources, such as a weblog table, are reused in many transformations. Whenever this table is used, you can link to the shared annotation group to get model information on each table field. If the table were to ever change, then the annotations would only need to be updated in one place.
You can create multiple annotations based on the same annotation group by copying the group, and then saving it with a different name. You can do this as many times as you need to make a series of related annotation groups, such as annotations for time dimensions.
You can either save the group locally, or you can share it in the metastore for use later in creating PDI jobs.
- Open PDI and create a new transformation.
- Drag and drop the Annotate Stream icon onto the transformation canvas.
- Open the Annotate Stream step by double-clicking the icon.
- Enter a name in the Step Name field.
- Select the Shared radio button, then click on the Add Annotation Group icon
- Enter a name for your annotation group and click Select Fields to begin creating annotations to populate the group.
- When you are done, click Apply.
There are two different options for saving your annotation group: locally or sharing it to the metastore for use by others.
Saving the Annotation Group Locally
If you want to keep your new annotation group only on your local machine, select the Local radio button and click Apply again.
If you later decide that you want to share the annotation group, you can re-open it and select the Shared radio button, then click Apply. The group will then be shared to the metastore and be available to other users.
Sharing the Annotation Group with Other Users
If you want to share your annotation group with other users, leave the Shared button selected, make sure that the new annotation group has a unique name, and click Apply. The group will then be available to other users for creating PDI jobs, by selecting from the Shared menu in the Annotate Stream step.
If you later decide that you don’t want to share the annotation group, you can re-open it and select Local, then click Apply. The group will be removed from the metastore and saved on your local machine for use.