teradataml 20.0.0.4__py3-none-any.whl → 20.0.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of teradataml might be problematic. Click here for more details.
- teradataml/LICENSE-3RD-PARTY.pdf +0 -0
- teradataml/README.md +86 -13
- teradataml/__init__.py +2 -1
- teradataml/_version.py +2 -2
- teradataml/analytics/analytic_function_executor.py +7 -12
- teradataml/analytics/json_parser/analytic_functions_argument.py +4 -0
- teradataml/analytics/sqle/__init__.py +16 -1
- teradataml/analytics/utils.py +15 -1
- teradataml/automl/__init__.py +290 -106
- teradataml/automl/autodataprep/__init__.py +471 -0
- teradataml/automl/data_preparation.py +29 -10
- teradataml/automl/data_transformation.py +11 -0
- teradataml/automl/feature_engineering.py +64 -4
- teradataml/automl/feature_exploration.py +639 -25
- teradataml/automl/model_training.py +1 -1
- teradataml/clients/auth_client.py +2 -2
- teradataml/common/constants.py +61 -26
- teradataml/common/messagecodes.py +2 -1
- teradataml/common/messages.py +5 -4
- teradataml/common/utils.py +255 -37
- teradataml/context/context.py +225 -87
- teradataml/data/apriori_example.json +22 -0
- teradataml/data/docs/sqle/docs_17_20/Apriori.py +138 -0
- teradataml/data/docs/sqle/docs_17_20/NERExtractor.py +121 -0
- teradataml/data/docs/sqle/docs_17_20/NGramSplitter.py +3 -3
- teradataml/data/docs/sqle/docs_17_20/SMOTE.py +212 -0
- teradataml/data/docs/sqle/docs_17_20/TextMorph.py +119 -0
- teradataml/data/docs/sqle/docs_17_20/TextParser.py +54 -3
- teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/DFFT.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/DFFT2.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/DFFTConv.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +4 -4
- teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +6 -6
- teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +4 -4
- teradataml/data/docs/uaf/docs_17_20/MultivarRegr.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/PACF.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/PowerTransform.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/Resample.py +5 -5
- teradataml/data/docs/uaf/docs_17_20/SAX.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/SimpleExp.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/Smoothma.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/UNDIFF.py +1 -1
- teradataml/data/jsons/sqle/17.20/NGramSplitter.json +6 -6
- teradataml/data/jsons/sqle/17.20/TD_Apriori.json +181 -0
- teradataml/data/jsons/sqle/17.20/TD_NERExtractor.json +145 -0
- teradataml/data/jsons/sqle/17.20/TD_SMOTE.json +267 -0
- teradataml/data/jsons/sqle/17.20/TD_TextMorph.json +134 -0
- teradataml/data/jsons/sqle/17.20/TD_TextParser.json +114 -9
- teradataml/data/jsons/sqle/20.00/AI_AnalyzeSentiment.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_AskLLM.json +420 -0
- teradataml/data/jsons/sqle/20.00/AI_DetectLanguage.json +343 -0
- teradataml/data/jsons/sqle/20.00/AI_ExtractKeyPhrases.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_MaskPII.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_RecognizeEntities.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_RecognizePIIEntities.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_TextClassifier.json +359 -0
- teradataml/data/jsons/sqle/20.00/AI_TextEmbeddings.json +360 -0
- teradataml/data/jsons/sqle/20.00/AI_TextSummarize.json +343 -0
- teradataml/data/jsons/sqle/20.00/AI_TextTranslate.json +343 -0
- teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +2 -2
- teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +1 -1
- teradataml/data/ner_dict.csv +8 -0
- teradataml/data/ner_input_eng.csv +7 -0
- teradataml/data/ner_rule.csv +5 -0
- teradataml/data/pos_input.csv +40 -0
- teradataml/data/tdnerextractor_example.json +14 -0
- teradataml/data/teradataml_example.json +13 -0
- teradataml/data/textmorph_example.json +5 -0
- teradataml/data/to_num_data.csv +4 -0
- teradataml/data/tochar_data.csv +5 -0
- teradataml/data/trans_dense.csv +16 -0
- teradataml/data/trans_sparse.csv +55 -0
- teradataml/dataframe/copy_to.py +37 -26
- teradataml/dataframe/data_transfer.py +61 -45
- teradataml/dataframe/dataframe.py +130 -50
- teradataml/dataframe/dataframe_utils.py +15 -2
- teradataml/dataframe/functions.py +109 -9
- teradataml/dataframe/sql.py +328 -76
- teradataml/dbutils/dbutils.py +33 -13
- teradataml/dbutils/filemgr.py +14 -10
- teradataml/lib/aed_0_1.dll +0 -0
- teradataml/opensource/_base.py +6 -157
- teradataml/options/configure.py +4 -5
- teradataml/scriptmgmt/UserEnv.py +305 -38
- teradataml/scriptmgmt/lls_utils.py +376 -130
- teradataml/store/__init__.py +1 -1
- teradataml/table_operators/Apply.py +16 -1
- teradataml/table_operators/Script.py +20 -1
- teradataml/table_operators/table_operator_util.py +58 -9
- teradataml/utils/dtypes.py +2 -1
- teradataml/utils/internal_buffer.py +22 -2
- teradataml/utils/validators.py +313 -57
- {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.5.dist-info}/METADATA +89 -14
- {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.5.dist-info}/RECORD +107 -77
- {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.5.dist-info}/WHEEL +0 -0
- {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.5.dist-info}/top_level.txt +0 -0
- {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.5.dist-info}/zip-safe +0 -0
teradataml/LICENSE-3RD-PARTY.pdf
CHANGED
|
Binary file
|
teradataml/README.md
CHANGED
|
@@ -6,7 +6,7 @@ For community support, please visit the [Teradata Community](https://support.ter
|
|
|
6
6
|
|
|
7
7
|
For Teradata customer support, please visit [Teradata Support](https://support.teradata.com/csm).
|
|
8
8
|
|
|
9
|
-
Copyright
|
|
9
|
+
Copyright 2025, Teradata. All Rights Reserved.
|
|
10
10
|
|
|
11
11
|
### Table of Contents
|
|
12
12
|
* [Release Notes](#release-notes)
|
|
@@ -17,10 +17,83 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
17
17
|
|
|
18
18
|
## Release Notes:
|
|
19
19
|
|
|
20
|
+
#### teradataml 20.00.00.05
|
|
21
|
+
* ##### New Features/Functionality
|
|
22
|
+
* ##### teradataml: AutoML
|
|
23
|
+
* New methods added for `AutoML()`, `AutoRegressor()` and `AutoClassifier()`:
|
|
24
|
+
* `get_persisted_tables()` - List the persisted tables created during AutoML execution.
|
|
25
|
+
* `visualize()` - Generates visualizations to analyze and understand the underlying patterns in the data.
|
|
26
|
+
|
|
27
|
+
* ##### AutoDataPrep - Automated Data Preparation
|
|
28
|
+
AutoDataPrep simplifies the data preparation process by automating the different aspects of
|
|
29
|
+
data cleaning and transformation, enabling seamless exploration, transformation, and optimization of datasets.
|
|
30
|
+
* `AutoDataPrep`
|
|
31
|
+
* Methods of AutoDataPrep
|
|
32
|
+
* `__init__()` - Instantiate an object of AutoDataPrep with given parameters.
|
|
33
|
+
* `fit()` - Perform fit on specified data and target column.
|
|
34
|
+
* `get_data()` - Retrieve the data after AutoDataPrep.
|
|
35
|
+
* `load()` - Load the saved datasets from Teradata Vantage.
|
|
36
|
+
* `deploy()` - Persist the datasets generated by AutoDataPrep in Teradata Vantage.
|
|
37
|
+
* `delete_data()` - Deletes the deployed dataset from the Teradata Vantage.
|
|
38
|
+
* `visualize()` - Generates visualizations to analyze and understand the underlying patterns in the data.
|
|
39
|
+
|
|
40
|
+
* ##### teradataml: SQLE Engine Analytic Functions
|
|
41
|
+
* New Analytics Database Analytic Functions:
|
|
42
|
+
* `Apriori()`
|
|
43
|
+
* `NERExtractor()`
|
|
44
|
+
* `TextMorph()`
|
|
45
|
+
|
|
46
|
+
* ##### teradataml: Functions
|
|
47
|
+
* `td_range()` - Creates a DataFrame with a specified range of numbers.
|
|
48
|
+
|
|
49
|
+
* ##### teradataml DataFrameColumn a.k.a. ColumnExpression
|
|
50
|
+
* `DataFrameColumn.to_number()` - Function converts a string-like representation of a number to NUMBER type.
|
|
51
|
+
|
|
52
|
+
* ##### Updates
|
|
53
|
+
* ###### teradataml: DataFrame function
|
|
54
|
+
* `DataFrame.agg()`: User can request for different percentiles while running agg function.
|
|
55
|
+
* New argument `debug` is added to `DataFrame.map_row()`, `DataFrame.map_partition()`, `DataFrame.apply()` and `udf()`. During the execution of these functions, teradataml internally generates scripts, which are garbage collected implicitly. To debug the failures, this argument allows user to control the garbage collection of the script. When set to False (default), script generated is garbage collected, otherwise script is not garbage collected and displays the path to the script, and user is responsible to remove the script if required.
|
|
56
|
+
* `map_row()`, `map_partition()` and `apply()`
|
|
57
|
+
* Raises a TeradataMlException, if the Python interpreter major version is different between the Vantage Python environment and the local user environment.
|
|
58
|
+
* Displays a warning, if `dill` package version is different between the Vantage Python environment and the local user environment.
|
|
59
|
+
* `DataFrame.describe()`: Argument `include` is no longer supported.
|
|
60
|
+
* `assign()` - Optimized SQL query to enhance the performance for consecutive assign calls.
|
|
61
|
+
|
|
62
|
+
* ###### teradataml: Context Creation
|
|
63
|
+
* `create_context()`
|
|
64
|
+
* Enables user to set the authentication token while creating the connection. This authentication token is required to access services running on Teradata Vantage.
|
|
65
|
+
* New argument `sql_timeout` is added to specify timeout for SQL statement execution triggered from the current session.
|
|
66
|
+
|
|
67
|
+
* ###### teradataml: UAF Functions
|
|
68
|
+
* Integer type value is now accepted as a valid value for function arguments accepting float type.
|
|
69
|
+
|
|
70
|
+
* ###### General functions
|
|
71
|
+
* `set_auth_token()`
|
|
72
|
+
* Added argument `kid` to accept the name of the key used while generating `pem_file`.
|
|
73
|
+
* New keyword argument `auth_mech` accepts the authentication mechanism to be used for generating authentication token.
|
|
74
|
+
* Basic authentication is now supported as well. New keyword argument `password` accepts password for database user in such case.
|
|
75
|
+
* `copy_to_sql()` and `read_csv()` support the VECTOR data type.
|
|
76
|
+
|
|
77
|
+
* ###### Open Analytics Framework (OpenAF) APIs:
|
|
78
|
+
* `create_env()`:
|
|
79
|
+
* Supports creation of conda R environment.
|
|
80
|
+
|
|
81
|
+
* ###### teradataml DataFrameColumn a.k.a. ColumnExpression
|
|
82
|
+
* _String Functions_
|
|
83
|
+
* `DataFrameColumn.substr()` - Arguments `start_pos` and `length` now accept DataFrameColumn as input.
|
|
84
|
+
* `DataFrameColumn.to_char()` - Argument `formatter` now accepts DataFrameColumn as input.
|
|
85
|
+
|
|
86
|
+
* ###### teradataml: SQLE Engine Analytic Functions
|
|
87
|
+
* Updated Analytics Database Analytic Functions:
|
|
88
|
+
* `SMOTE()` is now supported on 17.20.00.00 as well.
|
|
89
|
+
* `TextParser()`
|
|
90
|
+
* New arguments added: `enforce_token_limit`, `delimiter_regex`, `doc_id_column`,
|
|
91
|
+
`list_positions`, `token_frequency`, `output_by_word`
|
|
92
|
+
|
|
20
93
|
#### teradataml 20.00.00.04
|
|
21
94
|
* ##### New Features/Functionality
|
|
22
95
|
* ###### teradataml OTF Support:
|
|
23
|
-
* This release has enabled the support for accessing OTF data from teradataml.
|
|
96
|
+
* This release has enabled the support for accessing OTF data from teradataml.
|
|
24
97
|
* User can now create a teradataml DataFrame on OTF table, allowing user to use teradataml functions.
|
|
25
98
|
* Example usage below:
|
|
26
99
|
* Creation of view on OTF/datalake table is not supported. Hence, user has to set `configure.temp_object_type` to `VT` using below-mentioned statement.
|
|
@@ -48,7 +121,7 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
48
121
|
```
|
|
49
122
|
* ###### teradataml: DataFrame
|
|
50
123
|
* Introduced a new feature 'Exploratory Data Analysis UI' (EDA-UI), which enhances
|
|
51
|
-
the user experience of teradataml with Jupyter notebook. EDA-UI is displayed by default
|
|
124
|
+
the user experience of teradataml with Jupyter notebook. EDA-UI is displayed by default
|
|
52
125
|
when a teradataml DataFrame is printed in the Jupyter notebook.
|
|
53
126
|
* User can control the EDA-UI using a new configuration option `display.enable_ui`.
|
|
54
127
|
It can be disabled by setting `display.enable_ui` to False.
|
|
@@ -65,7 +138,7 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
65
138
|
* `td_lightgbm.load()` - Load the deployed model in the current session.
|
|
66
139
|
|
|
67
140
|
* ###### FeatureStore
|
|
68
|
-
* New function `FeatureStore.delete()` is added to drop the Feature Store and corresponding repo from Vantage.
|
|
141
|
+
* New function `FeatureStore.delete()` is added to drop the Feature Store and corresponding repo from Vantage.
|
|
69
142
|
|
|
70
143
|
* ###### Database Utility
|
|
71
144
|
* `db_python_version_diff()` - Identifies the Python interpreter major version difference between the interpreter installed on Vantage vs interpreter on the local user environment.
|
|
@@ -78,13 +151,13 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
78
151
|
* Configuration Options
|
|
79
152
|
* `configure.temp_object_type` - Allows user to choose between creating volatile tables or views for teradataml internal use. By default, teradataml internally creates the views for some of the operations. Now, with new configuration option, user can opt to create Volatile tables instead of views. This provides greater flexibility for users who lack the necessary permissions to create view or need to create views on tables without WITH GRANT permissions.
|
|
80
153
|
* Display Options
|
|
81
|
-
* `display.enable_ui` - Specifies whether to display exploratory data analysis UI when DataFrame is printed. By default, this option is enabled (True), allowing exploratory data analysis UI to be displayed. When set to False, exploratory data analysis UI is hidden.
|
|
154
|
+
* `display.enable_ui` - Specifies whether to display exploratory data analysis UI when DataFrame is printed. By default, this option is enabled (True), allowing exploratory data analysis UI to be displayed. When set to False, exploratory data analysis UI is hidden.
|
|
82
155
|
|
|
83
156
|
* ##### Updates
|
|
84
157
|
* ###### teradataml: DataFrame function
|
|
85
158
|
* `describe()`
|
|
86
159
|
* New argument added: `pivot`.
|
|
87
|
-
* When argument `pivot` is set to False, Non-numeric columns are no longer supported for generating statistics.
|
|
160
|
+
* When argument `pivot` is set to False, Non-numeric columns are no longer supported for generating statistics.
|
|
88
161
|
Use `CategoricalSummary` and `ColumnSummary`.
|
|
89
162
|
* `fillna()` - Accepts new argument `partition_column` to partition the data and impute null values accordingly.
|
|
90
163
|
* Optimised performance for `DataFrame.plot()`.
|
|
@@ -94,9 +167,9 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
94
167
|
* ###### teradataml: DataFrame Utilities
|
|
95
168
|
* `in_schema()`: New argument `datalake_name` added to accept datalake name.
|
|
96
169
|
|
|
97
|
-
* ###### Table Operator
|
|
98
|
-
* `Apply()` no longer looks at authentication token by default. Authentication token is now required only if user
|
|
99
|
-
|
|
170
|
+
* ###### Table Operator
|
|
171
|
+
* `Apply()` no longer looks at authentication token by default. Authentication token is now required only if user wants to consume Open Analytics Framework REST APIs.
|
|
172
|
+
|
|
100
173
|
* ###### Hyper Parameter Tuner
|
|
101
174
|
* `GridSearch()` and `RandomSearch()` now displays a message to refer to `get_error_log()` api when model training fails in HPT.
|
|
102
175
|
|
|
@@ -104,7 +177,7 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
104
177
|
* Configuration Options
|
|
105
178
|
* `configure.indb_install_location`
|
|
106
179
|
Determines the installation location of the In-DB Python package based on the installed RPM version.
|
|
107
|
-
|
|
180
|
+
|
|
108
181
|
* ###### teradataml Context Creation
|
|
109
182
|
* `create_context()` - Enables user to create connection using either parameters set in environment or config file, in addition to previous method. Newly added options help users to hide the sensitive data from the script.
|
|
110
183
|
|
|
@@ -113,7 +186,7 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
113
186
|
|
|
114
187
|
* ###### OpensourceML
|
|
115
188
|
* Raises a TeradataMlException, if the Python interpreter major version is different between the Vantage Python environment and the local user environment.
|
|
116
|
-
* Displays a warning, if specific Python package versions are different between the Vantage Python environment and the local user environment.
|
|
189
|
+
* Displays a warning, if specific Python package versions are different between the Vantage Python environment and the local user environment.
|
|
117
190
|
|
|
118
191
|
* ###### Database Utility
|
|
119
192
|
* `db_list_tables()`: New argument `datalake_name` added to accept datalake name to list tables from.
|
|
@@ -131,10 +204,10 @@ Copyright 2024, Teradata. All Rights Reserved.
|
|
|
131
204
|
* `DataFrame.set_index()` no longer modifies the original DataFrame's index when argument `append` is used.
|
|
132
205
|
* `concat()` function now supports the DataFrame with column name starts with digit or contains special characters or contains reserved keywords.
|
|
133
206
|
* `create_env()` proceeds to install other files even if current file installation fails.
|
|
134
|
-
* Corrected the error message being raised in `create_env()` when authentication is not set.
|
|
207
|
+
* Corrected the error message being raised in `create_env()` when authentication token is not set.
|
|
135
208
|
* Added missing argument `charset` for Vantage Analytic Library functions.
|
|
136
209
|
* New argument `seed` is added to `AutoML`, `AutoRegressor` and `AutoClassifier` to ensure consistency on result.
|
|
137
|
-
* Analytic functions now work even if name of columns for underlying tables
|
|
210
|
+
* Analytic functions now work even if name of columns for underlying tables has non-ascii characters.
|
|
138
211
|
|
|
139
212
|
#### teradataml 20.00.00.03
|
|
140
213
|
|
teradataml/__init__.py
CHANGED
|
@@ -63,6 +63,7 @@ from teradataml.opensource import *
|
|
|
63
63
|
|
|
64
64
|
# Import AutoML
|
|
65
65
|
from teradataml.automl import AutoML, AutoRegressor, AutoClassifier
|
|
66
|
+
from teradataml.automl.autodataprep import AutoDataPrep
|
|
66
67
|
|
|
67
68
|
# Import global variable representing session_queryband.
|
|
68
69
|
from teradataml.telemetry_utils.queryband import session_queryband
|
|
@@ -72,6 +73,6 @@ session_queryband.configure_queryband_parameters(app_name="TDML", app_version=__
|
|
|
72
73
|
# Import functions.
|
|
73
74
|
from teradataml.dataframe.functions import *
|
|
74
75
|
|
|
75
|
-
# Import FeatureStore
|
|
76
|
+
# Import FeatureStore.
|
|
76
77
|
from teradataml.store import *
|
|
77
78
|
|
teradataml/_version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ##################################################################
|
|
2
2
|
#
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2025 Teradata. All rights reserved.
|
|
4
4
|
# TERADATA CONFIDENTIAL AND TRADE SECRET
|
|
5
5
|
#
|
|
6
6
|
# Primary Owner: Pankaj Purandare (PankajVinod.Purandare@teradata.com)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
#
|
|
9
9
|
# ##################################################################
|
|
10
10
|
|
|
11
|
-
version = "20.00.00.
|
|
11
|
+
version = "20.00.00.05"
|
|
@@ -137,6 +137,7 @@ class _AnlyticFunctionExecutor:
|
|
|
137
137
|
else:
|
|
138
138
|
py_types = (py_types, additional_valid_types)
|
|
139
139
|
|
|
140
|
+
|
|
140
141
|
argument_info = [func_arg_name,
|
|
141
142
|
func_arg_value,
|
|
142
143
|
not argument.is_required(),
|
|
@@ -1949,12 +1950,9 @@ class _UAFFunctionExecutor(_SQLEFunctionExecutor):
|
|
|
1949
1950
|
# a list and of the required size.
|
|
1950
1951
|
if argument.get_match_length_of_arguments():
|
|
1951
1952
|
required_length = argument.get_required_length()
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
MessageCodes.INVALID_LIST_LENGTH).format(lang_name,
|
|
1956
|
-
required_length),
|
|
1957
|
-
MessageCodes.INVALID_LIST_LENGTH)
|
|
1953
|
+
|
|
1954
|
+
_Validators._valid_list_length(arg_value=arg_value, arg_name=lang_name,
|
|
1955
|
+
required_length=required_length)
|
|
1958
1956
|
|
|
1959
1957
|
# Perform the checks which are specific to argument(_AnlyFuncArgument) type.
|
|
1960
1958
|
# Check lower bound and upper bound for numeric arguments.
|
|
@@ -2283,12 +2281,9 @@ class _StoredProcedureExecutor(_UAFFunctionExecutor):
|
|
|
2283
2281
|
# a list and of the required size.
|
|
2284
2282
|
if argument.get_match_length_of_arguments():
|
|
2285
2283
|
required_length = argument.get_required_length()
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
MessageCodes.INVALID_LIST_LENGTH).format(lang_name,
|
|
2290
|
-
required_length),
|
|
2291
|
-
MessageCodes.INVALID_LIST_LENGTH)
|
|
2284
|
+
|
|
2285
|
+
_Validators._valid_list_length(arg_value=arg_value, arg_name=lang_name,
|
|
2286
|
+
required_length=required_length)
|
|
2292
2287
|
|
|
2293
2288
|
# Perform the checks which are specific to argument(_AnlyFuncArgument) type.
|
|
2294
2289
|
# Check lower bound and upper bound for numeric arguments.
|
|
@@ -1701,6 +1701,10 @@ class _AnlyFuncArgumentUAF(_AnlyFuncArgumentBaseUAF):
|
|
|
1701
1701
|
py_type = _Dtypes._anly_json_type_to_python_type(self.__data_type)
|
|
1702
1702
|
py_types = py_type if isinstance(py_type, tuple) else (py_type,)
|
|
1703
1703
|
|
|
1704
|
+
# If argument is float and int is not in the list of valid types, then add int to the list.
|
|
1705
|
+
if float in py_types and int not in py_types:
|
|
1706
|
+
py_types = (int,) + py_types
|
|
1707
|
+
|
|
1704
1708
|
# If lists are allowed, add list type also.
|
|
1705
1709
|
if self.__allows_lists and (list not in py_types):
|
|
1706
1710
|
py_types = py_types + (list,)
|
|
@@ -5,7 +5,19 @@ from teradataml.analytics.meta_class import _AnalyticFunction
|
|
|
5
5
|
from teradataml.analytics.meta_class import _common_init, _common_dir
|
|
6
6
|
from teradataml.analytics.json_parser.utils import _get_associated_parent_classes
|
|
7
7
|
|
|
8
|
-
_sqle_functions = [
|
|
8
|
+
_sqle_functions = [
|
|
9
|
+
'AIAnalyzeSentiment',
|
|
10
|
+
'AITextTranslate',
|
|
11
|
+
'AIDetectLanguage',
|
|
12
|
+
'AITextClassifier',
|
|
13
|
+
'AIAskLLM',
|
|
14
|
+
'AITextEmbeddings',
|
|
15
|
+
'AITextSummarize',
|
|
16
|
+
'AIExtractKeyPhrases',
|
|
17
|
+
'AIRecognizePIIEntities',
|
|
18
|
+
'AIMaskPII',
|
|
19
|
+
'AIRecognizeEntities',
|
|
20
|
+
'ANOVA',
|
|
9
21
|
'Antiselect',
|
|
10
22
|
'Attribution',
|
|
11
23
|
'BincodeFit',
|
|
@@ -99,6 +111,9 @@ _sqle_functions = ['ANOVA',
|
|
|
99
111
|
'HNSW',
|
|
100
112
|
'HNSWPredict',
|
|
101
113
|
'HNSWSummary',
|
|
114
|
+
'TextMorph',
|
|
115
|
+
'NERExtractor',
|
|
116
|
+
'Apriori'
|
|
102
117
|
]
|
|
103
118
|
|
|
104
119
|
for func in _sqle_functions:
|
teradataml/analytics/utils.py
CHANGED
|
@@ -411,6 +411,9 @@ class FuncSpecialCaseHandler():
|
|
|
411
411
|
self._single_quote_arg = lambda arg_value: "'{0}'".format(arg_value)
|
|
412
412
|
# Quote "arg_value" when value is 'NONE'.
|
|
413
413
|
self._single_quote_arg_value_NONE = lambda arg_value: "'{0}'".format(arg_value) if arg_value == 'NONE' else arg_value
|
|
414
|
+
# Remove quotes from "arg_value".
|
|
415
|
+
self._remove_quotes = lambda arg_value, *args, **kwargs: arg_value.replace("'", "") if isinstance(arg_value, str) else arg_value
|
|
416
|
+
|
|
414
417
|
|
|
415
418
|
# Initialize special function handle dictionary.
|
|
416
419
|
self.__handlers = {"Antiselect": {"exclude": self._enclose_square_brackets_add_quote},
|
|
@@ -455,7 +458,18 @@ class FuncSpecialCaseHandler():
|
|
|
455
458
|
"mode": self._single_quote_arg},
|
|
456
459
|
"Matrix2Image": {"type": self._single_quote_arg,
|
|
457
460
|
"colormap": self._single_quote_arg
|
|
458
|
-
}
|
|
461
|
+
},
|
|
462
|
+
"AIAnalyzeSentiment": {"authorization": self._remove_quotes},
|
|
463
|
+
"AITextTranslate": {"authorization": self._remove_quotes},
|
|
464
|
+
"AITextSummarize": {"authorization": self._remove_quotes},
|
|
465
|
+
"AI_TextEmbeddings": {"authorization": self._remove_quotes},
|
|
466
|
+
"AITextClassifier": {"authorization": self._remove_quotes},
|
|
467
|
+
"AIRecognizePIIEntities": {"authorization": self._remove_quotes},
|
|
468
|
+
"AIRecognizeEntities": {"authorization": self._remove_quotes},
|
|
469
|
+
"AIMaskPII:": {"authorization": self._remove_quotes},
|
|
470
|
+
"AIExtractKeyPhrases": {"authorization": self._remove_quotes},
|
|
471
|
+
"AIDetectLanguage": {"authorization": self._remove_quotes},
|
|
472
|
+
"AIAskLLM": {"authorization": self._remove_quotes}
|
|
459
473
|
}
|
|
460
474
|
|
|
461
475
|
# Setter method for argument.
|