<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vertica Documentation – Developing with the Vertica SDK</title>
    <link>/en/extending/developing-udxs/developing-with-sdk/</link>
    <description>Recent content in Developing with the Vertica SDK on Vertica Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/extending/developing-udxs/developing-with-sdk/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Extending: Setting up a development environment</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/setting-up-development-environment/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/setting-up-development-environment/</guid>
      <description>
        
        
        &lt;p&gt;Before you start developing your UDx, you need to configure your development and test environments. Development and test environments must use the same operating system and Vertica version as the production environment.&lt;/p&gt;
&lt;p&gt;For additional language-specific requirements, see the following topics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/developing-with-sdk/cpp-sdk/setting-up-cpp-sdk/&#34;&gt;Setting up the C&amp;#43;&amp;#43; SDK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/developing-with-sdk/java-sdk/setting-up-java-sdk/&#34;&gt;Setting up the Java SDK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/developing-with-sdk/python-sdk/&#34;&gt;Python SDK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/developing-with-sdk/r-sdk/installingupgrading-r-language-pack/&#34;&gt;Installing/upgrading the R language pack for Vertica&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;development-environment-options&#34;&gt;Development environment options&lt;/h2&gt;
&lt;p&gt;The language that you use to develop your UDx determines the setup options and requirements for your development environment. C++ developers can use the &lt;a href=&#34;#C--&#34;&gt;C++ UDx container&lt;/a&gt;, and all developers can use a &lt;a href=&#34;#Non-Prod&#34;&gt;non-production Vertica environment&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;C--&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;c-udx-container&#34;&gt;C++ UDx container&lt;/h3&gt;
&lt;p&gt;C++ developers can develop with the C++ UDx container. The &lt;a href=&#34;https://github.com/vertica/vertica-containers/tree/main/UDx-container&#34;&gt;UDx-container GitHub repository&lt;/a&gt; provides the tools to build a container that packages the binaries, libraries, and compilers required to develop C++ Vertica extensions. The C++ UDx container has the following build options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CentOS or Ubuntu base image&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vertica 10.x and 11.x versions&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For requirement, build, and test details, see the repository &lt;a href=&#34;https://github.com/vertica/vertica-containers/tree/main/UDx-container&#34;&gt;README&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;Non-Prod&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;non-production-vertica-environments&#34;&gt;Non-production Vertica environments&lt;/h3&gt;
&lt;p&gt;You can use a node in a non-production Vertica database or another machine that runs the same operating system and Vertica version as your production environment. For specific requirements and dependencies, refer to &lt;a href=&#34;#Operatin&#34;&gt;Operating System Requirements&lt;/a&gt; and &lt;a href=&#34;#Language&#34;&gt;Language Requirements&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;test-environment-options&#34;&gt;Test environment options&lt;/h2&gt;
&lt;p&gt;To test your UDx, you need access to a non-production Vertica database. You have the following options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install a single-node Vertica database on your development machine.&lt;/li&gt;
&lt;li&gt;Download and build a containerized test environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;containerized-test-environments&#34;&gt;Containerized test environments&lt;/h3&gt;
&lt;p&gt;Vertica provides the following containerized options to simplify your test environment setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://hub.docker.com/r/vertica/vertica-ce&#34;&gt;Vertica Community Edition (CE) container image&lt;/a&gt; from the &lt;a href=&#34;https://hub.docker.com/u/vertica&#34;&gt;Vertica DockerHub registry&lt;/a&gt;. See the Overview for base image and Vertica version details.&lt;/p&gt;
&lt;p&gt;For details about Vertica CE, see &lt;a href=&#34;../../../../en/getting-started/community-edition-ce/&#34;&gt;Vertica community edition (CE)&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Custom CE image with the &lt;a href=&#34;https://github.com/vertica/vertica-containers/tree/main/one-node-ce&#34;&gt;one-node-ce GitHub repository&lt;/a&gt;. You can build CentOS- and Debian-based containers that are compatible with Vertica 10.x and 11.x versions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Operatin&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;operating-system-requirements&#34;&gt;Operating system requirements&lt;/h2&gt;
&lt;p&gt;Develop your UDx code on the same Linux platform that you use for your production Vertica database cluster. Centos- and Debian-based operating systems each require that you download additional packages.&lt;/p&gt;
&lt;h3 id=&#34;centos-based-operating-systems&#34;&gt;CentOS-based operating systems&lt;/h3&gt;
&lt;p&gt;Installations on the following CentOS-based operating systems require the &lt;a href=&#34;https://centos.pkgs.org/7/centos-sclo-rh-testing-x86_64/devtoolset-7-7.0-8.el7.x86_64.rpm.html&#34;&gt;devtoolset-7 package:&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CentOS&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Red Hat Enterprise Linux&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Oracle Enterprise Linux&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Consult the documentation for your operating system for the specific installation command.&lt;/p&gt;
&lt;h3 id=&#34;debian-based-operating-systems&#34;&gt;Debian-based operating systems&lt;/h3&gt;
&lt;p&gt;Installations on the following Debian-based operating systems require the &lt;a href=&#34;https://packages.debian.org/buster/gcc-7&#34;&gt;GCC-7 package&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Debian&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ubuntu&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SUSE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OpenSUSE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amazon Linux (The GCC package is pre-installed on Amazon Linux)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Consult the documentation for your operating system for the specific installation command.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: Downloading and running UDx example code</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/downloading-and-running-udx-example-code/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/downloading-and-running-udx-example-code/</guid>
      <description>
        
        
        &lt;p&gt;You can download all of the examples shown in this documentation, and many more, from the Vertica &lt;a href=&#34;https://github.com/vertica/UDx-Examples&#34;&gt;GitHub repository&lt;/a&gt;. This repository includes examples of all types of UDxs.&lt;/p&gt;
&lt;p&gt;You can download the examples in either of two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Download the ZIP file. Extract the contents of the file into a directory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clone the repository. Using a terminal window, run the following command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git clone https://github.com/vertica/UDx-Examples.git
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The repository includes a makefile that you can use to compile the C++ and Java examples. It also includes .sql files that load and use the examples. See the README file for instructions on compiling and running the examples. To compile the examples you will need g++ or a JDK and make. See &lt;a href=&#34;../../../../en/extending/developing-udxs/developing-with-sdk/setting-up-development-environment/&#34;&gt;Setting up a development environment&lt;/a&gt; for related information.&lt;/p&gt;
&lt;p&gt;Running the examples not only helps you understand how a UDx works, but also helps you ensure your development environment is properly set up to compile UDx libraries.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/aggregate-functions-udafs/&#34;&gt;Aggregate functions (UDAFs)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/analytic-functions-udanfs/&#34;&gt;Analytic functions (UDAnFs)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/scalar-functions-udsfs/&#34;&gt;Scalar functions (UDSFs)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/transform-functions-udtfs/&#34;&gt;Transform functions (UDTFs)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/extending/developing-udxs/user-defined-load-udl/&#34;&gt;User-defined load (UDL)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: C&#43;&#43; SDK</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/cpp-sdk/</guid>
      <description>
        
        
        &lt;p&gt;The Vertica SDK supports writing both fenced and unfenced UDxs in C++ 11. You can download, compile, and run the examples; 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;. Running the examples is a good way to verify that your development environment has all needed libraries.&lt;/p&gt;
&lt;p&gt;If you do not have access to a Vertica test environment, you can install Vertica on your development machine and run a single node. Each time you rebuild your UDx library, you need to re-install it into Vertica. The following diagram illustrates the typical development cycle.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/extending-vertica/c-udx-workflow.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;This section covers C++-specific topics that apply to all UDx types. For information that applies to all languages, see &lt;a href=&#34;../../../../en/extending/developing-udxs/arguments-and-return-values/&#34;&gt;Arguments and return values&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/udx-parameters/&#34;&gt;UDx parameters&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/errors-warnings-and-logging/&#34;&gt;Errors, warnings, and logging&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/handling-cancel-requests/&#34;&gt;Handling cancel requests&lt;/a&gt; and the sections for specific UDx types. For full API documentation, see the 
C++ SDK Documentation.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: Java SDK</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/java-sdk/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/java-sdk/</guid>
      <description>
        
        
        &lt;p&gt;The Vertica SDK supports writing Java UDxs of all types except aggregate functions. All Java UDxs are fenced.&lt;/p&gt;
&lt;p&gt;You can download, compile, and run the examples; 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;. Running the examples is a good way to verify that your development environment has all needed libraries.&lt;/p&gt;
&lt;p&gt;If you do not have access to a Vertica test environment, you can install Vertica on your development machine and run a single node. Each time you rebuild your UDx library, you need to re-install it into Vertica. The following diagram illustrates the typical development cycle.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/extending-vertica/java-udx-workflow.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;This section covers Java-specific topics that apply to all UDx types. For information that applies to all languages, see &lt;a href=&#34;../../../../en/extending/developing-udxs/arguments-and-return-values/&#34;&gt;Arguments and return values&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/udx-parameters/&#34;&gt;UDx parameters&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/errors-warnings-and-logging/&#34;&gt;Errors, warnings, and logging&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/handling-cancel-requests/&#34;&gt;Handling cancel requests&lt;/a&gt; and the sections for specific UDx types. For full API documentation, see the 
Java SDK Documentation.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: Python SDK</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/python-sdk/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/python-sdk/</guid>
      <description>
        
        
        &lt;p&gt;The Vertica SDK supports writing UDxs of some types in Python 3.&lt;/p&gt;
&lt;p&gt;The Python SDK does not require any additional system configuration or header files. This low overhead allows you to develop and deploy new capabilities to your Vertica cluster in a short amount of time.&lt;/p&gt;
&lt;p&gt;The following workflow is typical for the Python SDK:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/extending-vertica/python-udx-workflow.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Because Python has an interpreter, you do not have to compile your program before loading the UDx in Vertica. However, you should expect to do some debugging of your code after you create your function and begin testing it in Vertica.&lt;/p&gt;
&lt;p&gt;When Vertica calls your UDx, it starts a side process that manages the interaction between the server and the Python interpreter.&lt;/p&gt;
&lt;p&gt;This section covers Python-specific topics that apply to all UDx types. For information that applies to all languages, see &lt;a href=&#34;../../../../en/extending/developing-udxs/arguments-and-return-values/&#34;&gt;Arguments and return values&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/udx-parameters/&#34;&gt;UDx parameters&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/errors-warnings-and-logging/&#34;&gt;Errors, warnings, and logging&lt;/a&gt;, &lt;a href=&#34;../../../../en/extending/developing-udxs/handling-cancel-requests/&#34;&gt;Handling cancel requests&lt;/a&gt; and the sections for specific UDx types. For full API documentation, see the &lt;a href=&#34;../../../../en/api-reference/python-sdk/&#34;&gt;Python SDK&lt;/a&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;
Your UDx must be able to run with the version of Python bundled with Vertica. You can find this with &lt;code&gt;/opt/vertica/sbin/python3 --version&lt;/code&gt;. You cannot change the version used by the Vertica Python interpreter.
&lt;/div&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: R SDK</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/r-sdk/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/r-sdk/</guid>
      <description>
        
        
        &lt;p&gt;The Vertica R SDK extends the capabilities of the Vertica Analytic Database so you can leverage additional R libraries. Before you can begin developing User Defined Extensions (UDxs) in R, you must install the R Language Pack for Vertica on each of the nodes in your cluster. The R SDK supports scalar and transform functions in fenced mode. Other UDx types are not supported.&lt;/p&gt;
&lt;p&gt;The following workflow is typical for the R SDK:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/extending-vertica/r-udx-workflow.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;You can find detailed documentation of all of the classes in the Vertica &lt;a href=&#34;../../../../en/api-reference/r-sdk/&#34;&gt;R SDK&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Extending: Debugging tips</title>
      <link>/en/extending/developing-udxs/developing-with-sdk/debugging-tips/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/extending/developing-udxs/developing-with-sdk/debugging-tips/</guid>
      <description>
        
        
        &lt;p&gt;The following tips can help you debug your UDx before deploying it in a production environment.&lt;/p&gt;
&lt;h2 id=&#34;use-a-single-node-for-initial-debugging&#34;&gt;Use a single node for initial debugging&lt;/h2&gt;
&lt;p&gt;You can attach to the Vertica process using a debugger such as gdb to debug your UDx code. Doing this in a multi-node environment, however, is very difficult. Therefore, consider setting up a single-node Vertica test environment to initially debug your UDx.&lt;/p&gt;
&lt;h2 id=&#34;use-logging&#34;&gt;Use logging&lt;/h2&gt;
&lt;p&gt;Each UDx has an associated &lt;code&gt;ServerInterface&lt;/code&gt; instance. The &lt;code&gt;ServerInterface&lt;/code&gt; provides functions to write to the Vertica log and, in the C++ API only, a system table. See &lt;a href=&#34;../../../../en/extending/developing-udxs/errors-warnings-and-logging/logging/&#34;&gt;Logging&lt;/a&gt; for more information.&lt;/p&gt;

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