RemoteSource option

The RemoteSource option specifies that the source data file is remote. The option takes the following values: ODBC, JDBC, OLE-DB, S3, AZURE, NZSQL, PYTHON, GOLANG, YES, or the empty string.

External tables that you create with the RemoteSource option set to ODBC, JDBC, or OLE-DB are usable only through those values. External tables that you create without setting the RemoteSource option or by setting the option to an empty string are usable from any client. In these cases, the source data file path is assumed to be on the Netezza Performance Server host, even if you remotely initiate the load or unload from a different host.

If you set the RemoteSource option to NZSQL or YES, the nzsql command supports remote loads and remote unloads that use external tables. If you do not set the RemoteSource option to NZSQL or to YES, the nzsql command supports loads and unloads only locally on the host, although you can create external tables remotely.

This option is automatically set to ODBC if you set the host name option to anything but the local host or the reserved IP address (127.0.0.1).

Netezza Performance Server is an immutable container. You cannot run scripts jobs locally. You must run these type of jobs from client systems. This causes scripts that use External Table to break unless the External Table statements in the script use the remotesource option.

If you are on PureData System for Analytics, and if you want zero migration efforts with such scripted jobs, and to avoid any changes toy your External Table statements (for example, adding the remotesource), use one of the following solutions.

Solution 1
On the Netezza Performance Server host, do the following steps:
  1. Add the following line to /nz/data/postgresql.conf.
    remotesource='NZSQL'
  2. Stop and start the system for the change to take effect.
    1. nzstop
    2. nzstart
Solution 2
On a client machine, export the following configuration variable.
export NZ_REMOTESOURCE_NZSQL=1
Example:
[NZ]$ export NZ_REMOTESOURCE_NZSQL=1
[NZ]$ nzsql -host <<nps-host>> -db db1 -c "create external table '/tmp/et1.dat' using (delim '|') as select * from EMPLOYEE"