cPlan Metadata Samples
Spectre has a metadata input tag which can be used to retrieve information about a data source:
metadata {
cbase-input "Accounts.cbase"
}
There is an optional type tag that allows you to fetch defined properties. These types are:
calcs, dimensions,
You can retrieve the basic metadata from a cBase with the following Dive. If a type is not included, the default is calcs.
dive {
cplan {
metadata {
cbase-input "/cbases/014-simple-build_productlookup.cbase"
}
}
detail-window {
all-cbase-columns
}
}
Sample metadata calcs results:
With this Dive:
dive {
cplan {
metadata type="dimensions" {
cbase-input "/cbases/014-simple-build_productlookup.cbase"
}
}
detail-window {
all-cbase-columns
}
}
The Dive window with the metadata for dimensions is as follows:
Using a multilevel cPlan:
dive {
cplan {
metadata type="inputs" {
cplan {
multilevel {
cbase-input "/cbases/002_concat.cbase" name="First"
cbase-input "/cbases/012-simple-build_sales.cbase" name="Second"
}
}
}
}
detail-window {
all-cbase-columns
}
}
With type inputs, the metadata in the dive window is limited to the following.