Managing OData Metadata

How to:

Create Synonym for the Adapter for OData creates the metadata used for WebFOCUS reporting against data returned from the REST API calls.

Procedure: How to Create Metadata for the Adapter for OData

To create a synonym, you must have previously configured the adapter.

  1. From the Web Console sidebar, click Connect to Data.

    The Connect to Data page opens.

  2. On the Configured list, right-click a connection for the configured adapter and click Show DBMS Objects.

    The Create Synonym for OData pane opens, as shown in the following image.

  3. Select a Meta data type, either ENTITY or FUNCTION.
  4. Enter a specific application in the Application field, or click the ellipsis button to the right of the field to select an application in which to store the metadata.
    1. Select the Validate check box if you wish to convert all special characters to underscores and perform a name check to prevent the use of reserved names. (This is accomplished by adding numbers to the names.)

      This parameter ensures that names adhere to specifications. For more information, see Validation for Special Characters and Reserved Words. When the Validate option is unchecked, only the following characters are converted to underscores: '-'; ' '; ' \'; '/'; ','; '$'. No checking is performed for names.

    2. Select the Make unique check box if you wish to set the scope for field and group names to the entire synonym. This ensures that no duplicate names are used, even in different segments of the synonym. When this option is unchecked, the scope is the segment.
    3. Click Customize data type mappings to select whether to decompose date formats, assign geographic roles automatically, set the date order, and select the data type mappings for numeric decimal and alphanumeric columns.
  5. Select the check boxes next to the entities or functions for which you want to create metadata.

    You can change the name of the synonym to be created by typing over the default synonym name.

  6. When you have made your selections, click the highlighted Create Synonym button on the ribbon.

The metadata is created and added under the specified application directory.

Example: Sample Synonym

The following is the generated Master File for the CustomerDemographics entity. The suffix value is ODATAV4:

FILENAME=M6ILO, SUFFIX=ODATAV4 , $
  SEGMENT=CUSTOMERDEMOGRAPHICS, SEGTYPE=S0, $
    FIELDNAME=CUSTOMERDEMOGRAPHICS, ALIAS=value, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL), $
    FIELDNAME=CUSTOMERTYPEID, ALIAS=CustomerTypeID, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERDEMOGRAPHICS, $
    FIELDNAME=CUSTOMERDESC, ALIAS=CustomerDesc, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERDEMOGRAPHICS, $
  SEGMENT=CUSTOMERS, SEGTYPE=S0, PARENT=CUSTOMERDEMOGRAPHICS, $
    FIELDNAME=CUSTOMERS, ALIAS=Customers, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=CUSTOMERDEMOGRAPHICS, $
    FIELDNAME=CUSTOMERID, ALIAS=CustomerID, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=COMPANYNAME, ALIAS=CompanyName, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=CONTACTNAME, ALIAS=ContactName, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=CONTACTTITLE, ALIAS=ContactTitle, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=ADDRESS, ALIAS=Address, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=CITY, ALIAS=City, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=REGION, ALIAS=Region, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=POSTALCODE, ALIAS=PostalCode, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=COUNTRY, ALIAS=Country, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=PHONE, ALIAS=Phone, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $
    FIELDNAME=FAX, ALIAS=Fax, USAGE=A30, ACTUAL=A30,
      MISSING=ON,
      REFERENCE=CUSTOMERS, $

The following is the generated Access File for the CustomerDemographics entity:

SEGNAME=CUSTOMERDEMOGRAPHICS, 
  CONNECTION=CON01, 
  TABLENAME=CustomerDemographics, 
  OBJECT_URL=CUSTOMERTYPEID, 
  EXTCALL=YES, $
 FIELD=CUSTOMERTYPEID, 
    TYPE=ID, 
    IN_URL=TRUE, $
SEGNAME=CUSTOMERS, 
  OBJECT_URL=CUSTOMERID, 
  EXTCALL=NO, $
 FOREIGN_KEY=Customers, 
   PRIMARY_KEY_TABLE=Customer, 
   FOREIGN_KEY_COLUMN=CustomerID, 
   PRIMARY_KEY_COLUMN=CustomerID, $
 FIELD=CUSTOMERID, 
    TYPE=ID, 
    IN_URL=TRUE, $

WebFOCUS

Feedback