Adapter for Apache HBase 9.8 | webMethods Adapter for Apache HBase Documentation | webMethods Adapter for Apache HBase Installation and User’s Documentation | Adapter Services | Configuring Retrieve Operation Service
 
Configuring Retrieve Operation Service
Use the Retrieve Operation template to configure an adapter service that retrieves selected fields from the records of a HBase table. This service can either retrieve all the records from the selected table or retrieve any required records based on the filters provided. For more information about adapter services, see Using Adapter Services.
Warning:
This service may get deprecated in future. Any feature or enhancement request for this service will not be considered. Usage of Retrieve service with comparator is recommended.
Be sure to review the section Before Configuring or Managing Adapter Services, before you configure adapter services.
*To configure an adapter service using the Retrieve Operation template
1. In Designer, right-click the package in which the service should be contained and select New > Adapter Service.
2. Select the parent namespace, type a name for the adapter service, and click Next.
3. Select Adapter for Apache HBase as the adapter type and click Next.
4. Select the appropriate Adapter Connection Name and click Next.
5. From the list of available templates, select the Retrieve Operation template and click Finish.
The adapter service editor for the selected adapter service appears. You can select the Adapter Settings tab at any time to confirm adapter service properties such as the Adapter Name , Adapter Connection Name, and Adapter Service Template as necessary.
6. Select the Schema tab to configure the database table, using the following fields:
Field
Field Description/Action
HBase Table
Select a table name from the list of tables.
Column Family
Displays the list of column families for the selected table name.
Select
Select the check box for the corresponding column family to query.
Maximum Version
Specify the maximum number of versioned values for a corresponding column family.
Sampling Range
Specify the number of records to be scanned to get a minimum set of column qualifiers. These column qualifiers are listed in the Columns tab.
Value can be entered in the following formats:
*Input value can be an integer and it should be greater than 0.
For example, if you provide Sampling Range: 10, then the service will scan initial 10 records of the selected table.
*Input value can be the range between two row ids separated by hyphen (-). The start row id and the end row id should be valid row ids, present in the selected table. The start Row Id should be lexicographically smaller than the end Row Id.
For example, if you provide Sampling Range: row100-row1000, then the service will scan all the records which contain row ids between row100 to row1000
Note:
Sampling is not performed for the values which do not contain the above formats, and the list of column qualifiers under Columns tab will remain empty.
Versions
Specify the number of versions for the selected table, to retrieve more than one value for a particular column qualifier. The default value is 1. Use the default value to get the latest value of the column qualifiers.
Note:
Minimum value of version should be 1, to get a valid output.
Output Structure
Select either of the following Output Structure:
*By Column Family
*By Row Id
Note:
If you do not make an entry for a column qualifier in Columns tab, then the Output Structure of the table remains the same, and returns the complete list of Row Ids of the selected table.
7. Use the Columns tab to define the column qualifiers using the following fields:
a. Use the icon to create a new row as needed. You can use the icon to fill in all column families to the table.
Use the following fields:
Field
Description/Action
Column Family
Provides the list of column families based on the selection made in the Schema tab.
Select Column Qualifier
Select the column qualifier which can be retrieved for the corresponding column family.
The Select Column Qualifier field is displayed as a drop down list. These values are retrieved based on the Sampling Range provided in the Schema tab.
Column Qualifier Type
The Select Column Qualifier field supports the following data types:
*java.lang.String
*byte array
*java.lang.Object
Enter Column Qualifier
Specify the column qualifiers which are not listed in the Select Column Qualifier field.
Note:
If you change the values of Table Name and Column Family of Schema tab then, the following fields for Columns tab changes:
*The values of Column Family and Select Column Qualifier changes automatically.
*The Column Family changes automatically, but you need to manually change the values of Enter Column Qualifier.
Note:
You must select an appropriate data type for the Column Qualifiers, based on the data type being inserted.
8. Use the WHERE tab to specify the conditions for retrieving records:
a. Select the icon to define new WHERE clause fields.
b. Select a logical operator from the AND/OR field, an Operator as needed, and specify values for the following fields:
Name
Description/Action
AND/OR
Input Field.
Parameter Key
Defines a unique key.
Rows in both tables in the WHERE clause will be inter dependent if it contains same parameter key.
For example, if you delete a row having parameter key as 1, then it automatically deletes the row having the same parameter key from the other table.
Note:
By default, the number of unique keys are between1 to 25. To increase the number of unique keys, set the watt property as, watt.hbase.filters.limit =30.
Filters
Displays the list of different filters. Different types of filters are listed below:
*Row Id- To retrieve records based on Row Id.
*Row Id Prefix- To retrieve records based on Prefix of the Row Id.
Note:
Row Id Prefix works only with EQUAL operator.
*Timestamp- To retrieve records based on Timestamp, where Timestamp is the time when the record is inserted. You can enter a comma separated multiple Timestamps. Do not enter white space characters after a comma.
Note:
Timestamp filter works only with EQUAL operator.
*Value- To retrieve all the records, which consist of entered value of any column qualifier.
Note:
If you select the number of versions to be retrieved as 1, then the latest version for the row matching the value filter is retrieved even if the data passed in Value filter appears in any other version in the same row.
*Column Qualifier based filters - Lists all the column qualifiers from the Columns tab.
Note:
The Value and Column Qualifier based filters supports the following data types:
*java.lang.String
*byte array
*java.lang.Object
Operator
The following are the operators used:
*=
*<
*>
*<=
*>=
*IN
*CONTAINS
*CONTAINS KEY
Input Field Type
The data type of the Input Field. You can change this type if needed.
Input Field
The default value is ?, which acts as a placeholder for the variable so that you can set the input variable for that column at run time, or get input external to this adapter service. You can also type a fixed value in this field now or at run time. If you type a fixed value, be sure that it is valid, or an exception will be generated at run time.
The adapter automatically generates values for the following fields:
Field
Description/Action
Parameter Key
The unique key for those rows in the above table which takes input at runtime.
Filters(second occurrence of this field)
The name of the column you need to use in the WHERE clause.
Input Field type
The corresponding data type of an Input Field.
Input Field(second oc-currence of this field)
The name of the input field. By default the name combines the values of Parameter and Field fields. However, you can also choose to specify any custom value.
c. If necessary, use the or icons to change the order of the WHERE clause to ensure the parameters are parsed in the correct order.
d. Repeat this procedure until you have specified all WHERE parameters.
Note:
If u do not pass any input values or if you explicitly pass the value as a NULL character, then the corresponding filters are skipped.
Note:
You must select an appropriate data type for the Column Qualifier filters and Value filters, based on the data type being inserted.
9. To verify input or output information for the service, use the Input/Output tab as required.
10. From the File menu, select Save.