1.0 - Downloading Custom Files - Teradata Vantage

Teradata® Vantage User Guide

Product
Teradata Vantage
Release Number
1.0
Published
January 2019
Language
English (United States)
Last Update
2020-03-11
dita:mapPath
hfp1506029122470.ditamap
dita:ditavalPath
hfp1506029122470.ditaval

A custom file installed by a function or user can be downloaded from Teradata ML Engine to a local directory on the SQL Engine. The downloaded files can be opened, read, updated, or transferred to other systems like a regular file.

Downloading from Private Schema

You can list all the functions and files that are installed in your private schema by running the HELP FOREIGN SCHEMA command. For example, if you are logged in as alice, run :
help foreign schema alice@coprocessor;
For more information, see Help Foreign Schema Command.
To download an installed file (in this case default_sentiment_lexicon.txt) from your private schema into the local directory of the SQL Engine node:
CALL PM.DOWNLOAD_AFILE('default_sentiment_lexicon.txt');
The file is downloaded into: /opt/teradata/tdqg/connector/tdqg-teradata-connector/UDF/fromAster/user .

Downloading from Public Schema

You can list all the functions and files that are installed on the public schema by running the HELP FOREIGN SCHEMA command. For example:
help foreign schema "public"@coprocessor;
For more information, see Help Foreign Schema Command.
To download an installed file (in this case, default_sentiment_lexicon.txt) from the public schema into the local directory of the SQL Engine node:
CALL PM.DOWNLOAD_AFILE_FROM_PUBLIC('default_sentiment_lexicon.txt');
The file is downloaded into: /opt/teradata/tdqg/connector/tdqg-teradata-connector/UDF/fromAster/user .