Downloading Custom Files - Teradata Vantage

Teradata Vantageā„¢ User Guide

Product
Teradata Vantage
Release Number
1.1
Published
May 2020
Language
English (United States)
Last Update
2020-05-28
dita:mapPath
ioz1543440393126.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4002
lifecycle
previous
Product Category
Teradata Vantage

A custom file installed by a function or user can be downloaded from ML Engine to a local directory on Advanced 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;
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 Advanced SQL Engine node:
CALL PM.DOWNLOAD_AFILE('default_sentiment_lexicon.txt');
The file is downloaded into: /var/opt/teradata/UDF/fromMLE/alice.

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;
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 Advanced SQL Engine node:
CALL PM.DOWNLOAD_AFILE_FROM_PUBLIC('default_sentiment_lexicon.txt');
The file is downloaded into: /var/opt/teradata/UDF/fromMLE/public.