teradataml 20.0.0.1__py3-none-any.whl → 20.0.0.3__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 (240) hide show
  1. teradataml/LICENSE-3RD-PARTY.pdf +0 -0
  2. teradataml/LICENSE.pdf +0 -0
  3. teradataml/README.md +306 -0
  4. teradataml/__init__.py +10 -3
  5. teradataml/_version.py +1 -1
  6. teradataml/analytics/__init__.py +3 -2
  7. teradataml/analytics/analytic_function_executor.py +299 -16
  8. teradataml/analytics/analytic_query_generator.py +92 -0
  9. teradataml/analytics/byom/__init__.py +3 -2
  10. teradataml/analytics/json_parser/metadata.py +13 -3
  11. teradataml/analytics/json_parser/utils.py +13 -6
  12. teradataml/analytics/meta_class.py +40 -1
  13. teradataml/analytics/sqle/DecisionTreePredict.py +1 -1
  14. teradataml/analytics/sqle/__init__.py +11 -2
  15. teradataml/analytics/table_operator/__init__.py +4 -3
  16. teradataml/analytics/uaf/__init__.py +21 -2
  17. teradataml/analytics/utils.py +66 -1
  18. teradataml/analytics/valib.py +1 -1
  19. teradataml/automl/__init__.py +1502 -323
  20. teradataml/automl/custom_json_utils.py +139 -61
  21. teradataml/automl/data_preparation.py +247 -307
  22. teradataml/automl/data_transformation.py +32 -12
  23. teradataml/automl/feature_engineering.py +325 -86
  24. teradataml/automl/model_evaluation.py +44 -35
  25. teradataml/automl/model_training.py +122 -153
  26. teradataml/catalog/byom.py +8 -8
  27. teradataml/clients/pkce_client.py +1 -1
  28. teradataml/common/__init__.py +2 -1
  29. teradataml/common/constants.py +72 -0
  30. teradataml/common/deprecations.py +13 -7
  31. teradataml/common/garbagecollector.py +152 -120
  32. teradataml/common/messagecodes.py +11 -2
  33. teradataml/common/messages.py +4 -1
  34. teradataml/common/sqlbundle.py +26 -4
  35. teradataml/common/utils.py +225 -14
  36. teradataml/common/wrapper_utils.py +1 -1
  37. teradataml/context/context.py +82 -2
  38. teradataml/data/SQL_Fundamentals.pdf +0 -0
  39. teradataml/data/complaints_test_tokenized.csv +353 -0
  40. teradataml/data/complaints_tokens_model.csv +348 -0
  41. teradataml/data/covid_confirm_sd.csv +83 -0
  42. teradataml/data/dataframe_example.json +27 -1
  43. teradataml/data/docs/sqle/docs_17_20/CFilter.py +132 -0
  44. teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +162 -0
  45. teradataml/data/docs/sqle/docs_17_20/OutlierFilterFit.py +2 -0
  46. teradataml/data/docs/sqle/docs_17_20/Pivoting.py +279 -0
  47. teradataml/data/docs/sqle/docs_17_20/Shap.py +203 -0
  48. teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +189 -0
  49. teradataml/data/docs/sqle/docs_17_20/TFIDF.py +142 -0
  50. teradataml/data/docs/sqle/docs_17_20/TextParser.py +3 -3
  51. teradataml/data/docs/sqle/docs_17_20/Unpivoting.py +216 -0
  52. teradataml/data/docs/tableoperator/docs_17_20/Image2Matrix.py +118 -0
  53. teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -10
  54. teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +1 -1
  55. teradataml/data/docs/uaf/docs_17_20/ArimaForecast.py +35 -5
  56. teradataml/data/docs/uaf/docs_17_20/ArimaValidate.py +3 -1
  57. teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +293 -0
  58. teradataml/data/docs/uaf/docs_17_20/AutoArima.py +354 -0
  59. teradataml/data/docs/uaf/docs_17_20/BreuschGodfrey.py +3 -2
  60. teradataml/data/docs/uaf/docs_17_20/BreuschPaganGodfrey.py +1 -1
  61. teradataml/data/docs/uaf/docs_17_20/Convolve.py +13 -10
  62. teradataml/data/docs/uaf/docs_17_20/Convolve2.py +4 -1
  63. teradataml/data/docs/uaf/docs_17_20/CopyArt.py +145 -0
  64. teradataml/data/docs/uaf/docs_17_20/CumulPeriodogram.py +5 -4
  65. teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +4 -4
  66. teradataml/data/docs/uaf/docs_17_20/DWT.py +235 -0
  67. teradataml/data/docs/uaf/docs_17_20/DWT2D.py +214 -0
  68. teradataml/data/docs/uaf/docs_17_20/DickeyFuller.py +18 -21
  69. teradataml/data/docs/uaf/docs_17_20/DurbinWatson.py +1 -1
  70. teradataml/data/docs/uaf/docs_17_20/ExtractResults.py +1 -1
  71. teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +160 -0
  72. teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +1 -1
  73. teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +9 -31
  74. teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +4 -2
  75. teradataml/data/docs/uaf/docs_17_20/IDFFT2.py +1 -8
  76. teradataml/data/docs/uaf/docs_17_20/IDWT.py +236 -0
  77. teradataml/data/docs/uaf/docs_17_20/IDWT2D.py +226 -0
  78. teradataml/data/docs/uaf/docs_17_20/IQR.py +134 -0
  79. teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
  80. teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +2 -2
  81. teradataml/data/docs/uaf/docs_17_20/MAMean.py +3 -3
  82. teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +297 -0
  83. teradataml/data/docs/uaf/docs_17_20/MatrixMultiply.py +15 -6
  84. teradataml/data/docs/uaf/docs_17_20/PACF.py +0 -1
  85. teradataml/data/docs/uaf/docs_17_20/Portman.py +2 -2
  86. teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
  87. teradataml/data/docs/uaf/docs_17_20/Resample.py +9 -1
  88. teradataml/data/docs/uaf/docs_17_20/SAX.py +246 -0
  89. teradataml/data/docs/uaf/docs_17_20/SeasonalNormalize.py +17 -10
  90. teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
  91. teradataml/data/docs/uaf/docs_17_20/WhitesGeneral.py +3 -1
  92. teradataml/data/docs/uaf/docs_17_20/WindowDFFT.py +368 -0
  93. teradataml/data/dwt2d_dataTable.csv +65 -0
  94. teradataml/data/dwt_dataTable.csv +8 -0
  95. teradataml/data/dwt_filterTable.csv +3 -0
  96. teradataml/data/finance_data4.csv +13 -0
  97. teradataml/data/grocery_transaction.csv +19 -0
  98. teradataml/data/idwt2d_dataTable.csv +5 -0
  99. teradataml/data/idwt_dataTable.csv +8 -0
  100. teradataml/data/idwt_filterTable.csv +3 -0
  101. teradataml/data/interval_data.csv +5 -0
  102. teradataml/data/jsons/paired_functions.json +14 -0
  103. teradataml/data/jsons/sqle/17.20/TD_CFilter.json +118 -0
  104. teradataml/data/jsons/sqle/17.20/TD_NaiveBayes.json +193 -0
  105. teradataml/data/jsons/sqle/17.20/TD_NaiveBayesPredict.json +212 -0
  106. teradataml/data/jsons/sqle/17.20/TD_OneClassSVM.json +9 -9
  107. teradataml/data/jsons/sqle/17.20/TD_Pivoting.json +280 -0
  108. teradataml/data/jsons/sqle/17.20/TD_Shap.json +222 -0
  109. teradataml/data/jsons/sqle/17.20/TD_TFIDF.json +162 -0
  110. teradataml/data/jsons/sqle/17.20/TD_TextParser.json +1 -1
  111. teradataml/data/jsons/sqle/17.20/TD_Unpivoting.json +235 -0
  112. teradataml/data/jsons/sqle/20.00/TD_KMeans.json +250 -0
  113. teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +266 -0
  114. teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +278 -0
  115. teradataml/data/jsons/storedprocedure/17.20/TD_COPYART.json +71 -0
  116. teradataml/data/jsons/storedprocedure/17.20/TD_FILTERFACTORY1D.json +150 -0
  117. teradataml/data/jsons/tableoperator/17.20/IMAGE2MATRIX.json +53 -0
  118. teradataml/data/jsons/uaf/17.20/TD_ACF.json +1 -18
  119. teradataml/data/jsons/uaf/17.20/TD_ARIMAESTIMATE.json +3 -16
  120. teradataml/data/jsons/uaf/17.20/TD_ARIMAFORECAST.json +0 -3
  121. teradataml/data/jsons/uaf/17.20/TD_ARIMAVALIDATE.json +5 -3
  122. teradataml/data/jsons/uaf/17.20/TD_ARIMAXESTIMATE.json +362 -0
  123. teradataml/data/jsons/uaf/17.20/TD_AUTOARIMA.json +469 -0
  124. teradataml/data/jsons/uaf/17.20/TD_BINARYMATRIXOP.json +0 -3
  125. teradataml/data/jsons/uaf/17.20/TD_BINARYSERIESOP.json +0 -2
  126. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_GODFREY.json +2 -1
  127. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_PAGAN_GODFREY.json +2 -5
  128. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE.json +3 -6
  129. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE2.json +1 -3
  130. teradataml/data/jsons/uaf/17.20/TD_CUMUL_PERIODOGRAM.json +0 -5
  131. teradataml/data/jsons/uaf/17.20/TD_DFFT.json +1 -4
  132. teradataml/data/jsons/uaf/17.20/TD_DFFT2.json +2 -7
  133. teradataml/data/jsons/uaf/17.20/TD_DFFT2CONV.json +1 -2
  134. teradataml/data/jsons/uaf/17.20/TD_DFFTCONV.json +0 -2
  135. teradataml/data/jsons/uaf/17.20/TD_DICKEY_FULLER.json +10 -19
  136. teradataml/data/jsons/uaf/17.20/TD_DTW.json +3 -6
  137. teradataml/data/jsons/uaf/17.20/TD_DWT.json +173 -0
  138. teradataml/data/jsons/uaf/17.20/TD_DWT2D.json +160 -0
  139. teradataml/data/jsons/uaf/17.20/TD_FITMETRICS.json +1 -1
  140. teradataml/data/jsons/uaf/17.20/TD_GOLDFELD_QUANDT.json +16 -30
  141. teradataml/data/jsons/uaf/17.20/{TD_HOLT_WINTERS_FORECAST.json → TD_HOLT_WINTERS_FORECASTER.json} +1 -2
  142. teradataml/data/jsons/uaf/17.20/TD_IDFFT2.json +1 -15
  143. teradataml/data/jsons/uaf/17.20/TD_IDWT.json +162 -0
  144. teradataml/data/jsons/uaf/17.20/TD_IDWT2D.json +149 -0
  145. teradataml/data/jsons/uaf/17.20/TD_IQR.json +117 -0
  146. teradataml/data/jsons/uaf/17.20/TD_LINEAR_REGR.json +1 -1
  147. teradataml/data/jsons/uaf/17.20/TD_LINESPEC.json +1 -1
  148. teradataml/data/jsons/uaf/17.20/TD_MAMEAN.json +1 -3
  149. teradataml/data/jsons/uaf/17.20/TD_MATRIX2IMAGE.json +209 -0
  150. teradataml/data/jsons/uaf/17.20/TD_PACF.json +2 -2
  151. teradataml/data/jsons/uaf/17.20/TD_POWERSPEC.json +5 -5
  152. teradataml/data/jsons/uaf/17.20/TD_RESAMPLE.json +48 -28
  153. teradataml/data/jsons/uaf/17.20/TD_SAX.json +210 -0
  154. teradataml/data/jsons/uaf/17.20/TD_SEASONALNORMALIZE.json +12 -6
  155. teradataml/data/jsons/uaf/17.20/TD_SIMPLEEXP.json +0 -1
  156. teradataml/data/jsons/uaf/17.20/TD_TRACKINGOP.json +8 -8
  157. teradataml/data/jsons/uaf/17.20/TD_UNDIFF.json +1 -1
  158. teradataml/data/jsons/uaf/17.20/TD_UNNORMALIZE.json +1 -1
  159. teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +410 -0
  160. teradataml/data/load_example_data.py +8 -2
  161. teradataml/data/medical_readings.csv +101 -0
  162. teradataml/data/naivebayestextclassifier_example.json +1 -1
  163. teradataml/data/naivebayestextclassifierpredict_example.json +11 -0
  164. teradataml/data/patient_profile.csv +101 -0
  165. teradataml/data/peppers.png +0 -0
  166. teradataml/data/real_values.csv +14 -0
  167. teradataml/data/sax_example.json +8 -0
  168. teradataml/data/scripts/deploy_script.py +1 -1
  169. teradataml/data/scripts/lightgbm/dataset.template +157 -0
  170. teradataml/data/scripts/lightgbm/lightgbm_class_functions.template +247 -0
  171. teradataml/data/scripts/lightgbm/lightgbm_function.template +216 -0
  172. teradataml/data/scripts/lightgbm/lightgbm_sklearn.template +159 -0
  173. teradataml/data/scripts/sklearn/sklearn_fit.py +194 -160
  174. teradataml/data/scripts/sklearn/sklearn_fit_predict.py +136 -115
  175. teradataml/data/scripts/sklearn/sklearn_function.template +34 -16
  176. teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +155 -137
  177. teradataml/data/scripts/sklearn/sklearn_neighbors.py +1 -1
  178. teradataml/data/scripts/sklearn/sklearn_score.py +12 -3
  179. teradataml/data/scripts/sklearn/sklearn_transform.py +162 -24
  180. teradataml/data/star_pivot.csv +8 -0
  181. teradataml/data/target_udt_data.csv +8 -0
  182. teradataml/data/templates/open_source_ml.json +3 -1
  183. teradataml/data/teradataml_example.json +20 -1
  184. teradataml/data/timestamp_data.csv +4 -0
  185. teradataml/data/titanic_dataset_unpivoted.csv +19 -0
  186. teradataml/data/uaf_example.json +55 -1
  187. teradataml/data/unpivot_example.json +15 -0
  188. teradataml/data/url_data.csv +9 -0
  189. teradataml/data/vectordistance_example.json +4 -0
  190. teradataml/data/windowdfft.csv +16 -0
  191. teradataml/dataframe/copy_to.py +1 -1
  192. teradataml/dataframe/data_transfer.py +5 -3
  193. teradataml/dataframe/dataframe.py +1002 -201
  194. teradataml/dataframe/fastload.py +3 -3
  195. teradataml/dataframe/functions.py +867 -0
  196. teradataml/dataframe/row.py +160 -0
  197. teradataml/dataframe/setop.py +2 -2
  198. teradataml/dataframe/sql.py +840 -33
  199. teradataml/dataframe/window.py +1 -1
  200. teradataml/dbutils/dbutils.py +878 -34
  201. teradataml/dbutils/filemgr.py +48 -1
  202. teradataml/geospatial/geodataframe.py +1 -1
  203. teradataml/geospatial/geodataframecolumn.py +1 -1
  204. teradataml/hyperparameter_tuner/optimizer.py +13 -13
  205. teradataml/lib/aed_0_1.dll +0 -0
  206. teradataml/opensource/__init__.py +1 -1
  207. teradataml/opensource/{sklearn/_class.py → _class.py} +102 -17
  208. teradataml/opensource/_lightgbm.py +950 -0
  209. teradataml/opensource/{sklearn/_wrapper_utils.py → _wrapper_utils.py} +1 -2
  210. teradataml/opensource/{sklearn/constants.py → constants.py} +13 -10
  211. teradataml/opensource/sklearn/__init__.py +0 -1
  212. teradataml/opensource/sklearn/_sklearn_wrapper.py +1019 -574
  213. teradataml/options/__init__.py +9 -23
  214. teradataml/options/configure.py +42 -4
  215. teradataml/options/display.py +2 -2
  216. teradataml/plot/axis.py +4 -4
  217. teradataml/scriptmgmt/UserEnv.py +13 -9
  218. teradataml/scriptmgmt/lls_utils.py +77 -23
  219. teradataml/store/__init__.py +13 -0
  220. teradataml/store/feature_store/__init__.py +0 -0
  221. teradataml/store/feature_store/constants.py +291 -0
  222. teradataml/store/feature_store/feature_store.py +2223 -0
  223. teradataml/store/feature_store/models.py +1505 -0
  224. teradataml/store/vector_store/__init__.py +1586 -0
  225. teradataml/table_operators/Script.py +2 -2
  226. teradataml/table_operators/TableOperator.py +106 -20
  227. teradataml/table_operators/query_generator.py +3 -0
  228. teradataml/table_operators/table_operator_query_generator.py +3 -1
  229. teradataml/table_operators/table_operator_util.py +102 -56
  230. teradataml/table_operators/templates/dataframe_register.template +69 -0
  231. teradataml/table_operators/templates/dataframe_udf.template +63 -0
  232. teradataml/telemetry_utils/__init__.py +0 -0
  233. teradataml/telemetry_utils/queryband.py +52 -0
  234. teradataml/utils/dtypes.py +4 -2
  235. teradataml/utils/validators.py +34 -2
  236. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/METADATA +311 -3
  237. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/RECORD +240 -157
  238. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/WHEEL +0 -0
  239. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/top_level.txt +0 -0
  240. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/zip-safe +0 -0
@@ -2,7 +2,7 @@
2
2
  "FuncName": "TD_SEASONALNORMALIZE",
3
3
  "FuncDescriptionShort": "Generates a series has been normalized with respect to its internal period as a season and interval cycles",
4
4
  "FuncDescriptionLong": [
5
- "The function SeasonalNormalize() takes a non-stationary series and normalizes the series by removing the unit roots. The function can be used with any cyclic data that can be subdivided into a collection of logical periods, in which each period can be further subdivided into a collection of logical intervals."
5
+ "This section outlines the syntax associated with invoking the TD_SEASONALNORMALIZE, 'Seasonal Normalize' table function. The TD_SEASONALNORMALIZE function takes a logical-runtime series, with real number elements (containing the original series, Xt), as an input, with a SERIES_SPEC(INTERVAL()) and a FUNC_PARAMS(SEASON_CYCLE()) declaration, specifying the season and cycle duration respectively for data normalization. The function then generates a series having the same number of sample points as the input series, where the generated series has been normalized with respect to its internal period as a season and interval cycles. The data scientist can then perform a statistical test to see whether or not the generated series is stationary and thus ready to model."
6
6
  ],
7
7
  "FunctionVersion": "...",
8
8
  "FunctionCategory": "Model Preparation and Parameter Estimation",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "Type": "SERIES",
15
15
  "Description": [
16
- "Specifies a logical-runtime series, with real number elements."
16
+ "It takes a logical-runtime series, with real number elements (containing the original series, Xt), as an input"
17
17
  ],
18
18
  "LangName": "data or object or newdata or ... --> Langauges team can work with UAF team to come up with this field",
19
19
  "Optional": false
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "Description": [
49
49
  "A second layer ARTMETADATA payload contains the <mean, standardDeviation> for each payload column in the primary layer for a season. The prefix for the payload column is MEAN_ and SD_.",
50
- "The secondary result set can be accessed by issuing a TD_EXTRACT_RESULTS(…,LAYER(ARTFITMETADATA),…)",
50
+ "The secondary result set can be accessed by issuing a TD_EXTRACT_RESULTS(…,LAYER(ARTMETADATA),…)",
51
51
  ""
52
52
  ],
53
53
  "LangName": "data or object or newdata or ... --> Langauges team can work with UAF team to come up with this field"
@@ -99,7 +99,6 @@
99
99
  "LangName": "cycle_duration"
100
100
  }
101
101
  ]
102
-
103
102
  },
104
103
  {
105
104
  "Name": "SEASON_INFO",
@@ -113,7 +112,14 @@
113
112
  3
114
113
  ],
115
114
  "Description": [
116
- "Specifies whether to generate additional columns CYCLE_NO and SEASON_NO. CYCLE_NO is the n-th cycle of the season. SEASON_NO is the season for the data."
115
+ "This flag is used to generate additional columns CYCLE_NO and SEASON_NO.",
116
+ "SEASON_NO is the season for the data. The value starts from 1.",
117
+ "CYCLE_NO is the n-th cycle of the season. The value starts from 1.",
118
+ "The flag value is between 0 and 3.",
119
+ "0 - indicates no extra columns being generated.",
120
+ "1 - indicates SEASON_NO column being generated.",
121
+ "2 - indicates CYCLE_NO column being generated.",
122
+ "3 - indicates both SEASON_NO and CYCLE_NO columns being generated."
117
123
  ]
118
124
  }
119
125
  ],
@@ -129,7 +135,7 @@
129
135
  "FLOW_THROUGH"
130
136
  ],
131
137
  "Description": [
132
- "Specifies the index style of the output format."
138
+ "Specifies the INDEX_STYLE of the output format."
133
139
  ],
134
140
  "LangName": "output_fmt_index_style"
135
141
  }
@@ -93,7 +93,6 @@
93
93
  "AllowNaN": false,
94
94
  "Description": [
95
95
  "Number of Periods to Forecast ahead"
96
-
97
96
  ]
98
97
  },
99
98
  {
@@ -47,52 +47,52 @@
47
47
  "Name": "DISTANCE",
48
48
  "Type": "integer",
49
49
  "Optional": true,
50
+ "DefaultValue": 0,
50
51
  "PermittedValues": [
51
52
  0,
52
53
  1
53
54
  ],
54
- "DefaultValue": 0,
55
55
  "Description": [
56
- "'1' signifies true, meaning calculate the track distance; '0' is false; no action taken."
56
+ "Indicator to calculate the track distance. A value of 1 means to calculate. A value of 0 means do not calculate. Default value is 0."
57
57
  ]
58
58
  },
59
59
  {
60
60
  "Name": "SPEED",
61
61
  "Type": "integer",
62
62
  "Optional": true,
63
+ "DefaultValue": 0,
63
64
  "PermittedValues": [
64
65
  0,
65
66
  1
66
67
  ],
67
- "DefaultValue": 0,
68
68
  "Description": [
69
- "'1' signifies true, meaning calculate the trip's avg speed along with max and min speeds in that trip; '0' is false; no action taken."
69
+ "Indicator to calculate the average speed with maximum and minimum values. A value of 1 means to calculate. A value of 0 means do not calculate. Default value is 0."
70
70
  ]
71
71
  },
72
72
  {
73
73
  "Name": "TIME_SPENT",
74
74
  "Type": "integer",
75
75
  "Optional": true,
76
+ "DefaultValue": 0,
76
77
  "PermittedValues": [
77
78
  0,
78
79
  1
79
80
  ],
80
- "DefaultValue": 0,
81
81
  "Description": [
82
- "'1' signifies true, meaning calculate the total time spent of the trip; '0' is false; no action taken."
82
+ "Indicator to calculate the total time for the trip. A value of 1 means to calculate. A value of 0 means do not calculate. Default value is 0."
83
83
  ]
84
84
  },
85
85
  {
86
86
  "Name": "METRIC",
87
87
  "Type": "integer",
88
88
  "Optional": true,
89
+ "DefaultValue": 0,
89
90
  "PermittedValues": [
90
91
  0,
91
92
  1
92
93
  ],
93
- "DefaultValue": 0,
94
94
  "Description": [
95
- "'1' signifies true, meaning that the distance and speed should be expressed in kilometer and Km/Hr; '0' signifies 'false', meaning that the distance and speed should be expressed in miles and miles/Hr"
95
+ "Indicator to use metric distance and time. A value of 1 means to use kilometers. A value of 0 means to use miles. Default value is 0."
96
96
  ]
97
97
  }
98
98
  ],
@@ -92,7 +92,7 @@
92
92
  "LangName": "..."
93
93
  }
94
94
  ],
95
- "InputFmt": [
95
+ "InputFmt": [
96
96
  {
97
97
  "Name": "INPUT_MODE",
98
98
  "Type": "string",
@@ -92,4 +92,4 @@
92
92
  "LangName": "output_fmt_index_style"
93
93
  }
94
94
  ]
95
- }
95
+ }
@@ -0,0 +1,410 @@
1
+ {
2
+ "FuncName" : "TD_WINDOWDFFT",
3
+ "FuncDescriptionShort" : "windowed fast fourier transform",
4
+ "FuncDescriptionLong" : [
5
+ "TD_WINDOWDFFT applies a user-selected window to data before processing it with TD_DFFT. Windows are used to remove noise or spectral leakage. The window type is determined for the specific use case based on signal frequency, amplitude, strength and so on." ],
6
+ "FunctionVersion": "1",
7
+ "JSONVersion" : "1",
8
+ "FunctionCategory": "Digital Signal Processing",
9
+ "MaxInputFiles": 1,
10
+ "FuncRName":"td_Window_DFFT",
11
+ "IsPlottable" : true,
12
+ "InputFmt" : false,
13
+ "OutputFmt": [
14
+ {
15
+ "Name": "CONTENT",
16
+ "Type": "string",
17
+ "Optional": true,
18
+ "PermittedValues": [
19
+ "COMPLEX",
20
+ "AMPL_PHASE_RADIANS",
21
+ "AMPL_PHASE_DEGREES",
22
+ "AMPL_PHASE",
23
+ "MULTIVAR_COMPLEX",
24
+ "MULTIVAR_AMPL_PHASE_RADIANS",
25
+ "MULTIVAR_AMPL_PHASE_DEGREES",
26
+ "MULTIVAR_AMPL_PHASE"
27
+ ],
28
+ "Description": [
29
+ "The OUTPUT_FMT (CONTENT()) construct can be used by the data scientist to choose how they would like their Fourier coefficients to be output. They can use CONTENT(COMPLEX) or CONTENT(MULTIVAR_COMPLEX) to request the Fourier coefficients in rectangular form. Alternatively, they can use CONTENT(AMPL_PHASE_RADIANS), CONTENT(AMPL_PHASE_DEGREES), CONTENT(AMPL_PHASE), CONTENT(MULTIVAR_AMPL_PHASE_RADIANS), CONTENT(MULTIVAR_AMPL_PHASE), or CONTENT(MULTIVAR_AMPL_PHASE_DEGREES) to request that the Fourier coefficients be output in the polar form; and to further request the phase to be output in radians or degrees. ",
30
+ "AMPL_PHASE is one of the permitted values, it is synonymous with AMPL_PHASE_RADIANS. Similarly MULTIVAR_AMPL_PHASE is equivalent to MULTIVAR_AMPL_PHASE_RADIANS.",
31
+ "The default value is dependent on the datatype of the input series; a single var input will generate COMPLEX output CONTENT by default; a multi var input will generate MULTIVAR_COMPLEX output CONTENT by default."
32
+ ],
33
+ "LangName": "output_fmt_content"
34
+ }
35
+ ],
36
+ "Input": [
37
+ {
38
+ "Type": [
39
+ "SERIES",
40
+ "ART"
41
+ ],
42
+ "Description": [
43
+ "a logical-runtime series - time series or spatial series - as an input"
44
+ ],
45
+ "LangName": "data or object or newdata or ... --> Langauges team can work with UAF team to come up with this field",
46
+ "Optional": false
47
+ }
48
+ ],
49
+ "Output": [
50
+ {
51
+ "Type": "ART",
52
+ "PrimaryLayer": true,
53
+ "LayerName": "ARTPRIMARY",
54
+ "ResultTableColumnTypes": [
55
+ "integer",
56
+ "float",
57
+ "float"
58
+ ],
59
+ "Description": [
60
+ "The result series is always a multivariate series containing Fourier coefficients, whose elements are either complex numbers with real and imaginary component",
61
+ "The TD_DFFT function returns only a primary result set. There are no secondary or tertiary result sets produced by this function. ",
62
+ "The primary result set can be accessed either via a subsequent SELECT * FROM <art table> statement or by issuing a TD_EXTRACT_RESULTS(...,LAYER(ARTPRIMARY),...) .",
63
+ "The data scientist has the choice of outputting the result set with the produced Fourier Coefficients being realized in the form of: complex numbers - OUTPUT_FMT(CONTENT(COMPLEX) | CONTENT(MULTIVAR_COMPLEX)); or, in polar form, meaning in the form of amplitude and phase number pairs - OUTPUT_FMT(CONTENT(AMPL_PHASE_RADIANS) | CONTENT(AMPL_PHASE_DEGREES) | CONTENT(AMPL_PHASE) | CONTENT(MULTIVAR_AMPL_PHASE_RADIANS) | CONTENT(AMPL_PHASE_RADIANS) | CONTENT(MULTIVAR_AMPL_PHASE) ). This will, of course, affect the composition of the produced output columns.",
64
+ "The TD_DFFT functions comes with many options relative to the contents of the output rows. The data scientist has both the ability to affect the style of index used within the result series, as well as whether the Fourier coefficients should be output in rectangular (complex number) or polar (amplitude-phase) form. Using the FREQ_STYLE and K_HERTZ parameters, the data scientist can choose between different ways of outputting the \"index\" associated with the output series of Fourier coefficients, choosing between: a simple monotonically increasing integer index; an index based on the normalized sample rate; an index based on radians; and, an index based on the original sampling frequency used to capture the series. See FREQ_STYLE section which follows, for additional information. ",
65
+ "The OUTPUT_FMT (CONTENT()) construct can be used by the data scientist to choose how they would like their Fourier coefficients to be output. The can use CONTENT(COMPLEX) or CONTENT(MULTIVAR_COMPLEX) to request the Fourier coefficients in rectangular form. Alternatively, they can use CONTENT(AMPL_PHASE_RADIANS), CONTENT(AMPL_PHASE_DEGREES), CONTENT(AMPL_PHASE), CONTENT(MULTIVAR_AMPL_PHASE_RADIANS), CONTENT(MULTIVAR_AMPL_PHASE), or CONTENT(MULTIVAR_AMPL_PHASE_DEGREES) to request that the Fourier coefficients be output in the polar form; and to further request the phase to be output in radians or degrees. "
66
+ ],
67
+ "LangName": "data or object or newdata or ... --> Langauges team can work with UAF team to come up with this field"
68
+ }
69
+ ],
70
+ "Params" :
71
+ [
72
+ {
73
+ "Name" : "DFFT",
74
+ "Type" : "record",
75
+ "Optional" : true,
76
+ "Description": "",
77
+ "NestedParams" :
78
+ [
79
+ {
80
+ "Name" : "ALGORITHM",
81
+ "Type" : "string",
82
+ "PermittedValues" : ["COOLEY_TUKEY", "SINGLETON"],
83
+ "Optional" : true,
84
+ "Description": [
85
+ "The user-defined algorithm that bypasses the internal DFFT planner, and influences the core DFFT algorithm associated with the primary DFFT calculation.Choices are COOLEY_TUKEY, or SINGLETON. When this parameter is not present, then the internal DFFT planner selects the most efficient algorithm for the operation. For best performance, do not include this parameter. Instead, let the internal DFFT planner to select the best algorithm."
86
+ ]
87
+ },
88
+ {
89
+ "Name" : "ZERO_PADDING_OK",
90
+ "Type" : "integer",
91
+ "Optional" : true,
92
+ "DefaultValue": 1,
93
+ "PermittedValues": [ 0, 1 ],
94
+ "Description": [
95
+ "The number of zeros to add to the end of a given series to achieve a more efficient computation of the Fast Fourier Transform coefficients. A value of 1 means true, and a value of 0 means false. The default is 1. For best results, use 1."
96
+ ]
97
+
98
+ },
99
+ {
100
+ "Name" : "FREQ_STYLE",
101
+ "Type" : "string",
102
+ "PermittedValues" : ["K_INTEGRAL", "K_SAMPLE_RATE", "K_RADIANS", "K_HERTZ"],
103
+ "Optional" : true,
104
+ "DefaultValue": "K_INTEGRAL",
105
+ "Description": [
106
+ "The format or values associated with the x-axis of the output. Choices are:",
107
+ "K_INTEGRAL: Integer representation.",
108
+ "K_SAMPLE_RATE: Integer normalized to number entries, with ranges from -0.5 to +0.5.",
109
+ "K_RADIANS: Radian ranges from -pi to +pi",
110
+ "K_HERTZ: Frequency in hertz. Must be used in conjunction with HERTZ_SAMPLE_RATE.",
111
+ "The default is K_INTEGRAL."
112
+ ]
113
+ },
114
+ {
115
+ "Name" : "HERTZ_SAMPLE_RATE",
116
+ "Type" : "double",
117
+ "Optional" : true,
118
+ "LowerBound": 0,
119
+ "LowerBoundType": "EXCLUSIVE",
120
+ "AllowNaN": false,
121
+ "Description": [
122
+ "The sample rate as a floating point constant, in hertz. A value of 10000.0 indicates that the sample points were obtained by sampling at a rate of 10,000 hertz. This parameter is only valid with the FREQ_STYLE(K_HERTZ) parameter."
123
+ ]
124
+ },
125
+ {
126
+ "Name" : "HUMAN_READABLE",
127
+ "Type" : "integer",
128
+ "Optional" : true,
129
+ "DefaultValue": 1,
130
+ "PermittedValues": [ 0, 1 ],
131
+ "Description": [
132
+ "Indicator to determine whether the produced output rows are in human-readable or plottable form, or the output is in the raw-form. Human-readable output is symmetric around 0, such as -3, -2, -1, 0, 1, 2, 3. Raw output is sequential, starting at zero, such as 0, 1, 2, 3. A value of 1 means true, and the output is in human readable form. A value of 0 means false, and the output is in raw form. The default is 1."
133
+ ]
134
+ }
135
+ ]
136
+ },
137
+ {
138
+ "Name" : "WINDOW",
139
+ "Type" : "record",
140
+ "Optional" : true,
141
+ "Description": "",
142
+ "NestedParams" :
143
+ [
144
+ {
145
+ "Name" : "SIZE",
146
+ "Type" : "record",
147
+ "Optional" : true,
148
+ "Description": "",
149
+ "NestedParams" :
150
+ [
151
+ {
152
+ "Name" : "NUM",
153
+ "Type" : "integer",
154
+ "Optional" : true,
155
+ "LowerBound": 0,
156
+ "LowerBoundType": "EXCLUSIVE",
157
+ "Description": [
158
+ "Size of the window. Must be greater than zero. Note: Specify either this parameter or WINDOW( SIZE ( PERC ) )."
159
+ ]
160
+ },
161
+ {
162
+ "Name" : "PERC",
163
+ "Type" : "double",
164
+ "Optional" : true,
165
+ "LowerBound": 0,
166
+ "LowerBoundType": "EXCLUSIVE",
167
+ "Description": [
168
+ "Size of the window within a series as a percentage. Must be greater than zero. For example, use 80 for 80%."
169
+ ]
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "Name" : "OVERLAP",
175
+ "Type" : "integer",
176
+ "Optional" : true,
177
+ "DefaultValue": 0,
178
+ "Description": [
179
+ "The number of values the window slides down for each DFFT calculation within a series. The value must be less than the window size. The default is zero.To use fraction form, use WINDOW(OVERLAP(PERC))"
180
+ ]
181
+ },
182
+ {
183
+ "Name" : "IS_SYMMETRIC",
184
+ "Type" : "integer",
185
+ "Optional" : true,
186
+ "DefaultValue": 1,
187
+ "PermittedValues": [ 0, 1],
188
+ "Description": [
189
+ "Indicator to use a symmetric or periodic window. Value of 1 indicates symmetric, and value of 0 indicates periodic. The default is 1."
190
+ ]
191
+ },
192
+ {
193
+ "Name" : "SCALE",
194
+ "Type" : "string",
195
+ "PermittedValues" : ["DENSITY", "SPECTRUM"],
196
+ "Optional" : true,
197
+ "Description": [
198
+ "The spectral density type applied to the result values. Options are DENSITY and SPECTRUM."
199
+ ]
200
+ },
201
+ {
202
+ "Name" : "TYPE",
203
+ "Type" : "string",
204
+ "Optional" : true,
205
+ "PermittedValues" :
206
+ [
207
+ "BARTHANN",
208
+ "BARTLETT",
209
+ "BLACKMAN",
210
+ "BLACKMANHARRIS",
211
+ "BOHMAN",
212
+ "BOXCAR",
213
+ "COSINE",
214
+ "EXPONENTIAL",
215
+ "FLATTOP",
216
+ "GAUSSIAN",
217
+ "GENERAL_COSINE",
218
+ "GENERAL_GAUSSIAN",
219
+ "GENERAL_HAMMING",
220
+ "HAMMING",
221
+ "HANN",
222
+ "KAISER",
223
+ "NUTTALL",
224
+ "PARZEN",
225
+ "TAYLOR",
226
+ "TRIANG",
227
+ "TUKEY"
228
+ ],
229
+ "Description": [
230
+ "The type of window to use. Note: Some windows have additional options such as Taylor, in which case refer to the Taylor parameter for specific Taylor window options."
231
+ ]
232
+ },
233
+ {
234
+ "Name" : "EXPONENTIAL",
235
+ "Type" : "record",
236
+ "Optional" : true,
237
+ "Description": "",
238
+ "NestedParams" :
239
+ [
240
+ {
241
+ "Name" : "CENTER",
242
+ "Type" : "double",
243
+ "Optional" : true,
244
+ "DefaultValue": null,
245
+ "Description": [
246
+ "The center of the window. It is a parameter for WINDOW( TYPE( EXPONENTIAL ) ). The default value is (windowSize - 1 ) / 2."
247
+ ]
248
+ },
249
+ {
250
+ "Name" : "TAU",
251
+ "Type" : "double",
252
+ "Optional" : true,
253
+ "Description": [
254
+ "The amount of window decay. It is a parameter for WINDOW( TYPE( EXPONENTIAL ) ). If the center is zero, then use ( windowSize - 1 ) / ln( x ) if x is the fractional part of the window remaining at the end of the window."
255
+ ]
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "Name" : "GAUSSIAN",
261
+ "Type" : "record",
262
+ "Optional" : true,
263
+ "Description": "",
264
+ "NestedParams" :
265
+ [
266
+ {
267
+ "Name" : "STD",
268
+ "Type" : "double",
269
+ "Optional" : true,
270
+ "Description": [
271
+ "The sigma standard deviation. It is a required parameter if WINDOW( TYPE( GAUSSIAN ) ) is specified."
272
+ ]
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ "Name" : "GENERAL_COSINE",
278
+ "Type" : "record",
279
+ "Optional" : true,
280
+ "Description": "",
281
+ "NestedParams" :
282
+ [
283
+ {
284
+ "Name" : "COEFF",
285
+ "Type" : "list",
286
+ "ListType" : "double",
287
+ "Optional" : true,
288
+ "Description": [
289
+ "List of weighting coefficients. Required parameter when WINDOW(TYPE(GENERAL_GUASSIAN) is specified."
290
+ ]
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ "Name" : "GENERAL_GAUSSIAN",
296
+ "Type" : "record",
297
+ "Optional" : true,
298
+ "Description": "",
299
+ "NestedParams" :
300
+ [
301
+ {
302
+ "Name" : "SHAPE",
303
+ "Type" : "double",
304
+ "Optional" : true,
305
+ "Description": [
306
+ "The gaussian shape, and the value is 1. Required parameter when WINDOW(TYPE(GENERAL_GUASSIAN) is specified."
307
+ ]
308
+ },
309
+ {
310
+ "Name" : "SIGMA",
311
+ "Type" : "double",
312
+ "Optional" : true,
313
+ "Description": [
314
+ "The standard deviation value. Required parameter when WINDOW(TYPE(GENERAL_GUASSIAN) is specified."
315
+ ]
316
+ }
317
+ ]
318
+ },
319
+ {
320
+ "Name" : "GENERAL_HAMMING",
321
+ "Type" : "record",
322
+ "Optional" : true,
323
+ "Description": "",
324
+ "NestedParams" :
325
+ [
326
+ {
327
+ "Name" : "ALPHA",
328
+ "Type" : "double",
329
+ "Optional" : true,
330
+ "Description": [
331
+ "The value of the window coefficient. Required parameter when WINDOW( TYPE( GENERAL_HAMMING ) is specified."
332
+ ]
333
+ }
334
+ ]
335
+ },
336
+ {
337
+ "Name" : "KAISER",
338
+ "Type" : "record",
339
+ "Optional" : true,
340
+ "Description": "",
341
+ "NestedParams" :
342
+ [
343
+ {
344
+ "Name" : "BETA",
345
+ "Type" : "double",
346
+ "Optional" : true,
347
+ "Description": [
348
+ "The value for the shape between the main lobe width and side lobe level. Required parameter when WINDOW(TYPE(KAISER)) is specified."
349
+ ]
350
+ }
351
+ ]
352
+ },
353
+ {
354
+ "Name" : "TAYLOR",
355
+ "Optional" : true,
356
+ "Type" : "record",
357
+ "Description": "",
358
+ "NestedParams" :
359
+ [
360
+ {
361
+ "Name" : "NUM_SIDELOBES",
362
+ "Type" : "integer",
363
+ "Optional" : true,
364
+ "DefaultValue": 4,
365
+ "Description": [
366
+ "The number of nearly constant level sidelobes adjacent to the main lobe. Optional parameter for WINDOW(TYPE(TAYLOR)). The default value is 4."
367
+ ]
368
+ },
369
+ {
370
+ "Name" : "SIDELOBE_SUPPRESSION",
371
+ "Type" : "double",
372
+ "Optional" : true,
373
+ "DefaultValue": 30,
374
+ "Description": [
375
+ "Value should be positive. The suppression level of the side lobe in decibels relative to the DC gain of the main lobe. Value is positive. Optional parameter for WINDOW(TYPE(TAYLOR)). The default value is 30."
376
+ ]
377
+ },
378
+ {
379
+ "Name" : "NORM",
380
+ "Type" : "integer",
381
+ "Optional" : true,
382
+ "DefaultValue": 1,
383
+ "PermittedValues": [ 0, 1 ],
384
+ "Description": [
385
+ "Indicator for how the window is divided. When set to 1 for an odd sized window, divides the window by the largest (middle) value. For an even sized window, divides the window by the value that would occur between the two middle values. Optional parameter for WINDOW(TYPE(TAYLOR)). The default value is 1."
386
+ ]
387
+ }
388
+ ]
389
+ },
390
+ {
391
+ "Name" : "TUKEY",
392
+ "Type" : "record",
393
+ "Optional" : true,
394
+ "Description": "",
395
+ "NestedParams" :
396
+ [
397
+ {
398
+ "Name" : "ALPHA",
399
+ "Type" : "double",
400
+ "Optional" : true,
401
+ "Description": [
402
+ "Defines the shape of the window inside the cosine-tapered region. A value of 0 is a rectangular window. A value of 1 is the same as a Hann window. Required parameter if WINDOW(TYPE(TUKEY)) is specified."
403
+ ]
404
+ }
405
+ ]
406
+ }
407
+ ]
408
+ }
409
+ ]
410
+ }
@@ -27,7 +27,7 @@ from teradataml.common.sqlbundle import SQLBundle
27
27
  import teradataml.context.context as tdmlctx
28
28
  from teradataml.context.context import _get_context_temp_databasename
29
29
  from collections import OrderedDict, defaultdict
30
- from teradatasqlalchemy.telemetry.queryband import collect_queryband
30
+ from teradataml.telemetry_utils.queryband import collect_queryband
31
31
 
32
32
  json_data = {}
33
33
  col_types_dict = {}
@@ -130,6 +130,11 @@ def load_example_data(function_name, table_name):
130
130
  FileNotFoundError - If invalid function_name is provided.
131
131
 
132
132
  """
133
+ # Check if context is created or not.
134
+ if get_connection() is None:
135
+ raise TeradataMlException(Messages.get_message(MessageCodes.INVALID_CONTEXT_CONNECTION),
136
+ MessageCodes.INVALID_CONTEXT_CONNECTION)
137
+
133
138
  example_filename = os.path.join(curr_dir, "{}_example.json".format(function_name.lower()))
134
139
  global json_data
135
140
 
@@ -217,7 +222,8 @@ def __create_table_insert_data(tablename):
217
222
  # Get temporary database.
218
223
  temp_db = _get_context_temp_databasename(table_type=
219
224
  TeradataConstants.TERADATA_TABLE)
220
- table_exists = con.dialect.has_table(con, tablename, schema=temp_db)
225
+ table_exists = con.dialect.has_table(con, tablename, schema=temp_db,
226
+ table_only=True)
221
227
  if table_exists:
222
228
  raise TeradataMlException(Messages.get_message(MessageCodes.TABLE_ALREADY_EXISTS, tablename),
223
229
  MessageCodes.TABLE_ALREADY_EXISTS)