Netezza (4.1)
This section contains information that is specific to the database type Netezza.
 Supported Functions
 The Netezza database can be used with:
- Â sqlexec (APL)
- Â SQL Loader Agent
 For data loading, it is recommended that you use the SQL Loader Agent. You can also use APL function sqlExec
for both data loading and unloading. For information on how to use sqlExec
with Netezza see the section below, APL Examples. For further details, see also the IBM Netezza Data Loading Guide.
 Preparations
A database driver is required to connect to a Netezza database. This driver must be stored in the Platform. Follow these if Netezza was not set up during the installation of the Platform:
- Set up a persistent file system.
- A driver, provided by your IBM contact, is required to access the Netezza database. This driver must be stored on a host (Platform) that will connect to a Netezza database.
Copy the Netezza files into the directory MZ_HOME/persistent/3 on the platform-0 pod.Â
Example - Copy the Netezza files into the directory
$ kubectl cp <jar file> platform-0:/opt/mz/persistent/3pp -n <namespace>
Restart the platform and EC pods.
Example - Restart the platform and EC pods
$ kubectl delete pod platform-0 -n <namespace>
- Restart the desktop.
Â
APL Examples
This section gives examples of how to use the APL function sqlExec
with a Netezza Database profile.
Â
Example - Load data from an external table on the Netezza database host
initialize { int rowcount = sqlExec("NETEZZA.NetezzaProfile", "INSERT INTO mytable SELECT * FROM EXTERNAL '/tmp/test.csv' USING (delim ',')"); }
Example - Load data from an external table on the EC host
initialize { int rowcount = sqlExec("NETEZZA.NetezzaProfile", "INSERT INTO mytable SELECT * FROM EXTERNAL '/tmp/test.csv' USING (delim ',' REMOTESOURCE 'JDBC')"); }
Example - Unload data to an external table on the EC host
initialize { int rowcount = sqlExec("NETEZZA.NetezzaProfile", "CREATE EXTERNAL TABLE '/tmp/test.csv' USING (DELIM ',' REMOTESOURCE 'JDBC') AS SELECT * FROM mytable"); }