Creating a Reference Table Query

Create a reference in an SAP Sybase ESP Studio project that queries a table in an external database.

  1. In the SAP Sybase ESP Authoring view - in the Palette under Streams and Windows - select Reference ().
  2. Select a location in the diagram and click to add the shape.
  3. Provide a name for the Reference ().
  4. Click on Schema Discovery ().
    Studio displays the Schema Discovery dialog box. The service field is populated with the name of the first service defined in the service.xml file that includes a <Parameter Name="DbType">hana</Parameter> entry.
  5. In the service field,
    • Leave the specified service name, to use it when connecting to the external database.
    • Replace the specified service with another service. Note that this service must be defined in the service.xml file.
    • Click on Discover and select from the list of services displayed.
  6. In the Source Schema field,
    • Enter the name of the schema for the external database containing the table the reference will query.
    • Click on Discover and select from the list of schemas displayed.
  7. In the Source field,
    • Enter the name of the table the reference will query.
    • Click on Discover and select from the list of tables displayed.
  8. Select the Discover Primary Keys checkbox to define primary keys in the reference matching those in the external database table. This is optional, but highly recommended to provide maximum flexibility when using the reference.
  9. Click OK.
    By default, ESP builds the reference schema based on the schema of the external database table. Once the reference schema has been built, you can remove a column by right-clicking anywhere on the column and choosing delete element. Edit the column properties within the reference shape by double-clicking on the property names or edit them in the Properties view. The datatypes in the source schema for the reference must be compatible with those found in the external database table the reference queries.
    You can create a reference within a module; a reference created outside of a module cannot be used in a module. See Creating a Module and Editing a Module.