Flex table data functions
The flex table data helper functions supply information you need to directly query data in flex tables. After you compute keys and create views from the raw data, you can use field names directly in queries instead of using map functions to extract data.
In addition to these data meta-functions, there are flex functions that are not meta-functions.
Function | Description |
---|---|
COMPUTE_FLEXTABLE_KEYS | Computes map keys from the map data in a flex table and populates a keys table with the results. Use this function before building a view. |
BUILD_FLEXTABLE_VIEW | Uses the keys in a table to create a view definition for the source table. Use this function after computing flex table keys. |
COMPUTE_FLEXTABLE_KEYS_AND_BUILD_VIEW | Performs both of the preceding functions in one call. |
MATERIALIZE_FLEXTABLE_COLUMNS | Materializes a specified number of columns. |
RESTORE_FLEXTABLE_DEFAULT_KEYS_TABLE_AND_VIEW |
Replaces the flextable_data_keys table and the flextable_data_view view, linking both the keys table and the view to the parent flex table. |
Flex table dependencies
Each flex table has two dependent objects, a keys table and a view. While both objects are dependent on their parent table, you can drop either object independently. Dropping the parent table removes both dependents, without a CASCADE option.
Associating flex tables and views
The helper functions automatically use the dependent table and view if they are internally linked with the parent table. You create both when you create the flex table. You can drop either the keys table or the view and re-create objects of the same name. However, if you do so, the new objects are not internally linked with the parent flex table.
In this case, you can restore the internal links of these objects to the parent table. To do so, drop the keys table and the view before calling the RESTORE_FLEXTABLE_DEFAULT_KEYS_TABLE_AND_VIEW function. Calling this function re-creates the keys table and view.
The remaining helper functions perform the tasks described in this section.