Using Custom File with ML Engine Function | Teradata Vantage - Using a Custom File - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantage™
PrerequisiteTo execute this procedure, your local user must have permission to execute the procedure pm.install_afile. For instructions for granting this permission, see Teradata Vantage™ User Guide, B700-4002.
This procedure replaces a preinstalled file with a custom file on the Vantage cluster. The examples use the custom file stopwords1.txt, which replaces the preinstalled file stopwords.txt that the TextParser function uses in its StopWordsList syntax element. You can adapt the examples to any preinstalled file. For complete instructions, see Teradata Vantage™ User Guide.
  1. Put the custom stopwords file in the default storage directory in a Teradata Massively Parallel Processing (MPP) node:
    /etc/opt/teradata/tdconfig/Teradata/tdbs_udf/usr/textParserFiles/custom_filename
    For example, if custom_filename is stopwords1.txt:
    /etc/opt/teradata/tdconfig/Teradata/tdbs_udf/usr/textParserFiles/stopwords1.txt
    The procedure install_file assigns a UIF, custom_uif, to custom_filename.
  2. Install the custom stopwords file in your local user in the Vantage cluster:
    call sysuif.install_file('custom_uif', 'custom_filename', 'sz!relative_file_path/custom_filename');
    call pm.install_afile('custom_uif');

    relative_file_path/custom_filename is the path to custom_filename on the MPP node, relative to /etc/opt/teradata/tdconfig/Teradata/tdbs_udf/usr/.

    For example, where custom_uif is stopwords_uif1:
    call sysuif.install_file('stopwords_uif1', 'stopwords1.txt', 'sz!textParserFiles/stopwords1.txt');
    call pm.install_afile('stopwords_uif1');
The file custom_filename is now installed on ML Engine and can be specified in a syntax element in an ML Engine function call. For example, you can now specify StopWordsList ('stopwords1') when calling the TextParser function.