teradataml 20.0.0.4__py3-none-any.whl → 20.0.0.6__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.

Files changed (131) hide show
  1. teradataml/LICENSE-3RD-PARTY.pdf +0 -0
  2. teradataml/README.md +182 -13
  3. teradataml/__init__.py +2 -1
  4. teradataml/_version.py +2 -2
  5. teradataml/analytics/analytic_function_executor.py +8 -13
  6. teradataml/analytics/json_parser/analytic_functions_argument.py +4 -0
  7. teradataml/analytics/sqle/__init__.py +16 -1
  8. teradataml/analytics/utils.py +60 -1
  9. teradataml/automl/__init__.py +290 -106
  10. teradataml/automl/autodataprep/__init__.py +471 -0
  11. teradataml/automl/data_preparation.py +29 -10
  12. teradataml/automl/data_transformation.py +11 -0
  13. teradataml/automl/feature_engineering.py +64 -4
  14. teradataml/automl/feature_exploration.py +639 -25
  15. teradataml/automl/model_training.py +1 -1
  16. teradataml/clients/auth_client.py +12 -8
  17. teradataml/clients/keycloak_client.py +165 -0
  18. teradataml/common/constants.py +71 -26
  19. teradataml/common/exceptions.py +32 -0
  20. teradataml/common/messagecodes.py +28 -0
  21. teradataml/common/messages.py +13 -4
  22. teradataml/common/sqlbundle.py +3 -2
  23. teradataml/common/utils.py +345 -45
  24. teradataml/context/context.py +259 -93
  25. teradataml/data/apriori_example.json +22 -0
  26. teradataml/data/docs/sqle/docs_17_20/Apriori.py +138 -0
  27. teradataml/data/docs/sqle/docs_17_20/NERExtractor.py +121 -0
  28. teradataml/data/docs/sqle/docs_17_20/NGramSplitter.py +3 -3
  29. teradataml/data/docs/sqle/docs_17_20/SMOTE.py +212 -0
  30. teradataml/data/docs/sqle/docs_17_20/TextMorph.py +119 -0
  31. teradataml/data/docs/sqle/docs_17_20/TextParser.py +54 -3
  32. teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -1
  33. teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +2 -2
  34. teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +2 -2
  35. teradataml/data/docs/uaf/docs_17_20/DFFT.py +1 -1
  36. teradataml/data/docs/uaf/docs_17_20/DFFT2.py +1 -1
  37. teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +1 -1
  38. teradataml/data/docs/uaf/docs_17_20/DFFTConv.py +1 -1
  39. teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +4 -4
  40. teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +2 -2
  41. teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +2 -2
  42. teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +6 -6
  43. teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
  44. teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +1 -1
  45. teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +4 -4
  46. teradataml/data/docs/uaf/docs_17_20/MultivarRegr.py +1 -1
  47. teradataml/data/docs/uaf/docs_17_20/PACF.py +1 -1
  48. teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
  49. teradataml/data/docs/uaf/docs_17_20/PowerTransform.py +3 -3
  50. teradataml/data/docs/uaf/docs_17_20/Resample.py +5 -5
  51. teradataml/data/docs/uaf/docs_17_20/SAX.py +3 -3
  52. teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
  53. teradataml/data/docs/uaf/docs_17_20/SimpleExp.py +1 -1
  54. teradataml/data/docs/uaf/docs_17_20/Smoothma.py +3 -3
  55. teradataml/data/docs/uaf/docs_17_20/UNDIFF.py +1 -1
  56. teradataml/data/jsons/byom/onnxembeddings.json +1 -0
  57. teradataml/data/jsons/sqle/17.20/NGramSplitter.json +6 -6
  58. teradataml/data/jsons/sqle/17.20/TD_Apriori.json +181 -0
  59. teradataml/data/jsons/sqle/17.20/TD_NERExtractor.json +145 -0
  60. teradataml/data/jsons/sqle/17.20/TD_SMOTE.json +267 -0
  61. teradataml/data/jsons/sqle/17.20/TD_TextMorph.json +134 -0
  62. teradataml/data/jsons/sqle/17.20/TD_TextParser.json +114 -9
  63. teradataml/data/jsons/sqle/20.00/AI_AnalyzeSentiment.json +328 -0
  64. teradataml/data/jsons/sqle/20.00/AI_AskLLM.json +420 -0
  65. teradataml/data/jsons/sqle/20.00/AI_DetectLanguage.json +343 -0
  66. teradataml/data/jsons/sqle/20.00/AI_ExtractKeyPhrases.json +328 -0
  67. teradataml/data/jsons/sqle/20.00/AI_MaskPII.json +328 -0
  68. teradataml/data/jsons/sqle/20.00/AI_RecognizeEntities.json +328 -0
  69. teradataml/data/jsons/sqle/20.00/AI_RecognizePIIEntities.json +328 -0
  70. teradataml/data/jsons/sqle/20.00/AI_TextClassifier.json +359 -0
  71. teradataml/data/jsons/sqle/20.00/AI_TextEmbeddings.json +360 -0
  72. teradataml/data/jsons/sqle/20.00/AI_TextSummarize.json +343 -0
  73. teradataml/data/jsons/sqle/20.00/AI_TextTranslate.json +343 -0
  74. teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +2 -2
  75. teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +1 -1
  76. teradataml/data/ner_dict.csv +8 -0
  77. teradataml/data/ner_input_eng.csv +7 -0
  78. teradataml/data/ner_rule.csv +5 -0
  79. teradataml/data/pattern_matching_data.csv +11 -0
  80. teradataml/data/pos_input.csv +40 -0
  81. teradataml/data/sdk/modelops/modelops_spec.json +101737 -0
  82. teradataml/data/tdnerextractor_example.json +14 -0
  83. teradataml/data/teradataml_example.json +21 -1
  84. teradataml/data/textmorph_example.json +5 -0
  85. teradataml/data/to_num_data.csv +4 -0
  86. teradataml/data/tochar_data.csv +5 -0
  87. teradataml/data/trans_dense.csv +16 -0
  88. teradataml/data/trans_sparse.csv +55 -0
  89. teradataml/data/url_data.csv +10 -9
  90. teradataml/dataframe/copy_to.py +38 -27
  91. teradataml/dataframe/data_transfer.py +61 -45
  92. teradataml/dataframe/dataframe.py +1110 -132
  93. teradataml/dataframe/dataframe_utils.py +73 -27
  94. teradataml/dataframe/functions.py +1070 -9
  95. teradataml/dataframe/sql.py +750 -959
  96. teradataml/dbutils/dbutils.py +33 -13
  97. teradataml/dbutils/filemgr.py +14 -10
  98. teradataml/hyperparameter_tuner/utils.py +4 -2
  99. teradataml/lib/aed_0_1.dll +0 -0
  100. teradataml/opensource/_base.py +12 -157
  101. teradataml/options/configure.py +24 -9
  102. teradataml/scriptmgmt/UserEnv.py +317 -39
  103. teradataml/scriptmgmt/lls_utils.py +456 -135
  104. teradataml/sdk/README.md +79 -0
  105. teradataml/sdk/__init__.py +4 -0
  106. teradataml/sdk/_auth_modes.py +422 -0
  107. teradataml/sdk/_func_params.py +487 -0
  108. teradataml/sdk/_json_parser.py +453 -0
  109. teradataml/sdk/_openapi_spec_constants.py +249 -0
  110. teradataml/sdk/_utils.py +236 -0
  111. teradataml/sdk/api_client.py +897 -0
  112. teradataml/sdk/constants.py +62 -0
  113. teradataml/sdk/modelops/__init__.py +98 -0
  114. teradataml/sdk/modelops/_client.py +406 -0
  115. teradataml/sdk/modelops/_constants.py +304 -0
  116. teradataml/sdk/modelops/models.py +2308 -0
  117. teradataml/sdk/spinner.py +107 -0
  118. teradataml/store/__init__.py +1 -1
  119. teradataml/table_operators/Apply.py +16 -1
  120. teradataml/table_operators/Script.py +20 -1
  121. teradataml/table_operators/query_generator.py +4 -21
  122. teradataml/table_operators/table_operator_util.py +58 -9
  123. teradataml/utils/dtypes.py +4 -2
  124. teradataml/utils/internal_buffer.py +22 -2
  125. teradataml/utils/utils.py +0 -1
  126. teradataml/utils/validators.py +318 -58
  127. {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.6.dist-info}/METADATA +188 -14
  128. {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.6.dist-info}/RECORD +131 -84
  129. {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.6.dist-info}/WHEEL +0 -0
  130. {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.6.dist-info}/top_level.txt +0 -0
  131. {teradataml-20.0.0.4.dist-info → teradataml-20.0.0.6.dist-info}/zip-safe +0 -0
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 2024, Teradata. All Rights Reserved.
9
+ Copyright 2025, Teradata. All Rights Reserved.
10
10
 
11
11
  ### Table of Contents
12
12
  * [Release Notes](#release-notes)
@@ -17,10 +17,179 @@ Copyright 2024, Teradata. All Rights Reserved.
17
17
 
18
18
  ## Release Notes:
19
19
 
20
+ #### teradataml 20.00.00.06
21
+ * ##### New Features/Functionality
22
+ * ###### teradataml: SDK
23
+ * Added new client `teradataml.sdk.Client` which can be used by user to make REST calls through SDK.
24
+ * New exception added in `teradataml`, specifically for REST APIs `TeradatamlRestException` that has attribute `json_resonse` providing proper printable json.
25
+ * Exposed three different ways of authentication through `Client`.
26
+ * Client credentials Authentication through `ClientCredentialsAuth` class.
27
+ * Device code Authentication through `DeviceCodeAuth` class.
28
+ * Bearer Authentication through `BearerAuth` class.
29
+
30
+ * ###### teradataml: ModelOps SDK
31
+ * `teradataml` exposes Python interfaces for all the REST APIs provided by Teradata Vantage ModelOps.
32
+ * Added support for `blueprint()` method which prints available classes in `modelops` module.
33
+ * Added new client `ModelOpsClient` with some additional function compared to `teradataml.sdk.Client`.
34
+ * teradataml classes are added for the schema in ModelOps OpenAPI specification.
35
+ ```python
36
+ >>> from teradataml.sdk.modelops import ModelOpsClient, Projects
37
+ >>> from teradataml.common.exceptions import TeradatamlRestException
38
+ >>> from teradataml.sdk import DeviceCodeAuth, BearerAuth, ClientCredentialsAuth # Authentication related classes.
39
+ >>> from teradataml.sdk.modelops import models # All classes related to OpenAPI schema are present in this module.
40
+
41
+ # Print available classes in modelops module.
42
+ >>> from teradataml.sdk.modelops import blueprint
43
+ >>> blueprint()
44
+
45
+ # Create ClientCredentialsAuth object and create ModelOpsClient object.
46
+ >>> cc_obj = ClientCredentialsAuth(auth_client_id="<client_id>",
47
+ auth_client_secret="<client_secret>",
48
+ auth_token_url="https://<example.com>/token")
49
+ >>> client = ModelOpsClient(base_url="<base_url>", auth=cc_obj, ssl_verify=False)
50
+
51
+ # Create Projects object.
52
+ >>> p = Projects(client=client)
53
+
54
+ # Create project using `body` argument taking object of ProjectRequestBody.
55
+ >>> project_paylod = {
56
+ "name": "dummy_project",
57
+ "description": "dummy_project created for testing",
58
+ "groupId": "<group_ID>",
59
+ "gitRepositoryUrl": "/app/built-in/empty",
60
+ "branch": "<branch>"
61
+ }
62
+ >>> p.create_project(body=models.ProjectRequestBody(**project_payload))
63
+ ```
64
+
65
+ * ###### teradataml: Functions
66
+ * `get_formatters()` - Get the formatters for NUMERIC, DATE and CHAR types.
67
+
68
+ * ###### teradataml: DataFrame Methods
69
+ * `get_snapshot()` - Gets the snapshot data of a teradataml DataFrame created on OTF table for a given snapshot id or timestamp.
70
+ * `from_pandas()`: Creates a teradataml DataFrame from a pandas DataFrame.
71
+ * `from_records()`: Creates a teradataml DataFrame from a list.
72
+ * `from_dict()`: Creates a teradataml DataFrame from a dictionary.
73
+
74
+ * ###### teradataml: DataFrame Property
75
+ * `history` - Returns snapshot history for a DataFrame created on OTF table.
76
+ * `manifests` - Returns manifest information for a DataFrame created on OTF table.
77
+ * `partitions` - Returns partition information for a DataFrame created on OTF table.
78
+ * `snapshots` - Returns snapshot information for a DataFrame created on OTF table.
79
+
80
+ * ###### teradataml DataFrameColumn a.k.a. ColumnExpression
81
+ * `DataFrameColumn.rlike()` - Function to match a string against a regular expression pattern.
82
+ * `DataFrameColumn.substring_index()` - Function to return the substring from a column before a specified
83
+ delimiter, up to a given occurrence count.
84
+ * `DataFrameColumn.count_delimiters()` - Function to count the total number of occurrences of a specified delimiter.
85
+
86
+ * ##### Updates
87
+ * ###### teradataml DataFrameColumn a.k.a. ColumnExpression
88
+ * `DataFrameColumn.like()`
89
+ * Added argument `escape_char` to specify the escape character for the LIKE pattern.
90
+ * Argument `pattern` now accepts DataFrameColumn as input.
91
+ * `DataFrameColumn.ilike()`
92
+ * Added argument `escape_char` to specify the escape character for the ILIKE pattern.
93
+ * Argument `pattern` now accepts DataFrameColumn as input.
94
+ * `DataFrameColumn.parse_url()` - Added argument `key` to extract a specific query parameter when `url_part` is set to "QUERY".
95
+
96
+ * ###### teradataml: DataFrame function
97
+ * `groupby()`, `cube()` and `rollup()`
98
+ * Added argument `include_grouping_columns` to include aggregations on the grouping column(s).
99
+ * `DataFrame()`: New argument `data`, that accepts input data to create a teradataml DataFrame, is added.
100
+
101
+ * ###### General functions
102
+ * `set_auth_token()`
103
+ * New keyword argument `auth_url` accepts the endpoint URL for a keycloak server.
104
+ * New keyword argument `rest_client` accepts name of the service for which keycloak token is to be generated.
105
+ * New keyword argument `validate_jwt` accepts the boolean flag to decide whether to validate generated JWT token or not.
106
+ * New keyword argument `valid_from` accepts the epoch seconds representing time from which JWT token will be valid.
107
+
108
+ * ###### teradataml Options
109
+ * Configuration Options
110
+ * `configure.use_short_object_name`
111
+ Specifies whether to use a shorter name for temporary database objects which are created by teradataml internally.
112
+
113
+ * ###### BYOM Function
114
+ * Supports special characters.
115
+
116
+ #### teradataml 20.00.00.05
117
+ * ##### New Features/Functionality
118
+ * ##### teradataml: AutoML
119
+ * New methods added for `AutoML()`, `AutoRegressor()` and `AutoClassifier()`:
120
+ * `get_persisted_tables()` - List the persisted tables created during AutoML execution.
121
+ * `visualize()` - Generates visualizations to analyze and understand the underlying patterns in the data.
122
+
123
+ * ##### AutoDataPrep - Automated Data Preparation
124
+ AutoDataPrep simplifies the data preparation process by automating the different aspects of
125
+ data cleaning and transformation, enabling seamless exploration, transformation, and optimization of datasets.
126
+ * `AutoDataPrep`
127
+ * Methods of AutoDataPrep
128
+ * `__init__()` - Instantiate an object of AutoDataPrep with given parameters.
129
+ * `fit()` - Perform fit on specified data and target column.
130
+ * `get_data()` - Retrieve the data after AutoDataPrep.
131
+ * `load()` - Load the saved datasets from Teradata Vantage.
132
+ * `deploy()` - Persist the datasets generated by AutoDataPrep in Teradata Vantage.
133
+ * `delete_data()` - Deletes the deployed dataset from the Teradata Vantage.
134
+ * `visualize()` - Generates visualizations to analyze and understand the underlying patterns in the data.
135
+
136
+ * ##### teradataml: SQLE Engine Analytic Functions
137
+ * New Analytics Database Analytic Functions:
138
+ * `Apriori()`
139
+ * `NERExtractor()`
140
+ * `TextMorph()`
141
+
142
+ * ##### teradataml: Functions
143
+ * `td_range()` - Creates a DataFrame with a specified range of numbers.
144
+
145
+ * ##### teradataml DataFrameColumn a.k.a. ColumnExpression
146
+ * `DataFrameColumn.to_number()` - Function converts a string-like representation of a number to NUMBER type.
147
+
148
+ * ##### Updates
149
+ * ###### teradataml: DataFrame function
150
+ * `DataFrame.agg()`: User can request for different percentiles while running agg function.
151
+ * 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.
152
+ * `map_row()`, `map_partition()` and `apply()`
153
+ * Raises a TeradataMlException, if the Python interpreter major version is different between the Vantage Python environment and the local user environment.
154
+ * Displays a warning, if `dill` package version is different between the Vantage Python environment and the local user environment.
155
+ * `DataFrame.describe()`: Argument `include` is no longer supported.
156
+ * `assign()` - Optimized SQL query to enhance the performance for consecutive assign calls.
157
+
158
+ * ###### teradataml: Context Creation
159
+ * `create_context()`
160
+ * Enables user to set the authentication token while creating the connection. This authentication token is required to access services running on Teradata Vantage.
161
+ * New argument `sql_timeout` is added to specify timeout for SQL statement execution triggered from the current session.
162
+
163
+ * ###### teradataml: UAF Functions
164
+ * Integer type value is now accepted as a valid value for function arguments accepting float type.
165
+
166
+ * ###### General functions
167
+ * `set_auth_token()`
168
+ * Added argument `kid` to accept the name of the key used while generating `pem_file`.
169
+ * New keyword argument `auth_mech` accepts the authentication mechanism to be used for generating authentication token.
170
+ * Basic authentication is now supported as well. New keyword argument `password` accepts password for database user in such case.
171
+ * `copy_to_sql()` and `read_csv()` support the VECTOR data type.
172
+
173
+ * ###### Open Analytics Framework (OpenAF) APIs:
174
+ * `create_env()`:
175
+ * Supports creation of conda R environment.
176
+
177
+ * ###### teradataml DataFrameColumn a.k.a. ColumnExpression
178
+ * _String Functions_
179
+ * `DataFrameColumn.substr()` - Arguments `start_pos` and `length` now accept DataFrameColumn as input.
180
+ * `DataFrameColumn.to_char()` - Argument `formatter` now accepts DataFrameColumn as input.
181
+
182
+ * ###### teradataml: SQLE Engine Analytic Functions
183
+ * Updated Analytics Database Analytic Functions:
184
+ * `SMOTE()` is now supported on 17.20.00.00 as well.
185
+ * `TextParser()`
186
+ * New arguments added: `enforce_token_limit`, `delimiter_regex`, `doc_id_column`,
187
+ `list_positions`, `token_frequency`, `output_by_word`
188
+
20
189
  #### teradataml 20.00.00.04
21
190
  * ##### New Features/Functionality
22
191
  * ###### teradataml OTF Support:
23
- * This release has enabled the support for accessing OTF data from teradataml.
192
+ * This release has enabled the support for accessing OTF data from teradataml.
24
193
  * User can now create a teradataml DataFrame on OTF table, allowing user to use teradataml functions.
25
194
  * Example usage below:
26
195
  * 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 +217,7 @@ Copyright 2024, Teradata. All Rights Reserved.
48
217
  ```
49
218
  * ###### teradataml: DataFrame
50
219
  * 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
220
+ the user experience of teradataml with Jupyter notebook. EDA-UI is displayed by default
52
221
  when a teradataml DataFrame is printed in the Jupyter notebook.
53
222
  * User can control the EDA-UI using a new configuration option `display.enable_ui`.
54
223
  It can be disabled by setting `display.enable_ui` to False.
@@ -65,7 +234,7 @@ Copyright 2024, Teradata. All Rights Reserved.
65
234
  * `td_lightgbm.load()` - Load the deployed model in the current session.
66
235
 
67
236
  * ###### FeatureStore
68
- * New function `FeatureStore.delete()` is added to drop the Feature Store and corresponding repo from Vantage.
237
+ * New function `FeatureStore.delete()` is added to drop the Feature Store and corresponding repo from Vantage.
69
238
 
70
239
  * ###### Database Utility
71
240
  * `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 +247,13 @@ Copyright 2024, Teradata. All Rights Reserved.
78
247
  * Configuration Options
79
248
  * `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
249
  * 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.
250
+ * `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
251
 
83
252
  * ##### Updates
84
253
  * ###### teradataml: DataFrame function
85
254
  * `describe()`
86
255
  * New argument added: `pivot`.
87
- * When argument `pivot` is set to False, Non-numeric columns are no longer supported for generating statistics.
256
+ * When argument `pivot` is set to False, Non-numeric columns are no longer supported for generating statistics.
88
257
  Use `CategoricalSummary` and `ColumnSummary`.
89
258
  * `fillna()` - Accepts new argument `partition_column` to partition the data and impute null values accordingly.
90
259
  * Optimised performance for `DataFrame.plot()`.
@@ -94,9 +263,9 @@ Copyright 2024, Teradata. All Rights Reserved.
94
263
  * ###### teradataml: DataFrame Utilities
95
264
  * `in_schema()`: New argument `datalake_name` added to accept datalake name.
96
265
 
97
- * ###### Table Operator
98
- * `Apply()` no longer looks at authentication token by default. Authentication token is now required only if user want to update backend Open Analytics Framework service.
99
-
266
+ * ###### Table Operator
267
+ * `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.
268
+
100
269
  * ###### Hyper Parameter Tuner
101
270
  * `GridSearch()` and `RandomSearch()` now displays a message to refer to `get_error_log()` api when model training fails in HPT.
102
271
 
@@ -104,7 +273,7 @@ Copyright 2024, Teradata. All Rights Reserved.
104
273
  * Configuration Options
105
274
  * `configure.indb_install_location`
106
275
  Determines the installation location of the In-DB Python package based on the installed RPM version.
107
-
276
+
108
277
  * ###### teradataml Context Creation
109
278
  * `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
279
 
@@ -113,7 +282,7 @@ Copyright 2024, Teradata. All Rights Reserved.
113
282
 
114
283
  * ###### OpensourceML
115
284
  * 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.
285
+ * Displays a warning, if specific Python package versions are different between the Vantage Python environment and the local user environment.
117
286
 
118
287
  * ###### Database Utility
119
288
  * `db_list_tables()`: New argument `datalake_name` added to accept datalake name to list tables from.
@@ -131,10 +300,10 @@ Copyright 2024, Teradata. All Rights Reserved.
131
300
  * `DataFrame.set_index()` no longer modifies the original DataFrame's index when argument `append` is used.
132
301
  * `concat()` function now supports the DataFrame with column name starts with digit or contains special characters or contains reserved keywords.
133
302
  * `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.
303
+ * Corrected the error message being raised in `create_env()` when authentication token is not set.
135
304
  * Added missing argument `charset` for Vantage Analytic Library functions.
136
305
  * 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 is non-ascii characters.
306
+ * Analytic functions now work even if name of columns for underlying tables has non-ascii characters.
138
307
 
139
308
  #### teradataml 20.00.00.03
140
309
 
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 and VectorStore
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 2024 Teradata. All rights reserved.
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.04"
11
+ version = "20.00.00.06"
@@ -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(),
@@ -489,7 +490,7 @@ class _AnlyticFunctionExecutor:
489
490
  arg_value = self._spl_func_obj._add_square_bracket(arg_value)
490
491
 
491
492
  # Check if there are columns with non-ASCII characters.
492
- if UtilFuncs._is_ascii(arg_value):
493
+ if UtilFuncs._is_non_ascii(arg_value):
493
494
  arg_value = UtilFuncs._teradata_quote_arg(arg_value, "\"", False)
494
495
  # Handling special case for Teradata reserved keywords or column names with spaces.
495
496
  # If argument is a string or list of strings, then add quotes to the string.
@@ -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
- if (isinstance(arg_value, list) and len(arg_value) != required_length) or\
1953
- (not isinstance(arg_value, list)):
1954
- raise TeradataMlException(Messages.get_message(
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
- if (isinstance(arg_value, list) and len(arg_value) != required_length) or\
2287
- (not isinstance(arg_value, list)):
2288
- raise TeradataMlException(Messages.get_message(
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 = ['ANOVA',
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:
@@ -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,9 +458,65 @@ 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},
473
+ "DataikuPredict": {"accumulate": self._handle_byom_args},
474
+ "DataRobotPredict": {"accumulate": self._handle_byom_args},
475
+ "H2OPredict": {"accumulate": self._handle_byom_args},
476
+ "ONNXEmbeddings": {"accumulate": self._handle_byom_args},
477
+ "ONNXPredict": {"accumulate": self._handle_byom_args},
478
+ "PMMLPredict": {"accumulate": self._handle_byom_args}
459
479
  }
460
480
 
481
+ def _handle_byom_args(self, arg_value, *args, **kwargs):
482
+ """
483
+ DESCRIPTION:
484
+ Function to handle the special function arguments for BYOM functions.
485
+ Special character(s) are required to be in single quote for BYOM
486
+ functions. For other SQLE functions, special character(s) to be in double
487
+ quote. Hence removing double quotes and adding single quotes for
488
+ special character(s) in the argument value.
489
+
490
+ PARAMETERS:
491
+ arg_value
492
+ Required Argument.
493
+ Specifies the argument value to handle special function arguments.
494
+ Types: str or list of str(s)
495
+
496
+ RETURNS:
497
+ str
498
+
499
+ RAISES:
500
+ None
501
+
502
+ EXAMPLES:
503
+ # Example 1: Handle the special function arguments for BYOM functions.
504
+ >>> self._handle_byom_args('"alice.deauth"')
505
+ # result: 'alice.deauth'
506
+ """
507
+ arg_values = []
508
+ if isinstance(arg_value, list):
509
+ arg_values = (val.strip('"') for val in arg_value)
510
+ return ", ".join(["'{}'".format(val) for val in arg_values])
511
+
512
+ if isinstance(arg_value, str):
513
+ # If argument value is a string, remove quotes.
514
+ arg_value = arg_value.strip('"')
515
+ return "'{}'".format(arg_value)
516
+
517
+ return arg_value
518
+
519
+
461
520
  # Setter method for argument.
462
521
  def set_arg_name(self, argument):
463
522
  """