vertica/verticasdk

By vertica

Updated over 1 year ago

container to build user defined extensions (UDX)

Image
Data Science
Databases & Storage
Languages & Frameworks

1.1K

Important

Go to opentext/vertica-sdk for all verticasdk images. The vertica/verticasdk repository is not actively maintained.

About

The Vertica SDK container packages the binaries, libaries, and compilers required to create Vertica user-defined extensions (UDxs) with C++.

Supported Tags

Vertica tags each image with the host operating system and the Vertica version. Each tag follows this format:

<host-os>-v<major>.<minor>.<patch>

For example, centos-v12.0.3 creates an image with a CentOS operating system and Vertica version 12.0, service pack 3.

For a comprehensive list, see Tags.

Quick Reference

What is Vertica?

Vertica is a unified analytics platform, based on a massively scalable architecture with the broadest set of analytical functions spanning event and time series, pattern matching, geospatial and end-to-end in-database machine learning. Vertica enables you to easily apply these powerful functions to the largest and most demanding analytical workloads, arming you and your customers with predictive business insights faster than any analytics data warehouse in the market. Vertica provides a unified analytics platform across major public clouds and on-premises data centers and integrates data in cloud object storage and HDFS without forcing you to move any of your data.

https://www.vertica.com/

How to Use This Image

This image is built using the open-source UDx-container. To simplify development, you might want to use the vsdk-* scripts in the UDx-container repository with this image.

To build a UDx with this image, you have to compile the C++ file, build the image, and then test the image.

Compile the C++ file

Compile the C++ file and run it with the Vertica SDK image by appending a g++ command to a docker run command that maps the necessary users, groups, and working directory.

For example, if you compile a C++ file with this command:

$ g++ -O3 -D HAVE_LONG_INT_64 -Wall -std=c++11 -shared -Wno-unused-value -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC program.cpp

You can compile it within a running Vertica SDK container with the following docker run command:

$ docker run --rm -u "$(id -u):$(id -g)" -w "$PWD" -v "$PWD:$PWD:rw" vertica/verticasdk:ubuntu-v11.1.1 g++ -O3 -D HAVE_LONG_INT_64 -Wall -std=c++11 -shared -Wno-unused-value -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC program.cpp

For a demonstration, review the Makefile in the vertica/dblink repository.

Build with a Makefile

Create a local Makefile and build an image with your UDxs:

  1. Copy the Vertica examples into the /tmp directory:
    $ cp -r /opt/vertica/sdk/examples /tmp
    
  2. Change to the new /examples directory:
    $ cd /tmp/examples
    
  3. Create a local vsdk-make file from the UDx-container repository:
    $ curl https://raw.githubusercontent.com/vertica/vertica-containers/main/UDx-container/vsdk-exec > vsdk-make
    
  4. Update the file permissions:
    $ chmod 755 vsdk-make
    
  5. Export the Vertica and operating system environment variables for the build process:
    $ export VERTICA_VERSION=11.1.1$ export OSTAG=ubuntu
    
  6. Build the container:
    $ ./vsdk-make ScalarFunctions TransformFunctions AnalyticFunctions AggregateFunctions UserDefinedLoad
    
  7. Verify the shared library files were created in the container:
    $ ls -l build/*.so
    

Test with a Vertica server

Run vertica inside the Vertica SDK container to start the Vertica server. This is most easily done with a Docker compose file, such as this minimal example:

version: '2'

networks:
  verticanet:
    driver: bridge

services:
  vertica:
    image: vertica/verticasdk:ubuntu-v11.1.1
    command: ["vertica"]
    networks:
      - verticanet
    volumes:
      - $PWD
    expose:
      - '5433'
      - '5444'

You can see a demonstration of this in dblink's tests.

Docker Pull Command

docker pull vertica/verticasdk