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. 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 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.

These functions are applicable only to:

  • Flex tables
  • Associated keys tables
  • Associated views

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 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 either, or both, the keys table and the view.

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

In This Section