Data Explorer

Data Explorer
calac41
Data Explorer is a self-contained 
CA Live API Creator
 system component that is layered over API Creator. Data Explorer creates an executable and running multi-table user interface (UI) to your underlying data. You can test, prototype, perform back-office data maintenance, and view data for existing systems–regardless of their architecture–using Data Explorer. You can explore data, prepare use cases, and test your API. 
CA Live API Creator
 builds the UI from your schema, or if you are using the 
App First
 approach to creating APIs, you can create and manage your tables using Data Explorer, which creates your schema. 
To watch a video walk-through of Data Explorer, see Videos.
For more information about how to get started with creating and managing tables using Data Explorer, see Managed Data Server Administration.
In this article:
 
 
Data Explorer Key Services
Data Explorer provides the following key services:
  • Multi-table UI
     derived from your parent-child relationships, including:
    • List/form view. 
      You can view your information in the Main Grid and in the Form.
    • Master/detail presentation.
       View child objects for a parent (for example, products for category or orders of customer).
    • Drill-down navigation.
       View related data (for example, Orders for Product or SalesRep for Order).
    • Automatic joins.
       (For example, show product name, not product number.)
      For more information about automatic joins, see the "Automatic Joins" section.
  • Filtering on multiple fields.
     Includes paginated scrolling (subject to row/column security). 
    Fields represent the columns in your database. The term 
    field
     is used to stay within the metaphor of applications and screens, and not database terminology.
  • Row-sharing.
     You can send the current row in the Form to colleagues.
  • Formatting.
     For example, currency.
  • Update services:
    • Updatable grids.
       You can update your information in the Main Grid, in the Form, and in the Child Grid.
    • Lookups.
       You can relate a child to a parent (for example, 
      Company Name
       to 
      Product
       ). Data Explorer provides lookups by referencing relationships between entities.
      For more information about lookups, see the "Data Explorer is Schema Driven" section.
    • Logic and security enforcement.
       Reactive logic enforces your logic and security.
      For more information about how reactive logic and security work in Data Explorer, see Logic Demo.
  • Author Mode.
     Control which attributes are displayed, grouped, and formatted, and skinning.
    For more information about how to customize the appearance of behavior of your forms, see Author Mode.
Data Explorer as a Back-Office Interface
You can explore your data as business objects and view related data in Data Explorer as an alternative to using database tools such as DbVisualizer. Data Explorer uses HTML5, CSS, and JavaScript and runs well on desktops and mobile devices. You can use Data Explorer on any existing database.
Typical scenarios:
  • Back-office database maintenance applications
  • Schema exploration
  • Data administration
  • Prototyping
For new systems or new components, integration with reactive logic means that you have a solid back-office interface that enforces your business logic and security, working with REST-based mobile and web apps. Data Explorer provides an automated UI for the entities (tables or views) within the data source. In API Creator and Data Explorer, database tables and database views are collectively referred to as database entities. You can query, browse, and update data in the Main Grid and Form for back-office use.
For more information about the Data Explorer components, including the Main Grid and the Form, see the "Data Explorer Components" section.
Data Explorer is Schema Driven
Data Explorer implements a number of heuristics based on the relationships (the foreign keys) in your database. As you create child entities, a relationship between the child entity and the parent entity is created. This child entity is represented as a tab in the Child Grid. Data Explorer uses relationships for lookups and navigation. A foreign key, or lookup, is a column in a row referencing a parent table.
For more information:
Automatic Joins
Many databases employ primary keys, or surrogate keys. For example, the Demo API identifies a product by 
product_number
, instead of a name like 'hammer' or 'shovel'. These basic heuristics produce a usable result for child entities containing foreign keys to products, such as 
Lineitem
. It is not interesting to see a list of ten part-1'2, five part-2's, and so forth. You want to see the name of the parent row.
When you identify parents using a numeric key, Data Explorer selects the first text fields to be the 
UserKey
, a field likely to be a more recognizable name. You can reselect the keys when the heuristic makes the wrong choice. For these joins, you can select parent and view parent.
For more information about the Demo API, see Demo API Sample.
Start Data Explorer
You can start Data Explorer in API Creator in a new tab or as a stand-alone application.
Start Data Explorer from API Creator
In API Creator, in the Execute section, click 
Data Explorer
. Data Explorer opens in a new tab. The following image shows customers and orders from the Demo API in Data Explorer, open in a new tab:
  CA Technologies.png  
Start Data Explorer as a Stand-Alone Application
You can deploy Data Explorer to any server. Use the following URL:
http://<mylocalserver>/DataExplorer/index.html#/
The following image shows Data Explorer running on a simulated tablet:
  CA Technologies.png  
Data Explorer Components
Data Explorer comprises the following components:
  • The Main Grid:
     The Main Grid is a tabular list of searchable rows. Each row in the Main Grid represents a record in the database.
  • The Form:
     The Form is the scalar version of the selected row in the Main Grid. Each field represents a column in your database.
  • The Child Grid:
     The Child Grid includes tabs based on child relationships. The Form and the Child Grid are often called a Master/Detail form. Together, they are the children that are linked by way of relationships. These relationships are defined in the database (foreign key) or defined using API Creator.
By default, the Main Grid, the Form, and the Child Grid components are in view. You can choose to view your information in Data Explorer using a combination of these components. On the toolbar, click the windows/panel menu and select your preferred layout. The following image shows the Data Explorer components in its default layout:
  CA Technologies.png  
Access your Database Entities
You can access your database entities using the 
Entities
 drop-down that is in the Main Grid in Data Explorer. You can switch between entities. The following image shows this drop-down in Data Explorer:
  Screen Shot 2017-12-14 at 10.00.59 AM.png  
Call Functions on Tables from Data Explorer
You can call functions that are associated to tables in Data Explorer. The last function that you call is remembered in your Data Explorer session.
Prerequisites:
 
  • The function is a resource-oriented function. It is associated to the table on which you want to call your function.
    For more information about how to associate functions to tables, see Manage Functions.
  • You have permissions to call the function.
    For more information about how to set function-level permissions for roles, see Role-Based Endpoint Access.
  1. On the toolbar, select the entity on which you want to call your function from the 
    Entities
     drop-down. For example, Employee.
  2. In the Main Grid, select the row for which you want to call the function.
  3. In the Form, select the function from the functions drop-down. For example, giveRaise.
    The functions dialog appears. The following image shows this drop-down:
    functions_drop_down_de.png  
  4. If you have defined required parameters for the function, enter values for the required parameters and then click 
    Submit
    .
    The response displays in the dialog.
The function is called on the selected row in the table. If the function contains logic that updates the row, the table row is updated. The Form is updated.
Move or Scroll Through Information
You can scroll through information and move between fields and between rows using the arrow keys, the Tab key on the keyboard, or the mouse. When you click a field in the Main Grid, the field becomes active and the row is selected.
Update Information
You can update information in the Main Grid, in the Form, and in the Child Grid. For example, in the Main Grid, you can select fields within a row and can edit the value or you can delete a row.
If the field is a parent field (indicated by an up arrow), you update the information by double-clicking the field. Computed fields are read-only.
Save Changes to Rows and Delete Rows
You can save the changes that you make to fields and rows in the Main Grid or to the current row in the Form by clicking 
Save
 on the toolbar.
To delete a row:
  1. Select the row that you want to delete in the Main Grid.
  2. Mark the row for deletion (by selecting the row and clicking the 
    X
    ).
  3. Save your changes.
The row is deleted.
Revert your Changes
Revert changes before you save them by clicking 
Undo
 on the toolbar.
Create Rows
You can create rows in the Main Grid, in the Form, or in or in Child Grid. Click 
Insert
 on the toolbar pertaining to that Data Explorer component. 
Update Timestamp Fields for a Row 
You can update the year, month, day, and time for rows of data type 
timestamp
. You edit dates for a row in an entity in the Main Grid, Form, or Child Grid.
  1. Do one of the following:
    • To edit a timestamp field in the Main Grid, click the timestamp field for the row you want to update.
    • To edit a timestamp field in the Form, to the right of the timestamp field for the row you want to update, click the input action menu, and then select 
      Set Date Input
      .
      The following image shows this menu:
      Screen Shot 2017-12-14 at 12.19.34 PM.png  
    The Date window opens.
  2. Do one of the following:
    • Update the year, month, and day for the row, and then click 
      Set
      .
    • Set the date to today's date and time by clicking 
      Now
      , and then clicking 
      Set
      .
The changes to the date field for a row in the selected entity are saved.
Update Date Fields for a Row
You can update the year, month, and day for rows of data type 
date
 . Date fields are formatted in Coordinated Universal Time (UTC). You edit dates for a row in an entity in the Main Grid, Form, or Child Grid.
  1. Do one of the following:
    • To edit a date field in the Main Grid, click the date field for the row you want to update.
    • To edit a date field in the Form, to right right of the date field for the row you want to update, click the input action menu, and then select 
      Set Date Input
      .
    The Date window opens.
  2. Do one of the following:
    • Update the year, month, and day for the row, and then click 
      Set
      .
    • Set the date to today's date by clicking 
      Today
      , and then clicking 
      Set
      .
The changes to the date field for a row in the selected entity are saved. 
Filter the Main Grid
You can filter the fields in the Main Grid to narrow the records that are displayed.
  1. Click the filter field down arrow on the Main Grid toolbar.
    The filter window appears.
  2. Choose the field by which to filter.
  3. Enter the value by which to filter. If the field is numeric or float data type, you can use the less than (<), the greater than (>), the less than and equal to (=<), and the greater than and equal to (>=) operators. If the field is boolean data type, you can search by true (T) or field (F). You can filter by null and not-null field values by choosing the Is Null or Not Null option. 
  4. To search by an extra field, click the plus (+) symbol to filter by another field.
  5. Press the Enter key on your keyboard or click the Search icon.
The records in the Main Grid are filtered.
Return the Next Set of Rows
Return the next set of rows in the Main Grid or Child Grid by clicking 
Fetch More
 on the Main Grid toolbar. 
The number of rows that are returned to the Main Grid are controlled by pagination settings.
For more information about how to control the pagination settings, see API Properties.
Navigate to Related Information
You can navigate to related information using Data Explorer, such as moving from a customer and list of orders to an order with a list of items, or from an orders' item to the referenced product.
Navigation is based on foreign keys. If your database does not have defined foreign keys, you can add relationships.
For more information about how to add a relationship, see Manage Relationships.
View Results of REST API Calls
You can see how REST and system-defined filters work by viewing the REST Log. The REST Log shows you the results of all the REST API calls made to the API Server connected to this session.
You can switch between viewing the REST Log or the Main Grid. By default, the Main Grid is in view. On the toolbar, click the windows/panel menu and select 
REST Log
. The following image shows the switch options and the REST Log:
  CA Technologies.png  
Place Rows in the Form
You can place a row (for example, Order Details in the Child Grid) in the Form by selecting it and clicking 
Zoom
 on the Child Grid toolbar. You can place the parent (view parent) in the Form (for example, Product) by clicking the triangle in the Child Grid.
Select a Parent
You can open the dialog to select, or look up, a parent (select parent) by double-clicking the parent in the Child Grid (for example, the product name).
Move a Row as Focus Table in the Main Grid
Move a row in the Child Grid as the main focus table in the Main Grid by clicking 
Focus Table
 on the Child Grid toolbar. You can also view a table in the Main Grid by selecting the table from the 
Entities
 drop-down.
Return a Row in the Form to the Main Grid
You can return the scaler version of the row you have selected in the Main Grid back to the Form selection by clicking 
Back
 on the Form toolbar.
Move a Row in the Form
Move a selected row in the Form forward or backward by clicking 
Previous
 or 
Next
 on the Form toolbar.
View Relationships Between Databases
The following image shows customers and orders from the (same) Demo database:
  CA Technologies
The following image shows Customers and Orders from the Sample databases:
CA Technologies.png