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.