Resource Types
Each URL generated by Data Discovery points to a database resource which may return multiple or single records. The different types of resources supported are described below.
List of Objects
This resource type returns all available columns and relationships for a table as a list of objects.
For tables or views that have a primary key, that field is used to generate a unique URL pointing to that specific record. In the GUI, the primary key value in a list of records is a link to the individual record.
If table or view does not have a primary key, no unique URL for the individual record is available, but records can still be filtered.
Usage:
/[table_name]
URL and GUI for table with a primary key:
URL and GUI for table without a primary key:
/Northwind/Products_by_Category.html
Single Object
This resource type returns all available columns and relationships for a single record in a table. These URLs are only available for records with primary keys.
A single record is returned as an object by default. You can force a single record to be displayed as a list of objects by using the wantarray modifier.
Usage:
/[table_name]/[primary_key]
URL and GUI for a Single Object:
/Invoice/InvoiceId/1.html - get Invoice record with primary key InvoiceId = 1
Arrays
This resource type returns specific columns in a table as a list of objects. Append a comma-separated list of column names to a resource URL to specify the columns you want to retrieve.
Usage:
/[table_name]/[column_A],[column_B]
URL and GUI for an Array:
/db/Chinook/Invoice/InvoiceDate,BillingCountry.html - get InvoiceDate and BillingCountry columns in Invoice
Vector
This resource type returns a single column in a table as a list.
Usage:
/[table_name]/[column_name]
URL and GUI for a Vector:
/db/Chinook/Genre/Name.html - get Name column in Genre records
Scalar
This resource type returns a single value from a record in a table.
Usage:
/[table_name]/[pk_column]/[pk_value]/[column_name]
URL and GUI for a Scalar: