Defining contracts/interfaces

Defining contracts/interfaces

In Denodo an interface is a special type of view that consist only of a definition of fields and its data types. The most common usage is to do a top-down design where you first define the fields and later, you can associate the “implementation” of the interface.

How to create a new interface

You can follow these steps to create an interface view:

  1. Create a new folder called '2 - data services'.
  2. Right-click on this new folder and select "New > Interface" (or press Ctrl + Alt+ N).
  3. The Tool will open the “Interface view” dialog. This dialog has three tabs, but in this section you are going to use only the first one (Definition) to define your final view.
  4. Change the name of the interface view to: i_client_info.
  5. Manage the name and type of the fields of the interface. To add a new field to the interface, click on New field button. In the box beside the name of the field, you can select the type of the field. Try creating the following structure:
    • client_id: text
    • full_name: text
    • client_type: text
    • full_address: text
    • phone: text
    • billing_due_date: date
    • balance: decimal

    To delete a field from the interface, select the check box beside the type of the field and click on Remove selected.

  6. Finally, you will se a dialog warning about there is not an implementation for this interface. Don't worry you will add it later in this tutorial.

  7. Press "Ok" twice to create the implementation view.

By default, you can add fields with basic data types (int, float, text, etc.). If you want to select a compound field, select the Enable compound types check box.


Go to the next section. There you will learn how to create Data Services using this interface.