<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Flex functions</title>
    <link>/en/sql-reference/functions/flex-functions/</link>
    <description>Recent content in Flex functions on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/functions/flex-functions/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: Flex data functions</title>
      <link>/en/sql-reference/functions/flex-functions/flex-data-functions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/flex-functions/flex-data-functions/</guid>
      <description>
        
        
        &lt;p&gt;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. The fata functions are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/flex-functions/flex-data-functions/compute-flextable-keys/#&#34;&gt;COMPUTE_FLEXTABLE_KEYS&lt;/a&gt;: 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.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/flex-functions/flex-data-functions/build-flextable-view/#&#34;&gt;BUILD_FLEXTABLE_VIEW&lt;/a&gt;: Uses the keys in a table to create a view definition for the source table. Use this function after computing flex table keys.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/flex-functions/flex-data-functions/compute-flextable-keys-and-build-view/#&#34;&gt;COMPUTE_FLEXTABLE_KEYS_AND_BUILD_VIEW&lt;/a&gt;: Performs both of the preceding functions in one call.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/flex-functions/flex-data-functions/materialize-flextable-columns/#&#34;&gt;MATERIALIZE_FLEXTABLE_COLUMNS&lt;/a&gt;: Materializes a specified number of columns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/flex-functions/flex-data-functions/restore-flextable-default-keys-table-and-view/#&#34;&gt;RESTORE_FLEXTABLE_DEFAULT_KEYS_TABLE_AND_VIEW&lt;/a&gt;: Replaces the &lt;code&gt;flextable_data_keys&lt;/code&gt; table and the &lt;code&gt;flextable_data_view&lt;/code&gt; view, linking both the keys table and the view to the parent flex table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;flex-table-dependencies&#34;&gt;Flex table dependencies&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id=&#34;associating-flex-tables-and-views&#34;&gt;Associating flex tables and views&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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 &lt;a href=&#34;../../../../en/sql-reference/functions/flex-functions/flex-data-functions/restore-flextable-default-keys-table-and-view/#&#34;&gt;RESTORE_FLEXTABLE_DEFAULT_KEYS_TABLE_AND_VIEW&lt;/a&gt; function. Calling this function re-creates the keys table and view.&lt;/p&gt;
&lt;p&gt;The remaining helper functions perform the tasks described in this section.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Flex extractor functions</title>
      <link>/en/sql-reference/functions/flex-functions/flex-extractor-functions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/flex-functions/flex-extractor-functions/</guid>
      <description>
        
        
        &lt;p&gt;The flex extractor scalar functions process polystructured data. Each function accepts input data that is any of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Existing database content&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A table&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Returned from an expression&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Entered directly&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These functions do not parse data from an external file source. All functions return a single VMap value. The extractor functions can return data with NULL-specified columns.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Flex map functions</title>
      <link>/en/sql-reference/functions/flex-functions/flex-map-functions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/flex-functions/flex-map-functions/</guid>
      <description>
        
        
        &lt;p&gt;The flex map functions let you extract and manipulate nested map data.&lt;/p&gt;
&lt;p&gt;The first argument of all flex map functions (except &lt;span class=&#34;sql&#34;&gt;EMPTYMAP&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;MAPAGGREGATE&lt;/span&gt;) takes a VMap. The VMap can originate from the &lt;code&gt;__raw__&lt;/code&gt; column in a flex table or be returned from a map or extraction function.&lt;/p&gt;
&lt;p&gt;All map functions (except &lt;span class=&#34;sql&#34;&gt;EMPTYMAP&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;MAPAGGREGATE&lt;/span&gt;) accept either a &lt;span class=&#34;sql&#34;&gt;LONG VARBINARY&lt;/span&gt; or a &lt;span class=&#34;sql&#34;&gt;LONG VARCHAR&lt;/span&gt; map argument.&lt;/p&gt;
&lt;p&gt;In the following example, the outer &lt;span class=&#34;sql&#34;&gt;MAPLOOKUP&lt;/span&gt; function operates on the VMap data returned from the inner &lt;span class=&#34;sql&#34;&gt;MAPLOOKUP&lt;/span&gt; function:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; MAPLOOKUP(MAPLOOKUP(ret_map, &amp;#39;batch&amp;#39;), &amp;#39;scripts&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can use flex map functions exclusively with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Flex tables&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Their associated &lt;code&gt;_keys&lt;/code&gt; tables and &lt;code&gt;_view&lt;/code&gt; views&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flexible complex-type columns&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
