Application Programming Interface Guide > Built-in Procedures > Procedures Reference > GetTableProfiles
 
GetTableProfiles
Retrieve statistical and data source lineage information about the specified set of published tables or views. Cardinality statistics must be enabled and gathered on the data source to enable gathering of profiling information. This procedure is present in “/services/databases/system/profile/GetTableProfiles”.
When a published resource has an underlying view, caching and cardinality statistics must be enabled and gathered before using the profile APIs. Enabling cardinality statistics at the data source level may not be sufficient in gathering profile information.
Inputs
database: The name of the published database to which the table belongs. Special character '*' can be used as a wildcard to denote any database.
This parameter is required. Specifying null will throw an error.
catalog: The name of the published catalog to which the table belongs. Special character '*' can be used as a wildcard to denote any/no catalog.
This parameter is optional (i.e. it may be set to NULL to denote no catalog).
schema: The name of the published schema to which the table belongs. Special character '*' can be used as a wildcard to denote any/no schema.
This parameter is optional (i.e. it may be set to NULL to denote no schema).
table: The name of the published table. Special character '*' can be used as a wildcard to denote any table.
This parameter is required. Specifying null will throw an error.
Outputs
A cursor whose rows encode table profiles, having the following columns:
database: The name of the published database to which the table belongs.
catalog: The name of the published catalog to which the table belongs. May be NULL.
schema: The name of the published schema to which the table belongs. May be NULL.
table: The name of the published table.
rowCount: The number of rows. NULL if unknown.
partitionColumn: The name of the column to be used to define partition queries against this table. NULL if unknown.
dataSourceType: The name and version of the data source this published table retrieves data from. Applicable only to published tables that serve SELECT * queries against them using pass-through requests that are fully executed within the underlying data source; otherwise, this value is set to NULL.
message: A message specifying any detected reason preventing the analysis of the specified table.
 
Exceptions:
 
An IllegalArgumentException is thrown when the specified resources cannot be found. An exception is also thrown when the user does not have the authorization to read the specified resource(s).