<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – C&#43;&#43; SDK</title>
    <link>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/</link>
    <description>Recent content in C&#43;&#43; SDK on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Extending: Setting up the C&#43;&#43; SDK</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/setting-up-cpp-sdk/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/setting-up-cpp-sdk/</guid>
      <description>
        
        
        &lt;p&gt;The OpenText™ Analytics Database C++ Software Development Kit (SDK) is distributed as part of the server installation. It contains the source and header files you need to create your UDx library. For examples that you can compile and run, see &lt;a href=&#34;../../../../../en/extending/developing-udxs/developing-with-sdk/downloading-and-running-udx-example-code/#&#34;&gt;Downloading and running UDx example code&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;p&gt;At a minimum, install the following on your development machine:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;gcc&lt;/code&gt; version 8 or higher. OpenText™ Analytics Database has not tested UDx builds with versions higher than 9.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://man7.org/linux/man-pages/man1/g++.1.html&#34;&gt;g++&lt;/a&gt; and its associated toolchain, such as &lt;code&gt;ld&lt;/code&gt;. Some Linux distributions package &lt;code&gt;g++&lt;/code&gt; separately from &lt;code&gt;gcc&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A copy of the OpenText™ Analytics Database SDK.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The database binaries are compiled using the default version of &lt;code&gt;g++&lt;/code&gt; installed on the supported Linux platforms.

&lt;/div&gt;
&lt;p&gt;You must compile with a &lt;code&gt;std&lt;/code&gt; flag value of &lt;code&gt;c++11&lt;/code&gt; or later.&lt;/p&gt;
&lt;p&gt;The following optional software packages can simplify development:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;make&lt;/code&gt;, or some other build-management tool.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;gdb&lt;/code&gt;, or some other debugger.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Valgrind, or similar tools that detect memory leaks.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you want to use any third-party libraries, such as statistical analysis libraries, you need to install them on your development machine. If you do not statically link these libraries into your UDx library, you must install them on every node in the cluster. See &lt;a href=&#34;../../../../../en/extending/developing-udxs/developing-with-sdk/cpp-sdk/compiling-your-cpp-library/#&#34;&gt;Compiling your C&amp;#43;&amp;#43; library&lt;/a&gt; for details.&lt;/p&gt;
&lt;h2 id=&#34;sdk-files&#34;&gt;SDK files&lt;/h2&gt;
&lt;p&gt;The SDK files are located in the sdk subdirectory under the root database server directory (usually, 
&lt;code&gt;/opt/vertica/sdk&lt;/code&gt;). This directory contains a subdirectory, &lt;code&gt;include&lt;/code&gt;, which contains the headers and source files needed to compile UDx libraries.&lt;/p&gt;
&lt;p&gt;There are two files in the include directory you need when compiling your UDx:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Vertica.h&lt;/code&gt; is the main header file for the SDK. Your UDx code needs to include this file in order to find the SDK&#39;s definitions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Vertica.cpp&lt;/code&gt; contains support code that needs to be compiled into the UDx library.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Much of the database SDK API is defined in the &lt;code&gt;VerticaUDx.h&lt;/code&gt; header file (which is included by the &lt;code&gt;Vertica.h&lt;/code&gt; file). If you&#39;re curious, you might want to review the contents of this file in addition to reading the API documentation.&lt;/p&gt;
&lt;h2 id=&#34;finding-the-current-sdk-version&#34;&gt;Finding the current SDK version&lt;/h2&gt;
&lt;p&gt;You must develop your UDx using the same SDK version as the database in which you plan to use it. To display the SDK version currently installed on your system, run the following command in vsql:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT sdk_version();
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;running-the-examples&#34;&gt;Running the examples&lt;/h2&gt;
&lt;p&gt;You can download the examples from the GitHub repository (see &lt;a href=&#34;../../../../../en/extending/developing-udxs/developing-with-sdk/downloading-and-running-udx-example-code/#&#34;&gt;Downloading and running UDx example code&lt;/a&gt;). Compiling and running the examples helps you to ensure that your development environment is properly set up.&lt;/p&gt;
&lt;p&gt;To compile all of the examples, including the Java examples, issue the following command in the &lt;code&gt;Java-and-C++&lt;/code&gt; directory under the examples directory:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ make
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

To compile the examples, you must have a g++ development environment installed. To install a g++ development environment on Red Hat systems, run &lt;code&gt;yum install gcc gcc-c++ make.&lt;/code&gt;

&lt;/div&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: Compiling your C&#43;&#43; library</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/compiling-your-cpp-library/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/compiling-your-cpp-library/</guid>
      <description>
        
        
        &lt;p&gt;GNU g++ is the only supported compiler for compiling UDx libraries. Always compile your UDx code on the same version of Linux that you use on your OpenText™ Analytics Database cluster.&lt;/p&gt;
&lt;p&gt;When compiling your library, you must always:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Compile with a &lt;code&gt;-std&lt;/code&gt; flag value of &lt;code&gt;c++11&lt;/code&gt; or later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pass the &lt;code&gt;-shared&lt;/code&gt; and &lt;code&gt;-fPIC&lt;/code&gt; flags to the linker. The simplest method is to just pass these flags to g++ when you compile and link your library.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the &lt;code&gt;-Wno-unused-value&lt;/code&gt; flag to suppress warnings when macro arguments are not used. If you do not use this flag, you may get &amp;quot;left-hand operand of comma has no effect&amp;quot; warnings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Compile &lt;code&gt;sdk/include/Vertica.cpp&lt;/code&gt; and link it into your library. This file contains support routines that help your UDx communicate with the database. The easiest way to do this is to include it in the g++ command to compile your library. The database supplies this file as C++ source rather than a library to limit library compatibility issues.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the OpenText™ Analytics Database SDK include directory in the include search path using the g++ &lt;code&gt;-I&lt;/code&gt; flag.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The SDK examples include a working makefile. See &lt;a href=&#34;../../../../../en/extending/developing-udxs/developing-with-sdk/downloading-and-running-udx-example-code/#&#34;&gt;Downloading and running UDx example code&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;example-of-compiling-a-udx&#34;&gt;Example of compiling a UDx&lt;/h2&gt;
&lt;p&gt;The following command compiles a UDx contained in a single source file named &lt;code&gt;MyUDx.cpp&lt;/code&gt; into a shared library named &lt;code&gt;MyUDx.so&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;g++ -I /opt/vertica/sdk/include -Wall -shared -Wno-unused-value \
      -fPIC -o MyUDx.so MyUDx.cpp /opt/vertica/sdk/include/Vertica.cpp
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
The database only supports UDx development on 64-bit architectures.
&lt;/div&gt;
&lt;p&gt;After you debug your UDx, you are ready to deploy it. Recompile your UDx using the &lt;code&gt;-O3&lt;/code&gt; flag to enable compiler optimization.&lt;/p&gt;
&lt;p&gt;You can add additional source files to your library by adding them to the command line. You can also compile them separately and then link them together.

&lt;div class=&#34;alert admonition tip&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Tip&lt;/h4&gt;

The examples subdirectory in the Vertica SDK directory contains a make file that you can use as starting point for your own UDx project.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;handling-external-libraries&#34;&gt;Handling external libraries&lt;/h2&gt;
&lt;p&gt;You must link your UDx library to any supporting libraries that your UDx code relies on.These libraries might be either ones you developed or others provided by third parties. You have two options for linking:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Statically link the support libraries into your UDx. The benefit of this method is that your UDx library does not rely on external files. Having a single UDx library file simplifies deployment because you just transfer a single file to your database cluster. This method&#39;s main drawback is that it increases the size of your UDx library file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dynamically link the library to your UDx. You must sometimes use dynamic linking if a third-party library does not allow static linking. In this case, you must copy the libraries to your database cluster in addition to your UDx library file.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: Adding metadata to C&#43;&#43; libraries</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/adding-metadata-to-cpp-libraries/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/adding-metadata-to-cpp-libraries/</guid>
      <description>
        
        
        &lt;p&gt;You can add metadata, such as author name, the version of the library, a description of your library, and so on to your library. This metadata lets you track the version of your function that is deployed on a Vertica Analytic Database cluster and lets third-party users of your function know who created the function. Your library&#39;s metadata appears in the &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/user-libraries/#&#34;&gt;USER_LIBRARIES&lt;/a&gt; system table after your library has been loaded into the Vertica Analytic Database catalog.&lt;/p&gt;

&lt;p&gt;You declare the metadata for your library by calling the &lt;code&gt;RegisterLibrary()&lt;/code&gt; function in one of the source files for your UDx. If there is more than one function call in the source files for your UDx, whichever gets interpreted last as Vertica Analytic Database loads the library is used to determine the library&#39;s metadata.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;RegisterLibrary()&lt;/code&gt; function takes eight string parameters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RegisterLibrary(author,
                library_build_tag,
                library_version,
                library_sdk_version,
                source_url,
                description,
                licenses_required,
                signature);
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;author&lt;/code&gt; contains whatever name you want associated with the creation of the library (your own name or your company&#39;s name for example).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;library_build_tag&lt;/code&gt; is a string you want to use to represent the specific build of the library (for example, the SVN revision number or a timestamp of when the library was compiled). This is useful for tracking instances of your library as you are developing them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;library_version&lt;/code&gt; is the version of your library. You can use whatever numbering or naming scheme you want.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;library_sdk_version&lt;/code&gt; is the version of the Vertica Analytic Database SDK Library for which you&#39;ve compiled the library.&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

This field isn&#39;t used to determine whether a library is compatible with a version of the Vertica Analytic Database server. The version of the Vertica Analytic Database SDK you use to compile your library is embedded in the library when you compile it. It is this information that Vertica Analytic Database server uses to determine if your library is compatible with it.

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;source_url&lt;/code&gt; is a URL where users of your function can find more information about it. This can be your company&#39;s website, the GitHub page hosting your library&#39;s source code, or whatever site you like.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;description&lt;/code&gt; is a concise description of your library.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;licenses_required&lt;/code&gt; is a placeholder for licensing information. You must pass an empty string for this value.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;signature&lt;/code&gt; is a placeholder for a signature that will authenticate your library. You must pass an empty string for this value.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, the following code demonstrates adding metadata to the Add2Ints example (see &lt;a href=&#34;../../../../../en/extending/developing-udxs/scalar-functions-udsfs/cpp-example-add2ints/#&#34;&gt;C&amp;#43;&amp;#43; example: Add2Ints&lt;/a&gt;).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cpp&#34; data-lang=&#34;cpp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Register the factory with OpenText&amp;amp;trade; Analytics Database
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RegisterFactory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Add2IntsFactory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Register the library&amp;#39;s metadata.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RegisterLibrary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Whizzo Analytics Ltd.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s&#34;&gt;&amp;#34;1234&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s&#34;&gt;&amp;#34;2.0&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s&#34;&gt;&amp;#34;7.0.0&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s&#34;&gt;&amp;#34;http://www.example.com/add2ints&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s&#34;&gt;&amp;#34;Add 2 Integer Library&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Loading the library and querying the &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/user-libraries/#&#34;&gt;USER_LIBRARIES&lt;/a&gt; system table shows the metadata supplied in the call to &lt;code&gt;RegisterLibrary()&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE LIBRARY add2intslib AS &amp;#39;/home/dbadmin/add2ints.so&amp;#39;;
CREATE LIBRARY
=&amp;gt; \x
Expanded display is on.
=&amp;gt; SELECT * FROM USER_LIBRARIES WHERE lib_name = &amp;#39;add2intslib&amp;#39;;
-[ RECORD 1 ]-----+----------------------------------------
schema_name       | public
lib_name          | add2intslib
lib_oid           | 45035996273869808
author            | Whizzo Analytics Ltd.
owner_id          | 45035996273704962
lib_file_name     | public_add2intslib_45035996273869808.so
md5_sum           | 732c9e145d447c8ac6e7304313d3b8a0
sdk_version       | v7.0.0-20131105
revision          | 125200
lib_build_tag     | 1234
lib_version       | 2.0
lib_sdk_version   | 7.0.0
source_url        | http://www.example.com/add2ints
description       | Add 2 Integer Library
licenses_required |
signature         |
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Extending: C&#43;&#43; SDK data types</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/cpp-sdk-data-types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/cpp-sdk-data-types/</guid>
      <description>
        
        
        &lt;p&gt;The OpenText™ Analytics Database SDK has typedefs and classes for representing the database data types within your UDx code. Using these typedefs ensures data type compatibility between the data your UDx processes and generates and the database. The following table describes some of the typedefs available. Consult the &lt;a href=&#34;../../../../../sdkdocs/CppSDK/index.htm&#34;&gt;C++ SDK Documentation&lt;/a&gt; for a complete list, as well as lists of helper functions to convert and manipulate these data types.&lt;/p&gt;
&lt;p&gt;For information about SDK support for complex data types, see &lt;a href=&#34;../../../../../en/extending/developing-udxs/arguments-and-return-values/#Complex&#34;&gt;Complex Types as Arguments and Return Values&lt;/a&gt;.

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
Type Definition&lt;/th&gt; 

&lt;th &gt;
Description&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Interval&lt;/td&gt; 

&lt;td &gt;


An OpenText™ Analytics Database interval&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


IntervalYM&lt;/td&gt; 

&lt;td &gt;


An OpenText™ Analytics Database year-to-month interval.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Timestamp&lt;/td&gt; 

&lt;td &gt;


An OpenText™ Analytics Database timestamp&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


vint&lt;/td&gt; 

&lt;td &gt;


A standard OpenText™ Analytics Database 64-bit integer&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


vbool&lt;/td&gt; 

&lt;td &gt;


A Boolean value in OpenText™ Analytics Database&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


vbool_null&lt;/td&gt; 

&lt;td &gt;


A null value for a Boolean data types&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


vfloat&lt;/td&gt; 

&lt;td &gt;


An OpenText™ Analytics Database floating point value&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


VString&lt;/td&gt; 

&lt;td &gt;




&lt;p&gt;String data types (such as varchar and char)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Do not use a VString object to hold an intermediate result. Use a std::string or char[] instead.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


VNumeric&lt;/td&gt; 

&lt;td &gt;


Fixed-point data types from OpenText™ Analytics Database&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VUuid&lt;/td&gt; 

&lt;td &gt;
An OpenText™ Analytics Database universally unique identifier&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When making some  SDK API calls (such as &lt;code&gt;VerticaType::getNumericLength()&lt;/code&gt;) on objects, make sure they have the correct data type. To minimize overhead and improve performance, most of the APIs do not check the data types of the objects on which they are called. Calling a function on an incorrect data type can result in an error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot create instances of VString or VNumeric yourself. You can manipulate the values of existing objects of these classes that the database passes to your UDx, and extract values from them. However, only the database can instantiate these classes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: Resource use for C&#43;&#43; UDxs</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/resource-use-cpp-udxs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/resource-use-cpp-udxs/</guid>
      <description>
        
        
        &lt;p&gt;Your UDxs consume at least a small amount of memory by instantiating classes and creating local variables. This basic memory usage by UDxs is small enough that you do not need to be concerned about it.&lt;/p&gt;
&lt;p&gt;If your UDx needs to allocate more than one or two megabytes of memory for data structures, or requires access to additional resources such as files, you must inform OpenText™ Analytics Database about its resource use. The database can then ensure that the resources your UDx requires are available before running a query that uses it. Even moderate memory use (10MB per invocation of a UDx, for example) can become an issue if there are many simultaneous queries that call it.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

If your UDx allocates its own memory, you must make &lt;strong&gt;absolutely sure&lt;/strong&gt; it properly frees it. Failing to free even a single byte of allocated memory can have significant consequences at scale. Instead of having your code allocate its own memory, you should use the C++ &lt;code&gt;vt_alloc&lt;/code&gt; macro, which uses the database&#39;s own memory manager to allocate and track memory. This memory is guaranteed to be properly disposed of when your UDx completes execution. See &lt;a href=&#34;../../../../../en/extending/developing-udxs/developing-with-sdk/cpp-sdk/resource-use-cpp-udxs/allocating-resources-udxs/#&#34;&gt;Allocating resources for UDxs&lt;/a&gt; for more information.

&lt;/div&gt;&lt;/p&gt;

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