Flex Data Functions Reference

The flex table data helper functions supply information you need to query the data you load. For example, suppose you don't know what keys are available in the map data. If not, you can use the COMPUTE_FLEXTABLE_KEYS_AND_BUILD_VIEW function to populate a keys table and build a view. The functions aid in querying flex table and other VMap data.

Function Description

COMPUTE_FLEXTABLE_KEYS

Computes map keys from the map data in a flextable_data table, and populates the flextable_data_keys table with the computed keys. Use this function before building a view.

BUILD_FLEXTABLE_VIEW

Uses the keys in the flextable_data_keys table to create a view definition (flextable_data_view ) for the flextable_data 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 default number of columns (50) or more or less, if specified.

RESTORE_FLEXTABLE_DEFAULT_KEYS_TABLE_AND_VIEW

Replaces the flextable_data_keys table and the flextable_data_view, linking both the keys table and the view to the parent flex table.

While the functions are available to all users, they are applicable only to:

By computing keys and creating views from flex table data, the functions allow you to perform SELECT queries. One function restores the original keys table and view that you specified when you first created the flex table.

Flex Table Dependencies

Each flex table (flextable) has two dependent objects:

While both objects are dependent on their parent table, (flextable), 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 you 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 either, or both, the _keys table and the _view.

The remaining helper functions perform the tasks described in this section.