This topic describes how to configure the MADlib open-source library for scalable in-database analytics in VMware Tanzu Greenplum.

About MADlib in VMWare Tanzu Greenplum for Kubernetes

Unlike with other VMware Tanzu Greenplum distributions, VMWare Tanzu Greenplum for Kubernetes automatically installs the MADlib software as part of the Greenplum Docker image. For example, after initializing a new Greenplum cluster in Kubernetes, you can see that MADlib is available as an installed Debian Package:

$ kubectl exec -it master-0 -- bash -c "dpkg -s madlib"
Package: madlib
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 59035
Architecture: amd64
Version: 1.17.0
Description: Apache MADlib is an Open-Source Library for Scalable in-Database Analytics

To begin using MADlib, you simply use the madpack utility to add MADlib functions to your database, as described in the next section.

Adding MADlib Functions

To install the MADlib functions to a database, use the madpack utility. For example:

$ kubectl exec -it master-0 -- bash -c "source ./.bashrc; madpack -p greenplum install" INFO : Detected Greenplum DB version 6.8.0. INFO : *** Installing MADlib *** INFO : MADlib tools version    = 1.17.0 (/usr/local/madlib/Versions/1.17.0/bin/../madpack/ INFO : MADlib database version = None (host=localhost:5432, db=gpadmin, schema=madlib) INFO : Testing PL/Python environment... INFO : > Creating language PL/Python... INFO : > PL/Python environment OK (version: 2.7.12) INFO : > Preparing objects for the following modules: INFO : > - array_ops INFO : > - bayes INFO : > - crf
... INFO : Installing MADlib: INFO : > Created madlib schema INFO : > Created madlib.MigrationHistory table INFO : > Wrote version info in MigrationHistory table INFO : MADlib 1.17.0 installed successfully in madlib schema.

This installs MADlib functions into the default schema named madlib. Execute madpack -h or see the Greenplum MADlib Extension for Analytics documentation for VMware Tanzu Greenplum Database for more information about using madpack.

Getting More Information

For more information about using MADlib, see:

check-circle-line exclamation-circle-line close-line
Scroll to top icon