MetaData
The MetaData() function retrieves information about data stored in the Quintessence database.
Syntax:
- In Excel with Quintessence addin versions prior to 25.1, use:
MetaData() - In the Quintessence Editor (Studio) using Quintessence language, use:
MetaData() - In the Quintessence Editor (Studio) using Python language, use:
Qx.MetaData()
ⓘ See parameter descriptions
| Type | The type of data to query. |
| Parameter | This parameter limits the output to the specified type of data being queried. |
| View | Defines how the data should be displayed. Options include: • none return default columns without headers• DataView():headers return columns with or without headersSee more on DataView. |
The following is a complete list of Type and Parameter options available for MetaData(). Null refers to leaving the Parameter field blank.
| Type | Parameter | Description |
TimeSeries | Null | Retrieve all TimeSeries |
TimeSeries | Entity | Retrieve all TimeSeries maintained for an entity |
TSVD | Null | Retrieve all TSVDs |
TSVD | TimeSeries | Retrieve all TSVDs maintained for a TimeSeries |
Entity TSVD | TimeSeries | Retrieve Entity TSVDs information |
Relationship | Null | Retrieve all Relationships |
Reports | Null | Retrieve the names of all reports |
Qualitativesets | Null | Retrieve a list of all Qualitative (Enum) sets |
Qualities | QualitativeSet | Retrieve a list of all the Qualities in a Qualitative Set |
Currency | Null | Retrieve a list of all currencies |
Exchange | Null | Retrieve a list of all exchanges |
Country | Null | Retrieve a list of all countries |
Author | Null | Retrieve a list of all authors |
Users | Null | Retrieve the names of all users |
Remarks:
- Unless changed by an administrator, the default parameters are:
- View:
none.
- View:
- When using
DataViewfor the View parameter, we recommend usingDataView(*):columnto display all columns with headers initially, then replace*with the specific columns you need. Unlike other functions, the columns returned byMetaData()vary depending on the Type specified.
Examples:
The examples provided below are based on fictitious data for illustrative purposes only.
> Example 1: Determine entities sharing the same TimeSeries as StockEntity1.
First, we can determine which TimeSeries are used by StockEntity1.
=Qx.MetaData("TimeSeries", "StockEntity1", "dataview(Name)")| Name |
| Price |
Now, we can use this output to identify which other entities also use Name and Price. When using MetaData(), we may receive repeated entity codes due to different TSVDs. To ensure we retrieve a distinct list, we apply the Unique() function.
=Qx.Unique(Qx.MetaData("Entity TSVD", "Name, Price", "dataview(Entity)"))| StockEntity1 |
| StockEntity6 |
| StockEntity8 |
For some Parameter options, you can pass in an array. In this example, passing an array allows the logic to be written as a single line.
=Qx.Unique(Qx.MetaData("Entity TSVD", Qx.MetaData("TimeSeries", " StockEntity1", "dataview(Name)"), "dataview(Entity)"))> Example 2: Retrieve a list of all authors who are not used in any TSVDs.
First, we retrieve all authors in Quintessence (for example, storing the result in a variable called get_authors).
=Qx.MetaData("Author",, "dataview(Code)")| AuthorUser1 |
| AuthorUser2 |
| AuthorUser3 |
Next, we retrieve all authors used in TSVDs. When using MetaData(), we may receive repeated entity codes due to different TSVDs. To ensure we obtain a distinct list, we use the Unique() function (storing the result in a variable called get_tsvd_authors).
=Qx.Unique(Qx.MetaData("TSVD",, "dataview(Author)"))| NA |
| AuthorUser2 |
With this information, we can now identify authors who are not included in any TSVDs by using the SetDifference() function.
=Qx.SetDifference(get_authors, get_tsvd_authors)| AuthorUser1 |
| AuthorUser3 |
This result can also be achieved using the following one-liner.
=Qx.SetDifference(Qx.MetaData("Author",, "dataview(Code)"), Qx.Unique(Qx.MetaData("TSVD",, "dataview(Author)")))> Example 3: Find all sources used in Local Data Warehouse TSVDs.
Note: The Local Data Warehouse is also referred to as Simple Sources or the Q Database.
To achieve this, follow these steps:
- Retrieve all sources and their data locations.
- Use the FilterData() function to identify which TSVDs originate from the Local Data Warehouse.
- When using
MetaData(), you may receive repeated entity codes due to different TSVDs. To ensure a distinct list, apply the Unique() function.
=Qx.Unique(Qx.FilterData(Qx.MetaData("TSVD",, "dataview(*):both"), "[Type] = 'Local Data Warehouse'", "[Source]"))| Source |
| MarketDataProvider1 |
| MarketDataProvider2 |
