Get information about registered databases and tables

Prev Next

You can use remote query commands to get information about registered databases and tables. This information is needed to create ad-hoc queries.

You can use the core.listTables command to get details about each table in the system, including the names and types of the columns.

Example output

This output is from the core.listTables command run on the OrionAuditLog table.

Name: Audit Log Entries
Target: OrionAuditLog
Type: target
Database Type: 
Description: Retrieves information on changes and actions made by users of this server.
Columns: 
   Name      Type          Select? Condition? GroupBy? Order? Number? 
   --------- ------------- ------- ---------- -------- ------ ------- 
   AutoId    int           false   false      false    true   true
   UserId    int           false   false      false    true   true 
   UserName  string_lookup true    true       true     true   false 
   Priority  enum          true    true       true     true   false
   CmdName   string_lookup true    true       true     true   false 
   Message   string        true    true       false    true   false 
   Success   boolean       true    true       true     true   false
   StartTime timestamp     true    true       true     true   false 
   EndTime   timestamp     true    true       true     true   false 
Related Tables: 
   Name 
   ----
Foreign Keys: None

You can use the core.listTables command to list the columns, their types, whether the column can be used in the select, condition, group or order parameters, and whether the column is a number. The command also lists any registered related tables that can be joined with the joinTables parameter.

Get information on registered databases

You can use the core.listDatabases command to get details about each database in the system. This information can then be used to create ad-hoc queries.

In general, when issuing queries against targets that are not part of the default schema, prepend the database name to the target. For example, to reference an "OutsidePolicy" target that is part of an "Outsider" database, you would use the identifier "target=Outsider.OutsidePolicy".