teradataml 20.0.0.8__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.
Files changed (1208) hide show
  1. teradataml/LICENSE-3RD-PARTY.pdf +0 -0
  2. teradataml/LICENSE.pdf +0 -0
  3. teradataml/README.md +2762 -0
  4. teradataml/__init__.py +78 -0
  5. teradataml/_version.py +11 -0
  6. teradataml/analytics/Transformations.py +2996 -0
  7. teradataml/analytics/__init__.py +82 -0
  8. teradataml/analytics/analytic_function_executor.py +2416 -0
  9. teradataml/analytics/analytic_query_generator.py +1050 -0
  10. teradataml/analytics/byom/H2OPredict.py +514 -0
  11. teradataml/analytics/byom/PMMLPredict.py +437 -0
  12. teradataml/analytics/byom/__init__.py +16 -0
  13. teradataml/analytics/json_parser/__init__.py +133 -0
  14. teradataml/analytics/json_parser/analytic_functions_argument.py +1805 -0
  15. teradataml/analytics/json_parser/json_store.py +191 -0
  16. teradataml/analytics/json_parser/metadata.py +1666 -0
  17. teradataml/analytics/json_parser/utils.py +805 -0
  18. teradataml/analytics/meta_class.py +236 -0
  19. teradataml/analytics/sqle/DecisionTreePredict.py +456 -0
  20. teradataml/analytics/sqle/NaiveBayesPredict.py +420 -0
  21. teradataml/analytics/sqle/__init__.py +128 -0
  22. teradataml/analytics/sqle/json/decisiontreepredict_sqle.json +78 -0
  23. teradataml/analytics/sqle/json/naivebayespredict_sqle.json +62 -0
  24. teradataml/analytics/table_operator/__init__.py +11 -0
  25. teradataml/analytics/uaf/__init__.py +82 -0
  26. teradataml/analytics/utils.py +828 -0
  27. teradataml/analytics/valib.py +1617 -0
  28. teradataml/automl/__init__.py +5835 -0
  29. teradataml/automl/autodataprep/__init__.py +493 -0
  30. teradataml/automl/custom_json_utils.py +1625 -0
  31. teradataml/automl/data_preparation.py +1384 -0
  32. teradataml/automl/data_transformation.py +1254 -0
  33. teradataml/automl/feature_engineering.py +2273 -0
  34. teradataml/automl/feature_exploration.py +1873 -0
  35. teradataml/automl/model_evaluation.py +488 -0
  36. teradataml/automl/model_training.py +1407 -0
  37. teradataml/catalog/__init__.py +2 -0
  38. teradataml/catalog/byom.py +1759 -0
  39. teradataml/catalog/function_argument_mapper.py +859 -0
  40. teradataml/catalog/model_cataloging_utils.py +491 -0
  41. teradataml/clients/__init__.py +0 -0
  42. teradataml/clients/auth_client.py +137 -0
  43. teradataml/clients/keycloak_client.py +165 -0
  44. teradataml/clients/pkce_client.py +481 -0
  45. teradataml/common/__init__.py +1 -0
  46. teradataml/common/aed_utils.py +2078 -0
  47. teradataml/common/bulk_exposed_utils.py +113 -0
  48. teradataml/common/constants.py +1669 -0
  49. teradataml/common/deprecations.py +166 -0
  50. teradataml/common/exceptions.py +147 -0
  51. teradataml/common/formula.py +743 -0
  52. teradataml/common/garbagecollector.py +666 -0
  53. teradataml/common/logger.py +1261 -0
  54. teradataml/common/messagecodes.py +518 -0
  55. teradataml/common/messages.py +262 -0
  56. teradataml/common/pylogger.py +67 -0
  57. teradataml/common/sqlbundle.py +764 -0
  58. teradataml/common/td_coltype_code_to_tdtype.py +48 -0
  59. teradataml/common/utils.py +3166 -0
  60. teradataml/common/warnings.py +36 -0
  61. teradataml/common/wrapper_utils.py +625 -0
  62. teradataml/config/__init__.py +0 -0
  63. teradataml/config/dummy_file1.cfg +5 -0
  64. teradataml/config/dummy_file2.cfg +3 -0
  65. teradataml/config/sqlengine_alias_definitions_v1.0 +14 -0
  66. teradataml/config/sqlengine_alias_definitions_v1.1 +20 -0
  67. teradataml/config/sqlengine_alias_definitions_v1.3 +19 -0
  68. teradataml/context/__init__.py +0 -0
  69. teradataml/context/aed_context.py +223 -0
  70. teradataml/context/context.py +1462 -0
  71. teradataml/data/A_loan.csv +19 -0
  72. teradataml/data/BINARY_REALS_LEFT.csv +11 -0
  73. teradataml/data/BINARY_REALS_RIGHT.csv +11 -0
  74. teradataml/data/B_loan.csv +49 -0
  75. teradataml/data/BuoyData2.csv +17 -0
  76. teradataml/data/CONVOLVE2_COMPLEX_LEFT.csv +5 -0
  77. teradataml/data/CONVOLVE2_COMPLEX_RIGHT.csv +5 -0
  78. teradataml/data/Convolve2RealsLeft.csv +5 -0
  79. teradataml/data/Convolve2RealsRight.csv +5 -0
  80. teradataml/data/Convolve2ValidLeft.csv +11 -0
  81. teradataml/data/Convolve2ValidRight.csv +11 -0
  82. teradataml/data/DFFTConv_Real_8_8.csv +65 -0
  83. teradataml/data/Employee.csv +5 -0
  84. teradataml/data/Employee_Address.csv +4 -0
  85. teradataml/data/Employee_roles.csv +5 -0
  86. teradataml/data/JulesBelvezeDummyData.csv +100 -0
  87. teradataml/data/Mall_customer_data.csv +201 -0
  88. teradataml/data/Orders1_12mf.csv +25 -0
  89. teradataml/data/Pi_loan.csv +7 -0
  90. teradataml/data/SMOOTHED_DATA.csv +7 -0
  91. teradataml/data/TestDFFT8.csv +9 -0
  92. teradataml/data/TestRiver.csv +109 -0
  93. teradataml/data/Traindata.csv +28 -0
  94. teradataml/data/__init__.py +0 -0
  95. teradataml/data/acf.csv +17 -0
  96. teradataml/data/adaboost_example.json +34 -0
  97. teradataml/data/adaboostpredict_example.json +24 -0
  98. teradataml/data/additional_table.csv +11 -0
  99. teradataml/data/admissions_test.csv +21 -0
  100. teradataml/data/admissions_train.csv +41 -0
  101. teradataml/data/admissions_train_nulls.csv +41 -0
  102. teradataml/data/advertising.csv +201 -0
  103. teradataml/data/ageandheight.csv +13 -0
  104. teradataml/data/ageandpressure.csv +31 -0
  105. teradataml/data/amazon_reviews_25.csv +26 -0
  106. teradataml/data/antiselect_example.json +36 -0
  107. teradataml/data/antiselect_input.csv +8 -0
  108. teradataml/data/antiselect_input_mixed_case.csv +8 -0
  109. teradataml/data/applicant_external.csv +7 -0
  110. teradataml/data/applicant_reference.csv +7 -0
  111. teradataml/data/apriori_example.json +22 -0
  112. teradataml/data/arima_example.json +9 -0
  113. teradataml/data/assortedtext_input.csv +8 -0
  114. teradataml/data/attribution_example.json +34 -0
  115. teradataml/data/attribution_sample_table.csv +27 -0
  116. teradataml/data/attribution_sample_table1.csv +6 -0
  117. teradataml/data/attribution_sample_table2.csv +11 -0
  118. teradataml/data/bank_churn.csv +10001 -0
  119. teradataml/data/bank_marketing.csv +11163 -0
  120. teradataml/data/bank_web_clicks1.csv +43 -0
  121. teradataml/data/bank_web_clicks2.csv +91 -0
  122. teradataml/data/bank_web_url.csv +85 -0
  123. teradataml/data/barrier.csv +2 -0
  124. teradataml/data/barrier_new.csv +3 -0
  125. teradataml/data/betweenness_example.json +14 -0
  126. teradataml/data/bike_sharing.csv +732 -0
  127. teradataml/data/bin_breaks.csv +8 -0
  128. teradataml/data/bin_fit_ip.csv +4 -0
  129. teradataml/data/binary_complex_left.csv +11 -0
  130. teradataml/data/binary_complex_right.csv +11 -0
  131. teradataml/data/binary_matrix_complex_left.csv +21 -0
  132. teradataml/data/binary_matrix_complex_right.csv +21 -0
  133. teradataml/data/binary_matrix_real_left.csv +21 -0
  134. teradataml/data/binary_matrix_real_right.csv +21 -0
  135. teradataml/data/blood2ageandweight.csv +26 -0
  136. teradataml/data/bmi.csv +501 -0
  137. teradataml/data/boston.csv +507 -0
  138. teradataml/data/boston2cols.csv +721 -0
  139. teradataml/data/breast_cancer.csv +570 -0
  140. teradataml/data/buoydata_mix.csv +11 -0
  141. teradataml/data/burst_data.csv +5 -0
  142. teradataml/data/burst_example.json +21 -0
  143. teradataml/data/byom_example.json +34 -0
  144. teradataml/data/bytes_table.csv +4 -0
  145. teradataml/data/cal_housing_ex_raw.csv +70 -0
  146. teradataml/data/callers.csv +7 -0
  147. teradataml/data/calls.csv +10 -0
  148. teradataml/data/cars_hist.csv +33 -0
  149. teradataml/data/cat_table.csv +25 -0
  150. teradataml/data/ccm_example.json +32 -0
  151. teradataml/data/ccm_input.csv +91 -0
  152. teradataml/data/ccm_input2.csv +13 -0
  153. teradataml/data/ccmexample.csv +101 -0
  154. teradataml/data/ccmprepare_example.json +9 -0
  155. teradataml/data/ccmprepare_input.csv +91 -0
  156. teradataml/data/cfilter_example.json +12 -0
  157. teradataml/data/changepointdetection_example.json +18 -0
  158. teradataml/data/changepointdetectionrt_example.json +8 -0
  159. teradataml/data/chi_sq.csv +3 -0
  160. teradataml/data/churn_data.csv +14 -0
  161. teradataml/data/churn_emission.csv +35 -0
  162. teradataml/data/churn_initial.csv +3 -0
  163. teradataml/data/churn_state_transition.csv +5 -0
  164. teradataml/data/citedges_2.csv +745 -0
  165. teradataml/data/citvertices_2.csv +1210 -0
  166. teradataml/data/clicks2.csv +16 -0
  167. teradataml/data/clickstream.csv +13 -0
  168. teradataml/data/clickstream1.csv +11 -0
  169. teradataml/data/closeness_example.json +16 -0
  170. teradataml/data/complaints.csv +21 -0
  171. teradataml/data/complaints_mini.csv +3 -0
  172. teradataml/data/complaints_test_tokenized.csv +353 -0
  173. teradataml/data/complaints_testtoken.csv +224 -0
  174. teradataml/data/complaints_tokens_model.csv +348 -0
  175. teradataml/data/complaints_tokens_test.csv +353 -0
  176. teradataml/data/complaints_traintoken.csv +472 -0
  177. teradataml/data/computers_category.csv +1001 -0
  178. teradataml/data/computers_test1.csv +1252 -0
  179. teradataml/data/computers_train1.csv +5009 -0
  180. teradataml/data/computers_train1_clustered.csv +5009 -0
  181. teradataml/data/confusionmatrix_example.json +9 -0
  182. teradataml/data/conversion_event_table.csv +3 -0
  183. teradataml/data/corr_input.csv +17 -0
  184. teradataml/data/correlation_example.json +11 -0
  185. teradataml/data/covid_confirm_sd.csv +83 -0
  186. teradataml/data/coxhazardratio_example.json +39 -0
  187. teradataml/data/coxph_example.json +15 -0
  188. teradataml/data/coxsurvival_example.json +28 -0
  189. teradataml/data/cpt.csv +41 -0
  190. teradataml/data/credit_ex_merged.csv +45 -0
  191. teradataml/data/creditcard_data.csv +1001 -0
  192. teradataml/data/customer_loyalty.csv +301 -0
  193. teradataml/data/customer_loyalty_newseq.csv +31 -0
  194. teradataml/data/customer_segmentation_test.csv +2628 -0
  195. teradataml/data/customer_segmentation_train.csv +8069 -0
  196. teradataml/data/dataframe_example.json +173 -0
  197. teradataml/data/decisionforest_example.json +37 -0
  198. teradataml/data/decisionforestpredict_example.json +38 -0
  199. teradataml/data/decisiontree_example.json +21 -0
  200. teradataml/data/decisiontreepredict_example.json +45 -0
  201. teradataml/data/dfft2_size4_real.csv +17 -0
  202. teradataml/data/dfft2_test_matrix16.csv +17 -0
  203. teradataml/data/dfft2conv_real_4_4.csv +65 -0
  204. teradataml/data/diabetes.csv +443 -0
  205. teradataml/data/diabetes_test.csv +89 -0
  206. teradataml/data/dict_table.csv +5 -0
  207. teradataml/data/docperterm_table.csv +4 -0
  208. teradataml/data/docs/__init__.py +1 -0
  209. teradataml/data/docs/byom/__init__.py +0 -0
  210. teradataml/data/docs/byom/docs/DataRobotPredict.py +180 -0
  211. teradataml/data/docs/byom/docs/DataikuPredict.py +217 -0
  212. teradataml/data/docs/byom/docs/H2OPredict.py +325 -0
  213. teradataml/data/docs/byom/docs/ONNXEmbeddings.py +242 -0
  214. teradataml/data/docs/byom/docs/ONNXPredict.py +283 -0
  215. teradataml/data/docs/byom/docs/ONNXSeq2Seq.py +255 -0
  216. teradataml/data/docs/byom/docs/PMMLPredict.py +278 -0
  217. teradataml/data/docs/byom/docs/__init__.py +0 -0
  218. teradataml/data/docs/sqle/__init__.py +0 -0
  219. teradataml/data/docs/sqle/docs_17_10/Antiselect.py +83 -0
  220. teradataml/data/docs/sqle/docs_17_10/Attribution.py +200 -0
  221. teradataml/data/docs/sqle/docs_17_10/BincodeFit.py +172 -0
  222. teradataml/data/docs/sqle/docs_17_10/BincodeTransform.py +131 -0
  223. teradataml/data/docs/sqle/docs_17_10/CategoricalSummary.py +86 -0
  224. teradataml/data/docs/sqle/docs_17_10/ChiSq.py +90 -0
  225. teradataml/data/docs/sqle/docs_17_10/ColumnSummary.py +86 -0
  226. teradataml/data/docs/sqle/docs_17_10/ConvertTo.py +96 -0
  227. teradataml/data/docs/sqle/docs_17_10/DecisionForestPredict.py +139 -0
  228. teradataml/data/docs/sqle/docs_17_10/DecisionTreePredict.py +152 -0
  229. teradataml/data/docs/sqle/docs_17_10/FTest.py +161 -0
  230. teradataml/data/docs/sqle/docs_17_10/FillRowId.py +83 -0
  231. teradataml/data/docs/sqle/docs_17_10/Fit.py +88 -0
  232. teradataml/data/docs/sqle/docs_17_10/GLMPredict.py +144 -0
  233. teradataml/data/docs/sqle/docs_17_10/GetRowsWithMissingValues.py +85 -0
  234. teradataml/data/docs/sqle/docs_17_10/GetRowsWithoutMissingValues.py +82 -0
  235. teradataml/data/docs/sqle/docs_17_10/Histogram.py +165 -0
  236. teradataml/data/docs/sqle/docs_17_10/MovingAverage.py +134 -0
  237. teradataml/data/docs/sqle/docs_17_10/NGramSplitter.py +209 -0
  238. teradataml/data/docs/sqle/docs_17_10/NPath.py +266 -0
  239. teradataml/data/docs/sqle/docs_17_10/NaiveBayesPredict.py +116 -0
  240. teradataml/data/docs/sqle/docs_17_10/NaiveBayesTextClassifierPredict.py +176 -0
  241. teradataml/data/docs/sqle/docs_17_10/NumApply.py +147 -0
  242. teradataml/data/docs/sqle/docs_17_10/OneHotEncodingFit.py +135 -0
  243. teradataml/data/docs/sqle/docs_17_10/OneHotEncodingTransform.py +109 -0
  244. teradataml/data/docs/sqle/docs_17_10/OutlierFilterFit.py +166 -0
  245. teradataml/data/docs/sqle/docs_17_10/OutlierFilterTransform.py +105 -0
  246. teradataml/data/docs/sqle/docs_17_10/Pack.py +128 -0
  247. teradataml/data/docs/sqle/docs_17_10/PolynomialFeaturesFit.py +112 -0
  248. teradataml/data/docs/sqle/docs_17_10/PolynomialFeaturesTransform.py +102 -0
  249. teradataml/data/docs/sqle/docs_17_10/QQNorm.py +105 -0
  250. teradataml/data/docs/sqle/docs_17_10/RoundColumns.py +110 -0
  251. teradataml/data/docs/sqle/docs_17_10/RowNormalizeFit.py +118 -0
  252. teradataml/data/docs/sqle/docs_17_10/RowNormalizeTransform.py +99 -0
  253. teradataml/data/docs/sqle/docs_17_10/SVMSparsePredict.py +153 -0
  254. teradataml/data/docs/sqle/docs_17_10/ScaleFit.py +197 -0
  255. teradataml/data/docs/sqle/docs_17_10/ScaleTransform.py +99 -0
  256. teradataml/data/docs/sqle/docs_17_10/Sessionize.py +114 -0
  257. teradataml/data/docs/sqle/docs_17_10/SimpleImputeFit.py +116 -0
  258. teradataml/data/docs/sqle/docs_17_10/SimpleImputeTransform.py +98 -0
  259. teradataml/data/docs/sqle/docs_17_10/StrApply.py +187 -0
  260. teradataml/data/docs/sqle/docs_17_10/StringSimilarity.py +146 -0
  261. teradataml/data/docs/sqle/docs_17_10/Transform.py +105 -0
  262. teradataml/data/docs/sqle/docs_17_10/UnivariateStatistics.py +142 -0
  263. teradataml/data/docs/sqle/docs_17_10/Unpack.py +214 -0
  264. teradataml/data/docs/sqle/docs_17_10/WhichMax.py +83 -0
  265. teradataml/data/docs/sqle/docs_17_10/WhichMin.py +83 -0
  266. teradataml/data/docs/sqle/docs_17_10/ZTest.py +155 -0
  267. teradataml/data/docs/sqle/docs_17_10/__init__.py +0 -0
  268. teradataml/data/docs/sqle/docs_17_20/ANOVA.py +186 -0
  269. teradataml/data/docs/sqle/docs_17_20/Antiselect.py +83 -0
  270. teradataml/data/docs/sqle/docs_17_20/Apriori.py +138 -0
  271. teradataml/data/docs/sqle/docs_17_20/Attribution.py +201 -0
  272. teradataml/data/docs/sqle/docs_17_20/BincodeFit.py +172 -0
  273. teradataml/data/docs/sqle/docs_17_20/BincodeTransform.py +139 -0
  274. teradataml/data/docs/sqle/docs_17_20/CFilter.py +132 -0
  275. teradataml/data/docs/sqle/docs_17_20/CategoricalSummary.py +86 -0
  276. teradataml/data/docs/sqle/docs_17_20/ChiSq.py +90 -0
  277. teradataml/data/docs/sqle/docs_17_20/ClassificationEvaluator.py +166 -0
  278. teradataml/data/docs/sqle/docs_17_20/ColumnSummary.py +86 -0
  279. teradataml/data/docs/sqle/docs_17_20/ColumnTransformer.py +246 -0
  280. teradataml/data/docs/sqle/docs_17_20/ConvertTo.py +113 -0
  281. teradataml/data/docs/sqle/docs_17_20/DecisionForest.py +280 -0
  282. teradataml/data/docs/sqle/docs_17_20/DecisionForestPredict.py +144 -0
  283. teradataml/data/docs/sqle/docs_17_20/DecisionTreePredict.py +136 -0
  284. teradataml/data/docs/sqle/docs_17_20/FTest.py +240 -0
  285. teradataml/data/docs/sqle/docs_17_20/FillRowId.py +83 -0
  286. teradataml/data/docs/sqle/docs_17_20/Fit.py +88 -0
  287. teradataml/data/docs/sqle/docs_17_20/GLM.py +541 -0
  288. teradataml/data/docs/sqle/docs_17_20/GLMPerSegment.py +415 -0
  289. teradataml/data/docs/sqle/docs_17_20/GLMPredict.py +144 -0
  290. teradataml/data/docs/sqle/docs_17_20/GLMPredictPerSegment.py +233 -0
  291. teradataml/data/docs/sqle/docs_17_20/GetFutileColumns.py +125 -0
  292. teradataml/data/docs/sqle/docs_17_20/GetRowsWithMissingValues.py +109 -0
  293. teradataml/data/docs/sqle/docs_17_20/GetRowsWithoutMissingValues.py +106 -0
  294. teradataml/data/docs/sqle/docs_17_20/Histogram.py +224 -0
  295. teradataml/data/docs/sqle/docs_17_20/KMeans.py +251 -0
  296. teradataml/data/docs/sqle/docs_17_20/KMeansPredict.py +144 -0
  297. teradataml/data/docs/sqle/docs_17_20/KNN.py +215 -0
  298. teradataml/data/docs/sqle/docs_17_20/MovingAverage.py +134 -0
  299. teradataml/data/docs/sqle/docs_17_20/NERExtractor.py +121 -0
  300. teradataml/data/docs/sqle/docs_17_20/NGramSplitter.py +209 -0
  301. teradataml/data/docs/sqle/docs_17_20/NPath.py +266 -0
  302. teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +162 -0
  303. teradataml/data/docs/sqle/docs_17_20/NaiveBayesPredict.py +116 -0
  304. teradataml/data/docs/sqle/docs_17_20/NaiveBayesTextClassifierPredict.py +177 -0
  305. teradataml/data/docs/sqle/docs_17_20/NaiveBayesTextClassifierTrainer.py +127 -0
  306. teradataml/data/docs/sqle/docs_17_20/NonLinearCombineFit.py +119 -0
  307. teradataml/data/docs/sqle/docs_17_20/NonLinearCombineTransform.py +112 -0
  308. teradataml/data/docs/sqle/docs_17_20/NumApply.py +147 -0
  309. teradataml/data/docs/sqle/docs_17_20/OneClassSVM.py +307 -0
  310. teradataml/data/docs/sqle/docs_17_20/OneClassSVMPredict.py +185 -0
  311. teradataml/data/docs/sqle/docs_17_20/OneHotEncodingFit.py +231 -0
  312. teradataml/data/docs/sqle/docs_17_20/OneHotEncodingTransform.py +121 -0
  313. teradataml/data/docs/sqle/docs_17_20/OrdinalEncodingFit.py +220 -0
  314. teradataml/data/docs/sqle/docs_17_20/OrdinalEncodingTransform.py +127 -0
  315. teradataml/data/docs/sqle/docs_17_20/OutlierFilterFit.py +191 -0
  316. teradataml/data/docs/sqle/docs_17_20/OutlierFilterTransform.py +117 -0
  317. teradataml/data/docs/sqle/docs_17_20/Pack.py +128 -0
  318. teradataml/data/docs/sqle/docs_17_20/Pivoting.py +279 -0
  319. teradataml/data/docs/sqle/docs_17_20/PolynomialFeaturesFit.py +112 -0
  320. teradataml/data/docs/sqle/docs_17_20/PolynomialFeaturesTransform.py +112 -0
  321. teradataml/data/docs/sqle/docs_17_20/QQNorm.py +105 -0
  322. teradataml/data/docs/sqle/docs_17_20/ROC.py +164 -0
  323. teradataml/data/docs/sqle/docs_17_20/RandomProjectionFit.py +155 -0
  324. teradataml/data/docs/sqle/docs_17_20/RandomProjectionMinComponents.py +106 -0
  325. teradataml/data/docs/sqle/docs_17_20/RandomProjectionTransform.py +120 -0
  326. teradataml/data/docs/sqle/docs_17_20/RegressionEvaluator.py +211 -0
  327. teradataml/data/docs/sqle/docs_17_20/RoundColumns.py +109 -0
  328. teradataml/data/docs/sqle/docs_17_20/RowNormalizeFit.py +118 -0
  329. teradataml/data/docs/sqle/docs_17_20/RowNormalizeTransform.py +111 -0
  330. teradataml/data/docs/sqle/docs_17_20/SMOTE.py +212 -0
  331. teradataml/data/docs/sqle/docs_17_20/SVM.py +414 -0
  332. teradataml/data/docs/sqle/docs_17_20/SVMPredict.py +213 -0
  333. teradataml/data/docs/sqle/docs_17_20/SVMSparsePredict.py +153 -0
  334. teradataml/data/docs/sqle/docs_17_20/ScaleFit.py +315 -0
  335. teradataml/data/docs/sqle/docs_17_20/ScaleTransform.py +202 -0
  336. teradataml/data/docs/sqle/docs_17_20/SentimentExtractor.py +206 -0
  337. teradataml/data/docs/sqle/docs_17_20/Sessionize.py +114 -0
  338. teradataml/data/docs/sqle/docs_17_20/Shap.py +225 -0
  339. teradataml/data/docs/sqle/docs_17_20/Silhouette.py +153 -0
  340. teradataml/data/docs/sqle/docs_17_20/SimpleImputeFit.py +116 -0
  341. teradataml/data/docs/sqle/docs_17_20/SimpleImputeTransform.py +109 -0
  342. teradataml/data/docs/sqle/docs_17_20/StrApply.py +187 -0
  343. teradataml/data/docs/sqle/docs_17_20/StringSimilarity.py +146 -0
  344. teradataml/data/docs/sqle/docs_17_20/TDDecisionForestPredict.py +207 -0
  345. teradataml/data/docs/sqle/docs_17_20/TDGLMPredict.py +333 -0
  346. teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +189 -0
  347. teradataml/data/docs/sqle/docs_17_20/TFIDF.py +142 -0
  348. teradataml/data/docs/sqle/docs_17_20/TargetEncodingFit.py +267 -0
  349. teradataml/data/docs/sqle/docs_17_20/TargetEncodingTransform.py +141 -0
  350. teradataml/data/docs/sqle/docs_17_20/TextMorph.py +119 -0
  351. teradataml/data/docs/sqle/docs_17_20/TextParser.py +224 -0
  352. teradataml/data/docs/sqle/docs_17_20/TrainTestSplit.py +160 -0
  353. teradataml/data/docs/sqle/docs_17_20/Transform.py +123 -0
  354. teradataml/data/docs/sqle/docs_17_20/UnivariateStatistics.py +142 -0
  355. teradataml/data/docs/sqle/docs_17_20/Unpack.py +214 -0
  356. teradataml/data/docs/sqle/docs_17_20/Unpivoting.py +216 -0
  357. teradataml/data/docs/sqle/docs_17_20/VectorDistance.py +169 -0
  358. teradataml/data/docs/sqle/docs_17_20/WhichMax.py +83 -0
  359. teradataml/data/docs/sqle/docs_17_20/WhichMin.py +83 -0
  360. teradataml/data/docs/sqle/docs_17_20/WordEmbeddings.py +237 -0
  361. teradataml/data/docs/sqle/docs_17_20/XGBoost.py +362 -0
  362. teradataml/data/docs/sqle/docs_17_20/XGBoostPredict.py +281 -0
  363. teradataml/data/docs/sqle/docs_17_20/ZTest.py +220 -0
  364. teradataml/data/docs/sqle/docs_17_20/__init__.py +0 -0
  365. teradataml/data/docs/tableoperator/__init__.py +0 -0
  366. teradataml/data/docs/tableoperator/docs_17_00/ReadNOS.py +430 -0
  367. teradataml/data/docs/tableoperator/docs_17_00/__init__.py +0 -0
  368. teradataml/data/docs/tableoperator/docs_17_05/ReadNOS.py +430 -0
  369. teradataml/data/docs/tableoperator/docs_17_05/WriteNOS.py +348 -0
  370. teradataml/data/docs/tableoperator/docs_17_05/__init__.py +0 -0
  371. teradataml/data/docs/tableoperator/docs_17_10/ReadNOS.py +429 -0
  372. teradataml/data/docs/tableoperator/docs_17_10/WriteNOS.py +348 -0
  373. teradataml/data/docs/tableoperator/docs_17_10/__init__.py +0 -0
  374. teradataml/data/docs/tableoperator/docs_17_20/Image2Matrix.py +118 -0
  375. teradataml/data/docs/tableoperator/docs_17_20/ReadNOS.py +440 -0
  376. teradataml/data/docs/tableoperator/docs_17_20/WriteNOS.py +387 -0
  377. teradataml/data/docs/tableoperator/docs_17_20/__init__.py +0 -0
  378. teradataml/data/docs/uaf/__init__.py +0 -0
  379. teradataml/data/docs/uaf/docs_17_20/ACF.py +186 -0
  380. teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +370 -0
  381. teradataml/data/docs/uaf/docs_17_20/ArimaForecast.py +172 -0
  382. teradataml/data/docs/uaf/docs_17_20/ArimaValidate.py +161 -0
  383. teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +293 -0
  384. teradataml/data/docs/uaf/docs_17_20/AutoArima.py +354 -0
  385. teradataml/data/docs/uaf/docs_17_20/BinaryMatrixOp.py +248 -0
  386. teradataml/data/docs/uaf/docs_17_20/BinarySeriesOp.py +252 -0
  387. teradataml/data/docs/uaf/docs_17_20/BreuschGodfrey.py +178 -0
  388. teradataml/data/docs/uaf/docs_17_20/BreuschPaganGodfrey.py +175 -0
  389. teradataml/data/docs/uaf/docs_17_20/Convolve.py +230 -0
  390. teradataml/data/docs/uaf/docs_17_20/Convolve2.py +218 -0
  391. teradataml/data/docs/uaf/docs_17_20/CopyArt.py +145 -0
  392. teradataml/data/docs/uaf/docs_17_20/CumulPeriodogram.py +185 -0
  393. teradataml/data/docs/uaf/docs_17_20/DFFT.py +204 -0
  394. teradataml/data/docs/uaf/docs_17_20/DFFT2.py +216 -0
  395. teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +216 -0
  396. teradataml/data/docs/uaf/docs_17_20/DFFTConv.py +192 -0
  397. teradataml/data/docs/uaf/docs_17_20/DIFF.py +175 -0
  398. teradataml/data/docs/uaf/docs_17_20/DTW.py +180 -0
  399. teradataml/data/docs/uaf/docs_17_20/DWT.py +235 -0
  400. teradataml/data/docs/uaf/docs_17_20/DWT2D.py +217 -0
  401. teradataml/data/docs/uaf/docs_17_20/DickeyFuller.py +142 -0
  402. teradataml/data/docs/uaf/docs_17_20/DurbinWatson.py +184 -0
  403. teradataml/data/docs/uaf/docs_17_20/ExtractResults.py +185 -0
  404. teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +160 -0
  405. teradataml/data/docs/uaf/docs_17_20/FitMetrics.py +172 -0
  406. teradataml/data/docs/uaf/docs_17_20/GenseriesFormula.py +206 -0
  407. teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +143 -0
  408. teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +198 -0
  409. teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +260 -0
  410. teradataml/data/docs/uaf/docs_17_20/IDFFT.py +165 -0
  411. teradataml/data/docs/uaf/docs_17_20/IDFFT2.py +191 -0
  412. teradataml/data/docs/uaf/docs_17_20/IDWT.py +236 -0
  413. teradataml/data/docs/uaf/docs_17_20/IDWT2D.py +226 -0
  414. teradataml/data/docs/uaf/docs_17_20/IQR.py +134 -0
  415. teradataml/data/docs/uaf/docs_17_20/InputValidator.py +121 -0
  416. teradataml/data/docs/uaf/docs_17_20/LineSpec.py +156 -0
  417. teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +215 -0
  418. teradataml/data/docs/uaf/docs_17_20/MAMean.py +174 -0
  419. teradataml/data/docs/uaf/docs_17_20/MInfo.py +134 -0
  420. teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +297 -0
  421. teradataml/data/docs/uaf/docs_17_20/MatrixMultiply.py +145 -0
  422. teradataml/data/docs/uaf/docs_17_20/MultivarRegr.py +191 -0
  423. teradataml/data/docs/uaf/docs_17_20/PACF.py +157 -0
  424. teradataml/data/docs/uaf/docs_17_20/Portman.py +217 -0
  425. teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +203 -0
  426. teradataml/data/docs/uaf/docs_17_20/PowerTransform.py +155 -0
  427. teradataml/data/docs/uaf/docs_17_20/Resample.py +237 -0
  428. teradataml/data/docs/uaf/docs_17_20/SAX.py +246 -0
  429. teradataml/data/docs/uaf/docs_17_20/SInfo.py +123 -0
  430. teradataml/data/docs/uaf/docs_17_20/SeasonalNormalize.py +173 -0
  431. teradataml/data/docs/uaf/docs_17_20/SelectionCriteria.py +174 -0
  432. teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +171 -0
  433. teradataml/data/docs/uaf/docs_17_20/SignifResidmean.py +164 -0
  434. teradataml/data/docs/uaf/docs_17_20/SimpleExp.py +180 -0
  435. teradataml/data/docs/uaf/docs_17_20/Smoothma.py +208 -0
  436. teradataml/data/docs/uaf/docs_17_20/TrackingOp.py +151 -0
  437. teradataml/data/docs/uaf/docs_17_20/UNDIFF.py +171 -0
  438. teradataml/data/docs/uaf/docs_17_20/Unnormalize.py +202 -0
  439. teradataml/data/docs/uaf/docs_17_20/WhitesGeneral.py +171 -0
  440. teradataml/data/docs/uaf/docs_17_20/WindowDFFT.py +368 -0
  441. teradataml/data/docs/uaf/docs_17_20/__init__.py +0 -0
  442. teradataml/data/dtw_example.json +18 -0
  443. teradataml/data/dtw_t1.csv +11 -0
  444. teradataml/data/dtw_t2.csv +4 -0
  445. teradataml/data/dwt2d_dataTable.csv +65 -0
  446. teradataml/data/dwt2d_example.json +16 -0
  447. teradataml/data/dwt_dataTable.csv +8 -0
  448. teradataml/data/dwt_example.json +15 -0
  449. teradataml/data/dwt_filterTable.csv +3 -0
  450. teradataml/data/dwt_filter_dim.csv +5 -0
  451. teradataml/data/emission.csv +9 -0
  452. teradataml/data/emp_table_by_dept.csv +19 -0
  453. teradataml/data/employee_info.csv +4 -0
  454. teradataml/data/employee_table.csv +6 -0
  455. teradataml/data/excluding_event_table.csv +2 -0
  456. teradataml/data/finance_data.csv +6 -0
  457. teradataml/data/finance_data2.csv +61 -0
  458. teradataml/data/finance_data3.csv +93 -0
  459. teradataml/data/finance_data4.csv +13 -0
  460. teradataml/data/fish.csv +160 -0
  461. teradataml/data/fm_blood2ageandweight.csv +26 -0
  462. teradataml/data/fmeasure_example.json +12 -0
  463. teradataml/data/followers_leaders.csv +10 -0
  464. teradataml/data/fpgrowth_example.json +12 -0
  465. teradataml/data/frequentpaths_example.json +29 -0
  466. teradataml/data/friends.csv +9 -0
  467. teradataml/data/fs_input.csv +33 -0
  468. teradataml/data/fs_input1.csv +33 -0
  469. teradataml/data/genData.csv +513 -0
  470. teradataml/data/geodataframe_example.json +40 -0
  471. teradataml/data/glass_types.csv +215 -0
  472. teradataml/data/glm_admissions_model.csv +12 -0
  473. teradataml/data/glm_example.json +56 -0
  474. teradataml/data/glml1l2_example.json +28 -0
  475. teradataml/data/glml1l2predict_example.json +54 -0
  476. teradataml/data/glmpredict_example.json +54 -0
  477. teradataml/data/gq_t1.csv +21 -0
  478. teradataml/data/grocery_transaction.csv +19 -0
  479. teradataml/data/hconvolve_complex_right.csv +5 -0
  480. teradataml/data/hconvolve_complex_rightmulti.csv +5 -0
  481. teradataml/data/histogram_example.json +12 -0
  482. teradataml/data/hmmdecoder_example.json +79 -0
  483. teradataml/data/hmmevaluator_example.json +25 -0
  484. teradataml/data/hmmsupervised_example.json +10 -0
  485. teradataml/data/hmmunsupervised_example.json +8 -0
  486. teradataml/data/hnsw_alter_data.csv +5 -0
  487. teradataml/data/hnsw_data.csv +10 -0
  488. teradataml/data/house_values.csv +12 -0
  489. teradataml/data/house_values2.csv +13 -0
  490. teradataml/data/housing_cat.csv +7 -0
  491. teradataml/data/housing_data.csv +9 -0
  492. teradataml/data/housing_test.csv +47 -0
  493. teradataml/data/housing_test_binary.csv +47 -0
  494. teradataml/data/housing_train.csv +493 -0
  495. teradataml/data/housing_train_attribute.csv +5 -0
  496. teradataml/data/housing_train_binary.csv +437 -0
  497. teradataml/data/housing_train_parameter.csv +2 -0
  498. teradataml/data/housing_train_response.csv +493 -0
  499. teradataml/data/housing_train_segment.csv +201 -0
  500. teradataml/data/ibm_stock.csv +370 -0
  501. teradataml/data/ibm_stock1.csv +370 -0
  502. teradataml/data/identitymatch_example.json +22 -0
  503. teradataml/data/idf_table.csv +4 -0
  504. teradataml/data/idwt2d_dataTable.csv +5 -0
  505. teradataml/data/idwt_dataTable.csv +8 -0
  506. teradataml/data/idwt_filterTable.csv +3 -0
  507. teradataml/data/impressions.csv +101 -0
  508. teradataml/data/inflation.csv +21 -0
  509. teradataml/data/initial.csv +3 -0
  510. teradataml/data/insect2Cols.csv +61 -0
  511. teradataml/data/insect_sprays.csv +13 -0
  512. teradataml/data/insurance.csv +1339 -0
  513. teradataml/data/interpolator_example.json +13 -0
  514. teradataml/data/interval_data.csv +5 -0
  515. teradataml/data/iris_altinput.csv +481 -0
  516. teradataml/data/iris_attribute_output.csv +8 -0
  517. teradataml/data/iris_attribute_test.csv +121 -0
  518. teradataml/data/iris_attribute_train.csv +481 -0
  519. teradataml/data/iris_category_expect_predict.csv +31 -0
  520. teradataml/data/iris_data.csv +151 -0
  521. teradataml/data/iris_input.csv +151 -0
  522. teradataml/data/iris_response_train.csv +121 -0
  523. teradataml/data/iris_test.csv +31 -0
  524. teradataml/data/iris_train.csv +121 -0
  525. teradataml/data/join_table1.csv +4 -0
  526. teradataml/data/join_table2.csv +4 -0
  527. teradataml/data/jsons/anly_function_name.json +7 -0
  528. teradataml/data/jsons/byom/ONNXSeq2Seq.json +287 -0
  529. teradataml/data/jsons/byom/dataikupredict.json +148 -0
  530. teradataml/data/jsons/byom/datarobotpredict.json +147 -0
  531. teradataml/data/jsons/byom/h2opredict.json +195 -0
  532. teradataml/data/jsons/byom/onnxembeddings.json +267 -0
  533. teradataml/data/jsons/byom/onnxpredict.json +187 -0
  534. teradataml/data/jsons/byom/pmmlpredict.json +147 -0
  535. teradataml/data/jsons/paired_functions.json +450 -0
  536. teradataml/data/jsons/sqle/16.20/Antiselect.json +56 -0
  537. teradataml/data/jsons/sqle/16.20/Attribution.json +249 -0
  538. teradataml/data/jsons/sqle/16.20/DecisionForestPredict.json +156 -0
  539. teradataml/data/jsons/sqle/16.20/DecisionTreePredict.json +170 -0
  540. teradataml/data/jsons/sqle/16.20/GLMPredict.json +122 -0
  541. teradataml/data/jsons/sqle/16.20/MovingAverage.json +367 -0
  542. teradataml/data/jsons/sqle/16.20/NGramSplitter.json +239 -0
  543. teradataml/data/jsons/sqle/16.20/NaiveBayesPredict.json +136 -0
  544. teradataml/data/jsons/sqle/16.20/NaiveBayesTextClassifierPredict.json +235 -0
  545. teradataml/data/jsons/sqle/16.20/Pack.json +98 -0
  546. teradataml/data/jsons/sqle/16.20/SVMSparsePredict.json +162 -0
  547. teradataml/data/jsons/sqle/16.20/Sessionize.json +105 -0
  548. teradataml/data/jsons/sqle/16.20/StringSimilarity.json +86 -0
  549. teradataml/data/jsons/sqle/16.20/Unpack.json +166 -0
  550. teradataml/data/jsons/sqle/16.20/nPath.json +269 -0
  551. teradataml/data/jsons/sqle/17.00/Antiselect.json +56 -0
  552. teradataml/data/jsons/sqle/17.00/Attribution.json +249 -0
  553. teradataml/data/jsons/sqle/17.00/DecisionForestPredict.json +156 -0
  554. teradataml/data/jsons/sqle/17.00/DecisionTreePredict.json +170 -0
  555. teradataml/data/jsons/sqle/17.00/GLMPredict.json +122 -0
  556. teradataml/data/jsons/sqle/17.00/MovingAverage.json +367 -0
  557. teradataml/data/jsons/sqle/17.00/NGramSplitter.json +239 -0
  558. teradataml/data/jsons/sqle/17.00/NaiveBayesPredict.json +136 -0
  559. teradataml/data/jsons/sqle/17.00/NaiveBayesTextClassifierPredict.json +235 -0
  560. teradataml/data/jsons/sqle/17.00/Pack.json +98 -0
  561. teradataml/data/jsons/sqle/17.00/SVMSparsePredict.json +162 -0
  562. teradataml/data/jsons/sqle/17.00/Sessionize.json +105 -0
  563. teradataml/data/jsons/sqle/17.00/StringSimilarity.json +86 -0
  564. teradataml/data/jsons/sqle/17.00/Unpack.json +166 -0
  565. teradataml/data/jsons/sqle/17.00/nPath.json +269 -0
  566. teradataml/data/jsons/sqle/17.05/Antiselect.json +56 -0
  567. teradataml/data/jsons/sqle/17.05/Attribution.json +249 -0
  568. teradataml/data/jsons/sqle/17.05/DecisionForestPredict.json +156 -0
  569. teradataml/data/jsons/sqle/17.05/DecisionTreePredict.json +170 -0
  570. teradataml/data/jsons/sqle/17.05/GLMPredict.json +122 -0
  571. teradataml/data/jsons/sqle/17.05/MovingAverage.json +367 -0
  572. teradataml/data/jsons/sqle/17.05/NGramSplitter.json +239 -0
  573. teradataml/data/jsons/sqle/17.05/NaiveBayesPredict.json +136 -0
  574. teradataml/data/jsons/sqle/17.05/NaiveBayesTextClassifierPredict.json +235 -0
  575. teradataml/data/jsons/sqle/17.05/Pack.json +98 -0
  576. teradataml/data/jsons/sqle/17.05/SVMSparsePredict.json +162 -0
  577. teradataml/data/jsons/sqle/17.05/Sessionize.json +105 -0
  578. teradataml/data/jsons/sqle/17.05/StringSimilarity.json +86 -0
  579. teradataml/data/jsons/sqle/17.05/Unpack.json +166 -0
  580. teradataml/data/jsons/sqle/17.05/nPath.json +269 -0
  581. teradataml/data/jsons/sqle/17.10/Antiselect.json +56 -0
  582. teradataml/data/jsons/sqle/17.10/Attribution.json +249 -0
  583. teradataml/data/jsons/sqle/17.10/DecisionForestPredict.json +185 -0
  584. teradataml/data/jsons/sqle/17.10/DecisionTreePredict.json +172 -0
  585. teradataml/data/jsons/sqle/17.10/GLMPredict.json +151 -0
  586. teradataml/data/jsons/sqle/17.10/MovingAverage.json +368 -0
  587. teradataml/data/jsons/sqle/17.10/NGramSplitter.json +239 -0
  588. teradataml/data/jsons/sqle/17.10/NaiveBayesPredict.json +149 -0
  589. teradataml/data/jsons/sqle/17.10/NaiveBayesTextClassifierPredict.json +288 -0
  590. teradataml/data/jsons/sqle/17.10/Pack.json +133 -0
  591. teradataml/data/jsons/sqle/17.10/SVMSparsePredict.json +193 -0
  592. teradataml/data/jsons/sqle/17.10/Sessionize.json +105 -0
  593. teradataml/data/jsons/sqle/17.10/StringSimilarity.json +86 -0
  594. teradataml/data/jsons/sqle/17.10/TD_BinCodeFit.json +239 -0
  595. teradataml/data/jsons/sqle/17.10/TD_BinCodeTransform.json +70 -0
  596. teradataml/data/jsons/sqle/17.10/TD_CategoricalSummary.json +54 -0
  597. teradataml/data/jsons/sqle/17.10/TD_Chisq.json +68 -0
  598. teradataml/data/jsons/sqle/17.10/TD_ColumnSummary.json +54 -0
  599. teradataml/data/jsons/sqle/17.10/TD_ConvertTo.json +69 -0
  600. teradataml/data/jsons/sqle/17.10/TD_FTest.json +187 -0
  601. teradataml/data/jsons/sqle/17.10/TD_FillRowID.json +52 -0
  602. teradataml/data/jsons/sqle/17.10/TD_FunctionFit.json +46 -0
  603. teradataml/data/jsons/sqle/17.10/TD_FunctionTransform.json +72 -0
  604. teradataml/data/jsons/sqle/17.10/TD_GetRowsWithMissingValues.json +53 -0
  605. teradataml/data/jsons/sqle/17.10/TD_GetRowsWithoutMissingValues.json +53 -0
  606. teradataml/data/jsons/sqle/17.10/TD_Histogram.json +133 -0
  607. teradataml/data/jsons/sqle/17.10/TD_NumApply.json +147 -0
  608. teradataml/data/jsons/sqle/17.10/TD_OneHotEncodingFit.json +183 -0
  609. teradataml/data/jsons/sqle/17.10/TD_OneHotEncodingTransform.json +66 -0
  610. teradataml/data/jsons/sqle/17.10/TD_OutlierFilterFit.json +197 -0
  611. teradataml/data/jsons/sqle/17.10/TD_OutlierFilterTransform.json +48 -0
  612. teradataml/data/jsons/sqle/17.10/TD_PolynomialFeaturesFit.json +114 -0
  613. teradataml/data/jsons/sqle/17.10/TD_PolynomialFeaturesTransform.json +72 -0
  614. teradataml/data/jsons/sqle/17.10/TD_QQNorm.json +112 -0
  615. teradataml/data/jsons/sqle/17.10/TD_RoundColumns.json +93 -0
  616. teradataml/data/jsons/sqle/17.10/TD_RowNormalizeFit.json +128 -0
  617. teradataml/data/jsons/sqle/17.10/TD_RowNormalizeTransform.json +71 -0
  618. teradataml/data/jsons/sqle/17.10/TD_ScaleFit.json +157 -0
  619. teradataml/data/jsons/sqle/17.10/TD_ScaleTransform.json +71 -0
  620. teradataml/data/jsons/sqle/17.10/TD_SimpleImputeFit.json +148 -0
  621. teradataml/data/jsons/sqle/17.10/TD_SimpleImputeTransform.json +48 -0
  622. teradataml/data/jsons/sqle/17.10/TD_StrApply.json +240 -0
  623. teradataml/data/jsons/sqle/17.10/TD_UnivariateStatistics.json +119 -0
  624. teradataml/data/jsons/sqle/17.10/TD_WhichMax.json +53 -0
  625. teradataml/data/jsons/sqle/17.10/TD_WhichMin.json +53 -0
  626. teradataml/data/jsons/sqle/17.10/TD_ZTest.json +171 -0
  627. teradataml/data/jsons/sqle/17.10/Unpack.json +188 -0
  628. teradataml/data/jsons/sqle/17.10/nPath.json +269 -0
  629. teradataml/data/jsons/sqle/17.20/Antiselect.json +56 -0
  630. teradataml/data/jsons/sqle/17.20/Attribution.json +249 -0
  631. teradataml/data/jsons/sqle/17.20/DecisionForestPredict.json +185 -0
  632. teradataml/data/jsons/sqle/17.20/DecisionTreePredict.json +172 -0
  633. teradataml/data/jsons/sqle/17.20/GLMPredict.json +151 -0
  634. teradataml/data/jsons/sqle/17.20/MovingAverage.json +367 -0
  635. teradataml/data/jsons/sqle/17.20/NGramSplitter.json +239 -0
  636. teradataml/data/jsons/sqle/17.20/NaiveBayesPredict.json +149 -0
  637. teradataml/data/jsons/sqle/17.20/NaiveBayesTextClassifierPredict.json +287 -0
  638. teradataml/data/jsons/sqle/17.20/Pack.json +133 -0
  639. teradataml/data/jsons/sqle/17.20/SVMSparsePredict.json +192 -0
  640. teradataml/data/jsons/sqle/17.20/Sessionize.json +105 -0
  641. teradataml/data/jsons/sqle/17.20/StringSimilarity.json +86 -0
  642. teradataml/data/jsons/sqle/17.20/TD_ANOVA.json +149 -0
  643. teradataml/data/jsons/sqle/17.20/TD_Apriori.json +181 -0
  644. teradataml/data/jsons/sqle/17.20/TD_BinCodeFit.json +239 -0
  645. teradataml/data/jsons/sqle/17.20/TD_BinCodeTransform.json +71 -0
  646. teradataml/data/jsons/sqle/17.20/TD_CFilter.json +118 -0
  647. teradataml/data/jsons/sqle/17.20/TD_CategoricalSummary.json +53 -0
  648. teradataml/data/jsons/sqle/17.20/TD_Chisq.json +68 -0
  649. teradataml/data/jsons/sqle/17.20/TD_ClassificationEvaluator.json +146 -0
  650. teradataml/data/jsons/sqle/17.20/TD_ColumnSummary.json +53 -0
  651. teradataml/data/jsons/sqle/17.20/TD_ColumnTransformer.json +218 -0
  652. teradataml/data/jsons/sqle/17.20/TD_ConvertTo.json +92 -0
  653. teradataml/data/jsons/sqle/17.20/TD_DecisionForest.json +260 -0
  654. teradataml/data/jsons/sqle/17.20/TD_DecisionForestPredict.json +139 -0
  655. teradataml/data/jsons/sqle/17.20/TD_FTest.json +269 -0
  656. teradataml/data/jsons/sqle/17.20/TD_FillRowID.json +52 -0
  657. teradataml/data/jsons/sqle/17.20/TD_FunctionFit.json +46 -0
  658. teradataml/data/jsons/sqle/17.20/TD_FunctionTransform.json +72 -0
  659. teradataml/data/jsons/sqle/17.20/TD_GLM.json +507 -0
  660. teradataml/data/jsons/sqle/17.20/TD_GLMPREDICT.json +168 -0
  661. teradataml/data/jsons/sqle/17.20/TD_GLMPerSegment.json +411 -0
  662. teradataml/data/jsons/sqle/17.20/TD_GLMPredictPerSegment.json +146 -0
  663. teradataml/data/jsons/sqle/17.20/TD_GetFutileColumns.json +93 -0
  664. teradataml/data/jsons/sqle/17.20/TD_GetRowsWithMissingValues.json +76 -0
  665. teradataml/data/jsons/sqle/17.20/TD_GetRowsWithoutMissingValues.json +76 -0
  666. teradataml/data/jsons/sqle/17.20/TD_Histogram.json +152 -0
  667. teradataml/data/jsons/sqle/17.20/TD_KMeans.json +232 -0
  668. teradataml/data/jsons/sqle/17.20/TD_KMeansPredict.json +87 -0
  669. teradataml/data/jsons/sqle/17.20/TD_KNN.json +262 -0
  670. teradataml/data/jsons/sqle/17.20/TD_NERExtractor.json +145 -0
  671. teradataml/data/jsons/sqle/17.20/TD_NaiveBayes.json +193 -0
  672. teradataml/data/jsons/sqle/17.20/TD_NaiveBayesPredict.json +212 -0
  673. teradataml/data/jsons/sqle/17.20/TD_NaiveBayesTextClassifierTrainer.json +137 -0
  674. teradataml/data/jsons/sqle/17.20/TD_NonLinearCombineFit.json +102 -0
  675. teradataml/data/jsons/sqle/17.20/TD_NonLinearCombineTransform.json +71 -0
  676. teradataml/data/jsons/sqle/17.20/TD_NumApply.json +147 -0
  677. teradataml/data/jsons/sqle/17.20/TD_OneClassSVM.json +316 -0
  678. teradataml/data/jsons/sqle/17.20/TD_OneClassSVMPredict.json +124 -0
  679. teradataml/data/jsons/sqle/17.20/TD_OneHotEncodingFit.json +271 -0
  680. teradataml/data/jsons/sqle/17.20/TD_OneHotEncodingTransform.json +65 -0
  681. teradataml/data/jsons/sqle/17.20/TD_OrdinalEncodingFit.json +229 -0
  682. teradataml/data/jsons/sqle/17.20/TD_OrdinalEncodingTransform.json +75 -0
  683. teradataml/data/jsons/sqle/17.20/TD_OutlierFilterFit.json +217 -0
  684. teradataml/data/jsons/sqle/17.20/TD_OutlierFilterTransform.json +48 -0
  685. teradataml/data/jsons/sqle/17.20/TD_Pivoting.json +280 -0
  686. teradataml/data/jsons/sqle/17.20/TD_PolynomialFeaturesFit.json +114 -0
  687. teradataml/data/jsons/sqle/17.20/TD_PolynomialFeaturesTransform.json +72 -0
  688. teradataml/data/jsons/sqle/17.20/TD_QQNorm.json +111 -0
  689. teradataml/data/jsons/sqle/17.20/TD_ROC.json +179 -0
  690. teradataml/data/jsons/sqle/17.20/TD_RandomProjectionFit.json +179 -0
  691. teradataml/data/jsons/sqle/17.20/TD_RandomProjectionMinComponents.json +74 -0
  692. teradataml/data/jsons/sqle/17.20/TD_RandomProjectionTransform.json +74 -0
  693. teradataml/data/jsons/sqle/17.20/TD_RegressionEvaluator.json +138 -0
  694. teradataml/data/jsons/sqle/17.20/TD_RoundColumns.json +93 -0
  695. teradataml/data/jsons/sqle/17.20/TD_RowNormalizeFit.json +128 -0
  696. teradataml/data/jsons/sqle/17.20/TD_RowNormalizeTransform.json +71 -0
  697. teradataml/data/jsons/sqle/17.20/TD_SMOTE.json +267 -0
  698. teradataml/data/jsons/sqle/17.20/TD_SVM.json +389 -0
  699. teradataml/data/jsons/sqle/17.20/TD_SVMPredict.json +142 -0
  700. teradataml/data/jsons/sqle/17.20/TD_ScaleFit.json +310 -0
  701. teradataml/data/jsons/sqle/17.20/TD_ScaleTransform.json +120 -0
  702. teradataml/data/jsons/sqle/17.20/TD_SentimentExtractor.json +194 -0
  703. teradataml/data/jsons/sqle/17.20/TD_Shap.json +221 -0
  704. teradataml/data/jsons/sqle/17.20/TD_Silhouette.json +143 -0
  705. teradataml/data/jsons/sqle/17.20/TD_SimpleImputeFit.json +147 -0
  706. teradataml/data/jsons/sqle/17.20/TD_SimpleImputeTransform.json +48 -0
  707. teradataml/data/jsons/sqle/17.20/TD_StrApply.json +240 -0
  708. teradataml/data/jsons/sqle/17.20/TD_TFIDF.json +162 -0
  709. teradataml/data/jsons/sqle/17.20/TD_TargetEncodingFit.json +248 -0
  710. teradataml/data/jsons/sqle/17.20/TD_TargetEncodingTransform.json +75 -0
  711. teradataml/data/jsons/sqle/17.20/TD_TextMorph.json +134 -0
  712. teradataml/data/jsons/sqle/17.20/TD_TextParser.json +297 -0
  713. teradataml/data/jsons/sqle/17.20/TD_TrainTestSplit.json +142 -0
  714. teradataml/data/jsons/sqle/17.20/TD_UnivariateStatistics.json +117 -0
  715. teradataml/data/jsons/sqle/17.20/TD_Unpivoting.json +235 -0
  716. teradataml/data/jsons/sqle/17.20/TD_VectorDistance.json +183 -0
  717. teradataml/data/jsons/sqle/17.20/TD_WhichMax.json +53 -0
  718. teradataml/data/jsons/sqle/17.20/TD_WhichMin.json +53 -0
  719. teradataml/data/jsons/sqle/17.20/TD_WordEmbeddings.json +241 -0
  720. teradataml/data/jsons/sqle/17.20/TD_XGBoost.json +330 -0
  721. teradataml/data/jsons/sqle/17.20/TD_XGBoostPredict.json +195 -0
  722. teradataml/data/jsons/sqle/17.20/TD_ZTest.json +247 -0
  723. teradataml/data/jsons/sqle/17.20/Unpack.json +188 -0
  724. teradataml/data/jsons/sqle/17.20/nPath.json +269 -0
  725. teradataml/data/jsons/sqle/20.00/AI_AnalyzeSentiment.json +370 -0
  726. teradataml/data/jsons/sqle/20.00/AI_AskLLM.json +460 -0
  727. teradataml/data/jsons/sqle/20.00/AI_DetectLanguage.json +385 -0
  728. teradataml/data/jsons/sqle/20.00/AI_ExtractKeyPhrases.json +369 -0
  729. teradataml/data/jsons/sqle/20.00/AI_MaskPII.json +369 -0
  730. teradataml/data/jsons/sqle/20.00/AI_RecognizeEntities.json +369 -0
  731. teradataml/data/jsons/sqle/20.00/AI_RecognizePIIEntities.json +369 -0
  732. teradataml/data/jsons/sqle/20.00/AI_TextClassifier.json +400 -0
  733. teradataml/data/jsons/sqle/20.00/AI_TextEmbeddings.json +401 -0
  734. teradataml/data/jsons/sqle/20.00/AI_TextSummarize.json +384 -0
  735. teradataml/data/jsons/sqle/20.00/AI_TextTranslate.json +384 -0
  736. teradataml/data/jsons/sqle/20.00/TD_API_AzureML.json +151 -0
  737. teradataml/data/jsons/sqle/20.00/TD_API_Sagemaker.json +182 -0
  738. teradataml/data/jsons/sqle/20.00/TD_API_VertexAI.json +183 -0
  739. teradataml/data/jsons/sqle/20.00/TD_HNSW.json +296 -0
  740. teradataml/data/jsons/sqle/20.00/TD_HNSWPredict.json +206 -0
  741. teradataml/data/jsons/sqle/20.00/TD_HNSWSummary.json +32 -0
  742. teradataml/data/jsons/sqle/20.00/TD_KMeans.json +250 -0
  743. teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +266 -0
  744. teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +278 -0
  745. teradataml/data/jsons/storedprocedure/17.20/TD_COPYART.json +71 -0
  746. teradataml/data/jsons/storedprocedure/17.20/TD_FILTERFACTORY1D.json +150 -0
  747. teradataml/data/jsons/tableoperator/17.00/read_nos.json +198 -0
  748. teradataml/data/jsons/tableoperator/17.05/read_nos.json +198 -0
  749. teradataml/data/jsons/tableoperator/17.05/write_nos.json +195 -0
  750. teradataml/data/jsons/tableoperator/17.10/read_nos.json +184 -0
  751. teradataml/data/jsons/tableoperator/17.10/write_nos.json +195 -0
  752. teradataml/data/jsons/tableoperator/17.20/IMAGE2MATRIX.json +53 -0
  753. teradataml/data/jsons/tableoperator/17.20/read_nos.json +183 -0
  754. teradataml/data/jsons/tableoperator/17.20/write_nos.json +224 -0
  755. teradataml/data/jsons/uaf/17.20/TD_ACF.json +132 -0
  756. teradataml/data/jsons/uaf/17.20/TD_ARIMAESTIMATE.json +396 -0
  757. teradataml/data/jsons/uaf/17.20/TD_ARIMAFORECAST.json +77 -0
  758. teradataml/data/jsons/uaf/17.20/TD_ARIMAVALIDATE.json +153 -0
  759. teradataml/data/jsons/uaf/17.20/TD_ARIMAXESTIMATE.json +362 -0
  760. teradataml/data/jsons/uaf/17.20/TD_AUTOARIMA.json +469 -0
  761. teradataml/data/jsons/uaf/17.20/TD_BINARYMATRIXOP.json +107 -0
  762. teradataml/data/jsons/uaf/17.20/TD_BINARYSERIESOP.json +106 -0
  763. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_GODFREY.json +89 -0
  764. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_PAGAN_GODFREY.json +104 -0
  765. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE.json +78 -0
  766. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE2.json +66 -0
  767. teradataml/data/jsons/uaf/17.20/TD_CUMUL_PERIODOGRAM.json +87 -0
  768. teradataml/data/jsons/uaf/17.20/TD_DFFT.json +134 -0
  769. teradataml/data/jsons/uaf/17.20/TD_DFFT2.json +144 -0
  770. teradataml/data/jsons/uaf/17.20/TD_DFFT2CONV.json +108 -0
  771. teradataml/data/jsons/uaf/17.20/TD_DFFTCONV.json +108 -0
  772. teradataml/data/jsons/uaf/17.20/TD_DICKEY_FULLER.json +78 -0
  773. teradataml/data/jsons/uaf/17.20/TD_DIFF.json +92 -0
  774. teradataml/data/jsons/uaf/17.20/TD_DTW.json +114 -0
  775. teradataml/data/jsons/uaf/17.20/TD_DURBIN_WATSON.json +101 -0
  776. teradataml/data/jsons/uaf/17.20/TD_DWT.json +173 -0
  777. teradataml/data/jsons/uaf/17.20/TD_DWT2D.json +160 -0
  778. teradataml/data/jsons/uaf/17.20/TD_EXTRACT_RESULTS.json +39 -0
  779. teradataml/data/jsons/uaf/17.20/TD_FITMETRICS.json +101 -0
  780. teradataml/data/jsons/uaf/17.20/TD_GENSERIES4FORMULA.json +85 -0
  781. teradataml/data/jsons/uaf/17.20/TD_GENSERIES4SINUSOIDS.json +71 -0
  782. teradataml/data/jsons/uaf/17.20/TD_GOLDFELD_QUANDT.json +139 -0
  783. teradataml/data/jsons/uaf/17.20/TD_HOLT_WINTERS_FORECASTER.json +313 -0
  784. teradataml/data/jsons/uaf/17.20/TD_IDFFT.json +58 -0
  785. teradataml/data/jsons/uaf/17.20/TD_IDFFT2.json +81 -0
  786. teradataml/data/jsons/uaf/17.20/TD_IDWT.json +162 -0
  787. teradataml/data/jsons/uaf/17.20/TD_IDWT2D.json +149 -0
  788. teradataml/data/jsons/uaf/17.20/TD_INPUTVALIDATOR.json +64 -0
  789. teradataml/data/jsons/uaf/17.20/TD_IQR.json +117 -0
  790. teradataml/data/jsons/uaf/17.20/TD_LINEAR_REGR.json +182 -0
  791. teradataml/data/jsons/uaf/17.20/TD_LINESPEC.json +103 -0
  792. teradataml/data/jsons/uaf/17.20/TD_MAMEAN.json +181 -0
  793. teradataml/data/jsons/uaf/17.20/TD_MATRIX2IMAGE.json +209 -0
  794. teradataml/data/jsons/uaf/17.20/TD_MATRIXMULTIPLY.json +68 -0
  795. teradataml/data/jsons/uaf/17.20/TD_MINFO.json +67 -0
  796. teradataml/data/jsons/uaf/17.20/TD_MULTIVAR_REGR.json +179 -0
  797. teradataml/data/jsons/uaf/17.20/TD_PACF.json +114 -0
  798. teradataml/data/jsons/uaf/17.20/TD_PORTMAN.json +119 -0
  799. teradataml/data/jsons/uaf/17.20/TD_POWERSPEC.json +175 -0
  800. teradataml/data/jsons/uaf/17.20/TD_POWERTRANSFORM.json +98 -0
  801. teradataml/data/jsons/uaf/17.20/TD_RESAMPLE.json +194 -0
  802. teradataml/data/jsons/uaf/17.20/TD_SAX.json +210 -0
  803. teradataml/data/jsons/uaf/17.20/TD_SEASONALNORMALIZE.json +143 -0
  804. teradataml/data/jsons/uaf/17.20/TD_SELECTION_CRITERIA.json +90 -0
  805. teradataml/data/jsons/uaf/17.20/TD_SIGNIF_PERIODICITIES.json +80 -0
  806. teradataml/data/jsons/uaf/17.20/TD_SIGNIF_RESIDMEAN.json +68 -0
  807. teradataml/data/jsons/uaf/17.20/TD_SIMPLEEXP.json +184 -0
  808. teradataml/data/jsons/uaf/17.20/TD_SINFO.json +58 -0
  809. teradataml/data/jsons/uaf/17.20/TD_SMOOTHMA.json +163 -0
  810. teradataml/data/jsons/uaf/17.20/TD_TRACKINGOP.json +101 -0
  811. teradataml/data/jsons/uaf/17.20/TD_UNDIFF.json +112 -0
  812. teradataml/data/jsons/uaf/17.20/TD_UNNORMALIZE.json +95 -0
  813. teradataml/data/jsons/uaf/17.20/TD_WHITES_GENERAL.json +78 -0
  814. teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +410 -0
  815. teradataml/data/kmeans_example.json +23 -0
  816. teradataml/data/kmeans_table.csv +10 -0
  817. teradataml/data/kmeans_us_arrests_data.csv +51 -0
  818. teradataml/data/knn_example.json +19 -0
  819. teradataml/data/knnrecommender_example.json +7 -0
  820. teradataml/data/knnrecommenderpredict_example.json +12 -0
  821. teradataml/data/lar_example.json +17 -0
  822. teradataml/data/larpredict_example.json +30 -0
  823. teradataml/data/lc_new_predictors.csv +5 -0
  824. teradataml/data/lc_new_reference.csv +9 -0
  825. teradataml/data/lda_example.json +9 -0
  826. teradataml/data/ldainference_example.json +15 -0
  827. teradataml/data/ldatopicsummary_example.json +9 -0
  828. teradataml/data/levendist_input.csv +13 -0
  829. teradataml/data/levenshteindistance_example.json +10 -0
  830. teradataml/data/linreg_example.json +10 -0
  831. teradataml/data/load_example_data.py +350 -0
  832. teradataml/data/loan_prediction.csv +295 -0
  833. teradataml/data/lungcancer.csv +138 -0
  834. teradataml/data/mappingdata.csv +12 -0
  835. teradataml/data/medical_readings.csv +101 -0
  836. teradataml/data/milk_timeseries.csv +157 -0
  837. teradataml/data/min_max_titanic.csv +4 -0
  838. teradataml/data/minhash_example.json +6 -0
  839. teradataml/data/ml_ratings.csv +7547 -0
  840. teradataml/data/ml_ratings_10.csv +2445 -0
  841. teradataml/data/mobile_data.csv +13 -0
  842. teradataml/data/model1_table.csv +5 -0
  843. teradataml/data/model2_table.csv +5 -0
  844. teradataml/data/models/License_file.txt +1 -0
  845. teradataml/data/models/License_file_empty.txt +0 -0
  846. teradataml/data/models/dataiku_iris_data_ann_thin +0 -0
  847. teradataml/data/models/dr_iris_rf +0 -0
  848. teradataml/data/models/iris_db_dt_model_sklearn.onnx +0 -0
  849. teradataml/data/models/iris_db_dt_model_sklearn_floattensor.onnx +0 -0
  850. teradataml/data/models/iris_db_glm_model.pmml +57 -0
  851. teradataml/data/models/iris_db_xgb_model.pmml +4471 -0
  852. teradataml/data/models/iris_kmeans_model +0 -0
  853. teradataml/data/models/iris_mojo_glm_h2o_model +0 -0
  854. teradataml/data/models/iris_mojo_xgb_h2o_model +0 -0
  855. teradataml/data/modularity_example.json +12 -0
  856. teradataml/data/movavg_example.json +8 -0
  857. teradataml/data/mtx1.csv +7 -0
  858. teradataml/data/mtx2.csv +13 -0
  859. teradataml/data/multi_model_classification.csv +401 -0
  860. teradataml/data/multi_model_regression.csv +401 -0
  861. teradataml/data/mvdfft8.csv +9 -0
  862. teradataml/data/naivebayes_example.json +10 -0
  863. teradataml/data/naivebayespredict_example.json +19 -0
  864. teradataml/data/naivebayestextclassifier2_example.json +7 -0
  865. teradataml/data/naivebayestextclassifier_example.json +8 -0
  866. teradataml/data/naivebayestextclassifierpredict_example.json +32 -0
  867. teradataml/data/name_Find_configure.csv +10 -0
  868. teradataml/data/namedentityfinder_example.json +14 -0
  869. teradataml/data/namedentityfinderevaluator_example.json +10 -0
  870. teradataml/data/namedentityfindertrainer_example.json +6 -0
  871. teradataml/data/nb_iris_input_test.csv +31 -0
  872. teradataml/data/nb_iris_input_train.csv +121 -0
  873. teradataml/data/nbp_iris_model.csv +13 -0
  874. teradataml/data/ner_dict.csv +8 -0
  875. teradataml/data/ner_extractor_text.csv +2 -0
  876. teradataml/data/ner_input_eng.csv +7 -0
  877. teradataml/data/ner_rule.csv +5 -0
  878. teradataml/data/ner_sports_test2.csv +29 -0
  879. teradataml/data/ner_sports_train.csv +501 -0
  880. teradataml/data/nerevaluator_example.json +6 -0
  881. teradataml/data/nerextractor_example.json +18 -0
  882. teradataml/data/nermem_sports_test.csv +18 -0
  883. teradataml/data/nermem_sports_train.csv +51 -0
  884. teradataml/data/nertrainer_example.json +7 -0
  885. teradataml/data/ngrams_example.json +7 -0
  886. teradataml/data/notebooks/__init__.py +0 -0
  887. teradataml/data/notebooks/sqlalchemy/Teradata Vantage Aggregate Functions using SQLAlchemy.ipynb +1455 -0
  888. teradataml/data/notebooks/sqlalchemy/Teradata Vantage Arithmetic Functions Using SQLAlchemy.ipynb +1993 -0
  889. teradataml/data/notebooks/sqlalchemy/Teradata Vantage Bit-Byte Manipulation Functions using SQLAlchemy.ipynb +1492 -0
  890. teradataml/data/notebooks/sqlalchemy/Teradata Vantage Built-in functions using SQLAlchemy.ipynb +536 -0
  891. teradataml/data/notebooks/sqlalchemy/Teradata Vantage Regular Expressions Using SQLAlchemy.ipynb +570 -0
  892. teradataml/data/notebooks/sqlalchemy/Teradata Vantage String Functions Using SQLAlchemy.ipynb +2559 -0
  893. teradataml/data/notebooks/sqlalchemy/Teradata Vantage Window Aggregate Functions using SQLAlchemy.ipynb +2911 -0
  894. teradataml/data/notebooks/sqlalchemy/Using Generic SQLAlchemy ClauseElements teradataml DataFrame assign method.ipynb +698 -0
  895. teradataml/data/notebooks/sqlalchemy/__init__.py +0 -0
  896. teradataml/data/notebooks/sqlalchemy/teradataml filtering using SQLAlchemy ClauseElements.ipynb +784 -0
  897. teradataml/data/npath_example.json +23 -0
  898. teradataml/data/ntree_example.json +14 -0
  899. teradataml/data/numeric_strings.csv +5 -0
  900. teradataml/data/numerics.csv +4 -0
  901. teradataml/data/ocean_buoy.csv +17 -0
  902. teradataml/data/ocean_buoy2.csv +17 -0
  903. teradataml/data/ocean_buoys.csv +28 -0
  904. teradataml/data/ocean_buoys2.csv +10 -0
  905. teradataml/data/ocean_buoys_nonpti.csv +28 -0
  906. teradataml/data/ocean_buoys_seq.csv +29 -0
  907. teradataml/data/onehot_encoder_train.csv +4 -0
  908. teradataml/data/openml_example.json +92 -0
  909. teradataml/data/optional_event_table.csv +4 -0
  910. teradataml/data/orders1.csv +11 -0
  911. teradataml/data/orders1_12.csv +13 -0
  912. teradataml/data/orders_ex.csv +4 -0
  913. teradataml/data/pack_example.json +9 -0
  914. teradataml/data/package_tracking.csv +19 -0
  915. teradataml/data/package_tracking_pti.csv +19 -0
  916. teradataml/data/pagerank_example.json +13 -0
  917. teradataml/data/paragraphs_input.csv +6 -0
  918. teradataml/data/pathanalyzer_example.json +8 -0
  919. teradataml/data/pathgenerator_example.json +8 -0
  920. teradataml/data/patient_profile.csv +101 -0
  921. teradataml/data/pattern_matching_data.csv +11 -0
  922. teradataml/data/payment_fraud_dataset.csv +10001 -0
  923. teradataml/data/peppers.png +0 -0
  924. teradataml/data/phrases.csv +7 -0
  925. teradataml/data/pivot_example.json +9 -0
  926. teradataml/data/pivot_input.csv +22 -0
  927. teradataml/data/playerRating.csv +31 -0
  928. teradataml/data/pos_input.csv +40 -0
  929. teradataml/data/postagger_example.json +7 -0
  930. teradataml/data/posttagger_output.csv +44 -0
  931. teradataml/data/production_data.csv +17 -0
  932. teradataml/data/production_data2.csv +7 -0
  933. teradataml/data/randomsample_example.json +32 -0
  934. teradataml/data/randomwalksample_example.json +9 -0
  935. teradataml/data/rank_table.csv +6 -0
  936. teradataml/data/real_values.csv +14 -0
  937. teradataml/data/ref_mobile_data.csv +4 -0
  938. teradataml/data/ref_mobile_data_dense.csv +2 -0
  939. teradataml/data/ref_url.csv +17 -0
  940. teradataml/data/restaurant_reviews.csv +7 -0
  941. teradataml/data/retail_churn_table.csv +27772 -0
  942. teradataml/data/river_data.csv +145 -0
  943. teradataml/data/roc_example.json +8 -0
  944. teradataml/data/roc_input.csv +101 -0
  945. teradataml/data/rule_inputs.csv +6 -0
  946. teradataml/data/rule_table.csv +2 -0
  947. teradataml/data/sales.csv +7 -0
  948. teradataml/data/sales_transaction.csv +501 -0
  949. teradataml/data/salesdata.csv +342 -0
  950. teradataml/data/sample_cities.csv +3 -0
  951. teradataml/data/sample_shapes.csv +11 -0
  952. teradataml/data/sample_streets.csv +3 -0
  953. teradataml/data/sampling_example.json +16 -0
  954. teradataml/data/sax_example.json +17 -0
  955. teradataml/data/scale_attributes.csv +3 -0
  956. teradataml/data/scale_example.json +74 -0
  957. teradataml/data/scale_housing.csv +11 -0
  958. teradataml/data/scale_housing_test.csv +6 -0
  959. teradataml/data/scale_input_part_sparse.csv +31 -0
  960. teradataml/data/scale_input_partitioned.csv +16 -0
  961. teradataml/data/scale_input_sparse.csv +11 -0
  962. teradataml/data/scale_parameters.csv +3 -0
  963. teradataml/data/scale_stat.csv +11 -0
  964. teradataml/data/scalebypartition_example.json +13 -0
  965. teradataml/data/scalemap_example.json +13 -0
  966. teradataml/data/scalesummary_example.json +12 -0
  967. teradataml/data/score_category.csv +101 -0
  968. teradataml/data/score_summary.csv +4 -0
  969. teradataml/data/script_example.json +10 -0
  970. teradataml/data/scripts/deploy_script.py +84 -0
  971. teradataml/data/scripts/lightgbm/dataset.template +175 -0
  972. teradataml/data/scripts/lightgbm/lightgbm_class_functions.template +264 -0
  973. teradataml/data/scripts/lightgbm/lightgbm_function.template +234 -0
  974. teradataml/data/scripts/lightgbm/lightgbm_sklearn.template +177 -0
  975. teradataml/data/scripts/mapper.R +20 -0
  976. teradataml/data/scripts/mapper.py +16 -0
  977. teradataml/data/scripts/mapper_replace.py +16 -0
  978. teradataml/data/scripts/sklearn/__init__.py +0 -0
  979. teradataml/data/scripts/sklearn/sklearn_fit.py +205 -0
  980. teradataml/data/scripts/sklearn/sklearn_fit_predict.py +148 -0
  981. teradataml/data/scripts/sklearn/sklearn_function.template +144 -0
  982. teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +166 -0
  983. teradataml/data/scripts/sklearn/sklearn_neighbors.py +161 -0
  984. teradataml/data/scripts/sklearn/sklearn_score.py +145 -0
  985. teradataml/data/scripts/sklearn/sklearn_transform.py +327 -0
  986. teradataml/data/sdk/modelops/modelops_spec.json +101737 -0
  987. teradataml/data/seeds.csv +10 -0
  988. teradataml/data/sentenceextractor_example.json +7 -0
  989. teradataml/data/sentiment_extract_input.csv +11 -0
  990. teradataml/data/sentiment_train.csv +16 -0
  991. teradataml/data/sentiment_word.csv +20 -0
  992. teradataml/data/sentiment_word_input.csv +20 -0
  993. teradataml/data/sentimentextractor_example.json +24 -0
  994. teradataml/data/sentimenttrainer_example.json +8 -0
  995. teradataml/data/sequence_table.csv +10 -0
  996. teradataml/data/seriessplitter_example.json +8 -0
  997. teradataml/data/sessionize_example.json +17 -0
  998. teradataml/data/sessionize_table.csv +116 -0
  999. teradataml/data/setop_test1.csv +24 -0
  1000. teradataml/data/setop_test2.csv +22 -0
  1001. teradataml/data/soc_nw_edges.csv +11 -0
  1002. teradataml/data/soc_nw_vertices.csv +8 -0
  1003. teradataml/data/souvenir_timeseries.csv +168 -0
  1004. teradataml/data/sparse_iris_attribute.csv +5 -0
  1005. teradataml/data/sparse_iris_test.csv +121 -0
  1006. teradataml/data/sparse_iris_train.csv +601 -0
  1007. teradataml/data/star1.csv +6 -0
  1008. teradataml/data/star_pivot.csv +8 -0
  1009. teradataml/data/state_transition.csv +5 -0
  1010. teradataml/data/stock_data.csv +53 -0
  1011. teradataml/data/stock_movement.csv +11 -0
  1012. teradataml/data/stock_vol.csv +76 -0
  1013. teradataml/data/stop_words.csv +8 -0
  1014. teradataml/data/store_sales.csv +37 -0
  1015. teradataml/data/stringsimilarity_example.json +8 -0
  1016. teradataml/data/strsimilarity_input.csv +13 -0
  1017. teradataml/data/students.csv +101 -0
  1018. teradataml/data/svm_iris_input_test.csv +121 -0
  1019. teradataml/data/svm_iris_input_train.csv +481 -0
  1020. teradataml/data/svm_iris_model.csv +7 -0
  1021. teradataml/data/svmdense_example.json +10 -0
  1022. teradataml/data/svmdensepredict_example.json +19 -0
  1023. teradataml/data/svmsparse_example.json +8 -0
  1024. teradataml/data/svmsparsepredict_example.json +14 -0
  1025. teradataml/data/svmsparsesummary_example.json +8 -0
  1026. teradataml/data/target_mobile_data.csv +13 -0
  1027. teradataml/data/target_mobile_data_dense.csv +5 -0
  1028. teradataml/data/target_udt_data.csv +8 -0
  1029. teradataml/data/tdnerextractor_example.json +14 -0
  1030. teradataml/data/templatedata.csv +1201 -0
  1031. teradataml/data/templates/open_source_ml.json +11 -0
  1032. teradataml/data/teradata_icon.ico +0 -0
  1033. teradataml/data/teradataml_example.json +1473 -0
  1034. teradataml/data/test_classification.csv +101 -0
  1035. teradataml/data/test_loan_prediction.csv +53 -0
  1036. teradataml/data/test_pacf_12.csv +37 -0
  1037. teradataml/data/test_prediction.csv +101 -0
  1038. teradataml/data/test_regression.csv +101 -0
  1039. teradataml/data/test_river2.csv +109 -0
  1040. teradataml/data/text_inputs.csv +6 -0
  1041. teradataml/data/textchunker_example.json +8 -0
  1042. teradataml/data/textclassifier_example.json +7 -0
  1043. teradataml/data/textclassifier_input.csv +7 -0
  1044. teradataml/data/textclassifiertrainer_example.json +7 -0
  1045. teradataml/data/textmorph_example.json +11 -0
  1046. teradataml/data/textparser_example.json +15 -0
  1047. teradataml/data/texttagger_example.json +12 -0
  1048. teradataml/data/texttokenizer_example.json +7 -0
  1049. teradataml/data/texttrainer_input.csv +11 -0
  1050. teradataml/data/tf_example.json +7 -0
  1051. teradataml/data/tfidf_example.json +14 -0
  1052. teradataml/data/tfidf_input1.csv +201 -0
  1053. teradataml/data/tfidf_train.csv +6 -0
  1054. teradataml/data/time_table1.csv +535 -0
  1055. teradataml/data/time_table2.csv +14 -0
  1056. teradataml/data/timeseriesdata.csv +1601 -0
  1057. teradataml/data/timeseriesdatasetsd4.csv +105 -0
  1058. teradataml/data/timestamp_data.csv +4 -0
  1059. teradataml/data/titanic.csv +892 -0
  1060. teradataml/data/titanic_dataset_unpivoted.csv +19 -0
  1061. teradataml/data/to_num_data.csv +4 -0
  1062. teradataml/data/tochar_data.csv +5 -0
  1063. teradataml/data/token_table.csv +696 -0
  1064. teradataml/data/train_multiclass.csv +101 -0
  1065. teradataml/data/train_regression.csv +101 -0
  1066. teradataml/data/train_regression_multiple_labels.csv +101 -0
  1067. teradataml/data/train_tracking.csv +28 -0
  1068. teradataml/data/trans_dense.csv +16 -0
  1069. teradataml/data/trans_sparse.csv +55 -0
  1070. teradataml/data/transformation_table.csv +6 -0
  1071. teradataml/data/transformation_table_new.csv +2 -0
  1072. teradataml/data/tv_spots.csv +16 -0
  1073. teradataml/data/twod_climate_data.csv +117 -0
  1074. teradataml/data/uaf_example.json +529 -0
  1075. teradataml/data/univariatestatistics_example.json +9 -0
  1076. teradataml/data/unpack_example.json +10 -0
  1077. teradataml/data/unpivot_example.json +25 -0
  1078. teradataml/data/unpivot_input.csv +8 -0
  1079. teradataml/data/url_data.csv +10 -0
  1080. teradataml/data/us_air_pass.csv +37 -0
  1081. teradataml/data/us_population.csv +624 -0
  1082. teradataml/data/us_states_shapes.csv +52 -0
  1083. teradataml/data/varmax_example.json +18 -0
  1084. teradataml/data/vectordistance_example.json +30 -0
  1085. teradataml/data/ville_climatedata.csv +121 -0
  1086. teradataml/data/ville_tempdata.csv +12 -0
  1087. teradataml/data/ville_tempdata1.csv +12 -0
  1088. teradataml/data/ville_temperature.csv +11 -0
  1089. teradataml/data/waveletTable.csv +1605 -0
  1090. teradataml/data/waveletTable2.csv +1605 -0
  1091. teradataml/data/weightedmovavg_example.json +9 -0
  1092. teradataml/data/wft_testing.csv +5 -0
  1093. teradataml/data/windowdfft.csv +16 -0
  1094. teradataml/data/wine_data.csv +1600 -0
  1095. teradataml/data/word_embed_input_table1.csv +6 -0
  1096. teradataml/data/word_embed_input_table2.csv +5 -0
  1097. teradataml/data/word_embed_model.csv +23 -0
  1098. teradataml/data/words_input.csv +13 -0
  1099. teradataml/data/xconvolve_complex_left.csv +6 -0
  1100. teradataml/data/xconvolve_complex_leftmulti.csv +6 -0
  1101. teradataml/data/xgboost_example.json +36 -0
  1102. teradataml/data/xgboostpredict_example.json +32 -0
  1103. teradataml/data/ztest_example.json +16 -0
  1104. teradataml/dataframe/__init__.py +0 -0
  1105. teradataml/dataframe/copy_to.py +2446 -0
  1106. teradataml/dataframe/data_transfer.py +2840 -0
  1107. teradataml/dataframe/dataframe.py +20908 -0
  1108. teradataml/dataframe/dataframe_utils.py +2114 -0
  1109. teradataml/dataframe/fastload.py +794 -0
  1110. teradataml/dataframe/functions.py +2110 -0
  1111. teradataml/dataframe/indexer.py +424 -0
  1112. teradataml/dataframe/row.py +160 -0
  1113. teradataml/dataframe/setop.py +1171 -0
  1114. teradataml/dataframe/sql.py +10904 -0
  1115. teradataml/dataframe/sql_function_parameters.py +440 -0
  1116. teradataml/dataframe/sql_functions.py +652 -0
  1117. teradataml/dataframe/sql_interfaces.py +220 -0
  1118. teradataml/dataframe/vantage_function_types.py +675 -0
  1119. teradataml/dataframe/window.py +694 -0
  1120. teradataml/dbutils/__init__.py +3 -0
  1121. teradataml/dbutils/dbutils.py +2871 -0
  1122. teradataml/dbutils/filemgr.py +318 -0
  1123. teradataml/gen_ai/__init__.py +2 -0
  1124. teradataml/gen_ai/convAI.py +473 -0
  1125. teradataml/geospatial/__init__.py +4 -0
  1126. teradataml/geospatial/geodataframe.py +1105 -0
  1127. teradataml/geospatial/geodataframecolumn.py +392 -0
  1128. teradataml/geospatial/geometry_types.py +926 -0
  1129. teradataml/hyperparameter_tuner/__init__.py +1 -0
  1130. teradataml/hyperparameter_tuner/optimizer.py +4115 -0
  1131. teradataml/hyperparameter_tuner/utils.py +303 -0
  1132. teradataml/lib/__init__.py +0 -0
  1133. teradataml/lib/aed_0_1.dll +0 -0
  1134. teradataml/lib/libaed_0_1.dylib +0 -0
  1135. teradataml/lib/libaed_0_1.so +0 -0
  1136. teradataml/lib/libaed_0_1_aarch64.so +0 -0
  1137. teradataml/lib/libaed_0_1_ppc64le.so +0 -0
  1138. teradataml/opensource/__init__.py +1 -0
  1139. teradataml/opensource/_base.py +1321 -0
  1140. teradataml/opensource/_class.py +464 -0
  1141. teradataml/opensource/_constants.py +61 -0
  1142. teradataml/opensource/_lightgbm.py +949 -0
  1143. teradataml/opensource/_sklearn.py +1008 -0
  1144. teradataml/opensource/_wrapper_utils.py +267 -0
  1145. teradataml/options/__init__.py +148 -0
  1146. teradataml/options/configure.py +489 -0
  1147. teradataml/options/display.py +187 -0
  1148. teradataml/plot/__init__.py +3 -0
  1149. teradataml/plot/axis.py +1427 -0
  1150. teradataml/plot/constants.py +15 -0
  1151. teradataml/plot/figure.py +431 -0
  1152. teradataml/plot/plot.py +810 -0
  1153. teradataml/plot/query_generator.py +83 -0
  1154. teradataml/plot/subplot.py +216 -0
  1155. teradataml/scriptmgmt/UserEnv.py +4273 -0
  1156. teradataml/scriptmgmt/__init__.py +3 -0
  1157. teradataml/scriptmgmt/lls_utils.py +2157 -0
  1158. teradataml/sdk/README.md +79 -0
  1159. teradataml/sdk/__init__.py +4 -0
  1160. teradataml/sdk/_auth_modes.py +422 -0
  1161. teradataml/sdk/_func_params.py +487 -0
  1162. teradataml/sdk/_json_parser.py +453 -0
  1163. teradataml/sdk/_openapi_spec_constants.py +249 -0
  1164. teradataml/sdk/_utils.py +236 -0
  1165. teradataml/sdk/api_client.py +900 -0
  1166. teradataml/sdk/constants.py +62 -0
  1167. teradataml/sdk/modelops/__init__.py +98 -0
  1168. teradataml/sdk/modelops/_client.py +409 -0
  1169. teradataml/sdk/modelops/_constants.py +304 -0
  1170. teradataml/sdk/modelops/models.py +2308 -0
  1171. teradataml/sdk/spinner.py +107 -0
  1172. teradataml/series/__init__.py +0 -0
  1173. teradataml/series/series.py +537 -0
  1174. teradataml/series/series_utils.py +71 -0
  1175. teradataml/store/__init__.py +12 -0
  1176. teradataml/store/feature_store/__init__.py +0 -0
  1177. teradataml/store/feature_store/constants.py +658 -0
  1178. teradataml/store/feature_store/feature_store.py +4814 -0
  1179. teradataml/store/feature_store/mind_map.py +639 -0
  1180. teradataml/store/feature_store/models.py +7330 -0
  1181. teradataml/store/feature_store/utils.py +390 -0
  1182. teradataml/table_operators/Apply.py +979 -0
  1183. teradataml/table_operators/Script.py +1739 -0
  1184. teradataml/table_operators/TableOperator.py +1343 -0
  1185. teradataml/table_operators/__init__.py +2 -0
  1186. teradataml/table_operators/apply_query_generator.py +262 -0
  1187. teradataml/table_operators/query_generator.py +493 -0
  1188. teradataml/table_operators/table_operator_query_generator.py +462 -0
  1189. teradataml/table_operators/table_operator_util.py +726 -0
  1190. teradataml/table_operators/templates/dataframe_apply.template +184 -0
  1191. teradataml/table_operators/templates/dataframe_map.template +176 -0
  1192. teradataml/table_operators/templates/dataframe_register.template +73 -0
  1193. teradataml/table_operators/templates/dataframe_udf.template +67 -0
  1194. teradataml/table_operators/templates/script_executor.template +170 -0
  1195. teradataml/telemetry_utils/__init__.py +0 -0
  1196. teradataml/telemetry_utils/queryband.py +53 -0
  1197. teradataml/utils/__init__.py +0 -0
  1198. teradataml/utils/docstring.py +527 -0
  1199. teradataml/utils/dtypes.py +943 -0
  1200. teradataml/utils/internal_buffer.py +122 -0
  1201. teradataml/utils/print_versions.py +206 -0
  1202. teradataml/utils/utils.py +451 -0
  1203. teradataml/utils/validators.py +3305 -0
  1204. teradataml-20.0.0.8.dist-info/METADATA +2804 -0
  1205. teradataml-20.0.0.8.dist-info/RECORD +1208 -0
  1206. teradataml-20.0.0.8.dist-info/WHEEL +5 -0
  1207. teradataml-20.0.0.8.dist-info/top_level.txt +1 -0
  1208. teradataml-20.0.0.8.dist-info/zip-safe +1 -0
@@ -0,0 +1,1805 @@
1
+ """
2
+ Unpublished work.
3
+ Copyright (c) 2021 by Teradata Corporation. All rights reserved.
4
+ TERADATA CORPORATION CONFIDENTIAL AND TRADE SECRET
5
+
6
+ Primary Owner: pradeep.garre@teradata.com
7
+ Secondary Owner: PankajVinod.Purandare@teradata.com
8
+
9
+ This file implements several classes for representing the input, output and other
10
+ arguments of analytic functions. These are used by IN-DB SQLE analytic framework
11
+ for parsing and storing the JSON details of each argument of each function.
12
+ File implements classes for following:
13
+ * Analytic Function Argument Base
14
+ * Analytic Function Input Argument
15
+ * Analytic Function Output Argument
16
+ * Analytic Function Other Argument
17
+ """
18
+ import re
19
+ from teradataml.analytics.json_parser import PartitionKind
20
+ from teradataml.utils.dtypes import _Dtypes
21
+ from teradataml.utils.validators import _Validators
22
+ from teradataml.common.messages import Messages, MessageCodes
23
+ from teradataml.common.exceptions import TeradataMlException
24
+ from teradataml.common.utils import UtilFuncs
25
+ from teradataml.analytics.json_parser import UAFJsonFields as SJF
26
+ from teradataml.dataframe.dataframe import TDSeries, TDMatrix, TDAnalyticResult, TDGenSeries
27
+
28
+
29
+ class _DependentArgument:
30
+ """
31
+ Class to hold the information about dependent argument.
32
+ """
33
+ def __init__(self, sql_name, type, operator, right_operand):
34
+ """
35
+ DESCRIPTION:
36
+ Constructor for the class.
37
+
38
+ PARAMETERS:
39
+ sql_name:
40
+ Required Argument.
41
+ Specifies the name of the dependent argument in SQL.
42
+ Types: str
43
+
44
+ type:
45
+ Required Argument.
46
+ Specifies the type of the dependent argument. Dependent argument
47
+ type can be input_tables or arguments or output_tables.
48
+ Types: str
49
+
50
+ operator:
51
+ Required Argument.
52
+ Specifies the comparision operators for dependent argument.
53
+ Types: str
54
+
55
+ right_operand:
56
+ Required Argument.
57
+ Specifies the value to be used for comparing the dependent argument
58
+ using 'operator'.
59
+ Types: str
60
+ """
61
+ self.sql_name = sql_name
62
+ self.operator = operator
63
+ self.right_operand = right_operand
64
+ self.type = type
65
+
66
+ def is_required(self, arg_value):
67
+ """
68
+ DESCRIPTION:
69
+ Check if argument is required or not based on the value of dependent argument.
70
+
71
+ PARAMETERS:
72
+ arg_value:
73
+ Required Argument.
74
+ Specifies the value of dependent argument passed by the user.
75
+ Types: str or int or bool or float or list
76
+
77
+ RETURNS:
78
+ bool
79
+
80
+ RAISES:
81
+ None
82
+
83
+ EXAMPLES:
84
+ _DependentArgument("MethodType", "arguments", "=", "EQUAL-WIDTH").is_required("EQUAL-WIDTH")
85
+ """
86
+ if self.operator == "=":
87
+ return arg_value == self.right_operand
88
+ elif self.operator == ">=":
89
+ return arg_value >= self.right_operand
90
+ elif self.operator == ">":
91
+ return arg_value > self.right_operand
92
+ elif self.operator == "<=":
93
+ return arg_value <= self.right_operand
94
+ elif self.operator == "<":
95
+ return arg_value < self.right_operand
96
+ elif self.operator == "IN":
97
+ return arg_value in self.right_operand
98
+ elif self.operator == "NOT IN":
99
+ return arg_value not in self.right_operand
100
+ else:
101
+ msg_code = MessageCodes.EXECUTION_FAILED
102
+ raise TeradataMlException(
103
+ Messages.get_message(msg_code,
104
+ "parse the dependent argument '{}'".format(self.sql_name),
105
+ "Operator '{}' is not implemented".format(self.operator)),
106
+ msg_code)
107
+
108
+
109
+ class _AnlyFuncArgumentBase(object):
110
+ """
111
+ Class to hold the basic/common information about all the arguments.
112
+ """
113
+ def __init__(self, sql_name, is_required, sql_description, lang_description, lang_name, use_in_r):
114
+ """
115
+ DESCRIPTION:
116
+ Constructor for the class.
117
+
118
+ PARAMETERS:
119
+ sql_name:
120
+ Required Argument.
121
+ Specifies the name of the argument in SQL.
122
+ Types: str
123
+
124
+ is_required:
125
+ Required Argument.
126
+ Specifies whether the argument is required or not.
127
+ Types: bool
128
+
129
+ sql_description:
130
+ Required Argument.
131
+ Specifies the description of argument in SQL.
132
+ Types: str
133
+
134
+ lang_description:
135
+ Required Argument.
136
+ Specifies the description of the argument, which needs to be exposed
137
+ to user.
138
+ Types: str
139
+
140
+ lang_name:
141
+ Required Argument.
142
+ Specifies the name of the argument to be exposed to user.
143
+ Types: str
144
+
145
+ use_in_r:
146
+ Required Argument.
147
+ Specifies whether argument should be used in client or not.
148
+ Types: bool
149
+ """
150
+ self.__sql_name = sql_name
151
+ self.__is_required = is_required
152
+ self.__sql_description = sql_description
153
+ self.__description = lang_description
154
+ self.__name = lang_name
155
+ self.__use_in_r = use_in_r
156
+
157
+ awu_matrix = []
158
+ awu_matrix.append(["sql_name", sql_name, False, (str,), True])
159
+ awu_matrix.append(["is_required", is_required, False, (bool,)])
160
+ awu_matrix.append(["sql_description", sql_description, False, (str,), True])
161
+ awu_matrix.append(["lang_description", lang_description, False, (str,), True])
162
+ awu_matrix.append(["lang_name", lang_name, False, (str,), True])
163
+ awu_matrix.append(["use_in_r", use_in_r, False, (bool,)])
164
+
165
+ # Validate argument types.
166
+ _Validators._validate_function_arguments(awu_matrix)
167
+ self.is_empty_value_allowed = lambda: True
168
+ self.is_output_column = lambda: False
169
+ self.get_r_default_value = lambda: None
170
+
171
+ # Getters
172
+ def get_sql_name(self):
173
+ """
174
+ DESCRIPTION:
175
+ Get SQL name of the argument.
176
+
177
+ RETURNS:
178
+ str
179
+
180
+ RAISES:
181
+ None
182
+
183
+ EXAMPLES:
184
+ # Get the argument name used in SQL Query.
185
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
186
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
187
+ argument_base.get_sql_name()
188
+ """
189
+ return self.__sql_name
190
+
191
+ def is_required(self):
192
+ """
193
+ DESCRIPTION:
194
+ Check if argument is required or not.
195
+
196
+ RETURNS:
197
+ bool
198
+
199
+ RAISES:
200
+ None
201
+
202
+ EXAMPLES:
203
+ # Check whether the argument is a mandatory or not for Analytic function.
204
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
205
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
206
+ if argument_base.is_required():
207
+ print("Required")
208
+ """
209
+ return self.__is_required
210
+
211
+ def get_sql_description(self):
212
+ """
213
+ DESCRIPTION:
214
+ Get SQL description of the argument.
215
+
216
+ RETURNS:
217
+ str
218
+
219
+ RAISES:
220
+ None
221
+
222
+ EXAMPLES:
223
+ # Get the description of the argument with respect to SQL.
224
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
225
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
226
+ argument_base.get_sql_description()
227
+ """
228
+ return self.__sql_description
229
+
230
+ def get_lang_description(self):
231
+ """
232
+ DESCRIPTION:
233
+ Get client specific description name of the argument.
234
+
235
+ RETURNS:
236
+ str
237
+
238
+ RAISES:
239
+ None
240
+
241
+ EXAMPLES:
242
+ # Get the description of the argument with respect to Python.
243
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
244
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
245
+ argument_base.get_lang_description()
246
+ """
247
+ return self.__description
248
+
249
+ def get_lang_name(self):
250
+ """
251
+ DESCRIPTION:
252
+ Get client specific name of the argument.
253
+
254
+ RETURNS:
255
+ str
256
+
257
+ RAISES:
258
+ None
259
+
260
+ EXAMPLES:
261
+ # Get the argument name, which is exposed to user.
262
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
263
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
264
+ argument_base.get_lang_name()
265
+ """
266
+ return self.__name
267
+
268
+ def use_in_r(self):
269
+ """
270
+ DESCRIPTION:
271
+ Check if argument should be used in client function or not.
272
+
273
+ RETURNS:
274
+ str
275
+
276
+ RAISES:
277
+ None
278
+
279
+ EXAMPLES:
280
+ # Check whether argument is used in R or not.
281
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
282
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
283
+ if argument_base.use_in_r():
284
+ print("Yes")
285
+ """
286
+ return self.__use_in_r
287
+
288
+ @staticmethod
289
+ def get_regex_sql_name(sql_name, match_name, arg_names):
290
+ """
291
+ DESCRIPTION:
292
+ Get SQL name of the argument by matching the given pattern.
293
+
294
+ PARAMETERS:
295
+ sql_name:
296
+ Required Argument.
297
+ Specifies the name of the argument in SQL.
298
+ Types: str
299
+
300
+ match_name:
301
+ Required Argument.
302
+ Specifies the match name which will be replaced
303
+ by the SQL name.
304
+ Types: str
305
+
306
+ arg_names:
307
+ Required Argument.
308
+ Specifies the list of python argument name.
309
+ Types: list
310
+
311
+ RETURNS:
312
+ list
313
+
314
+ RAISES:
315
+ None
316
+
317
+ EXAMPLES:
318
+ # Get the argument name used in SQL Query.
319
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
320
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
321
+ argument_base.get_regex_sql_name("Abc_*", "const_", ["const_num", "const_min_length"])
322
+ """
323
+ sql_names = [key.replace(match_name, sql_name)
324
+ for key in arg_names if key.startswith(match_name)]
325
+
326
+ return sql_names
327
+
328
+ @staticmethod
329
+ def get_regex_matched_arguments(arg_name, **kwargs):
330
+ """
331
+ DESCRIPTION:
332
+ Get client specific name of the argument by matching given pattern.
333
+
334
+ PARAMETERS:
335
+ arg_name:
336
+ Required Argument.
337
+ Specifies the name of the argument.
338
+ Types: list
339
+
340
+ kwargs:
341
+ Required Argument.
342
+ Specifies the user provided arguments.
343
+ Types: dict
344
+
345
+ RETURNS:
346
+ list
347
+
348
+ RAISES:
349
+ None
350
+
351
+ EXAMPLES:
352
+ # Get the argument name, which is exposed to user.
353
+ from teradataml.analytics.json_parser.argument import _AnlyFuncArgumentBase
354
+ argument_base = _AnlyFuncArgumentBase("sql_name", True, "SQL Description", "Python Description", "name", True)
355
+ argument_base.get_regex_matched_arguments("const_*", newdata=DataFrame(df), const_num=2, const_min_length=81)
356
+ """
357
+ pattern = re.compile("{}{}".format('^', arg_name))
358
+ arg_names = [key for key in kwargs if pattern.match(key)]
359
+
360
+ return arg_names
361
+
362
+ class _AnlyFuncInput(_AnlyFuncArgumentBase):
363
+ """
364
+ Class to hold the information about input argument.
365
+ """
366
+
367
+ def __init__(self,
368
+ sql_name,
369
+ is_required,
370
+ sql_description,
371
+ lang_description,
372
+ lang_name,
373
+ use_in_r,
374
+ r_order_num,
375
+ datatype="TABLE_NAME",
376
+ required_input_kind=None,
377
+ partition_by_one=False,
378
+ partition_by_one_inclusive=False,
379
+ is_ordered=False,
380
+ is_local_ordered=False,
381
+ hash_by_key=False,
382
+ allows_lists=False,
383
+ r_formula_usage=False,
384
+ alternate_sql_name=None):
385
+ """
386
+ Constructor for generating an object of Analytic Function Argument from
387
+ JSON for arguments accepting input table.
388
+
389
+ PARAMETERS:
390
+ sql_name:
391
+ Required Argument.
392
+ Specifies the name of the argument in SQL.
393
+ Types: str
394
+
395
+ is_required:
396
+ Required Argument.
397
+ Specifies whether the argument is required or not.
398
+ Types: bool
399
+
400
+ sql_description:
401
+ Required Argument.
402
+ Specifies the description of argument in SQL.
403
+ Types: str
404
+
405
+ lang_description:
406
+ Required Argument.
407
+ Specifies the description of the argument, which needs to be exposed
408
+ to user.
409
+ Types: str
410
+
411
+ lang_name:
412
+ Required Argument.
413
+ Specifies the name of the argument to be exposed to user.
414
+ Types: str
415
+
416
+ use_in_r:
417
+ Required Argument.
418
+ Specifies whether argument should be used in client or not.
419
+ Types: bool
420
+
421
+ r_order_num:
422
+ Required Argument.
423
+ Specifies the ordering sequence of the argument for R function call.
424
+ Types: integer
425
+
426
+ datatype:
427
+ Optional Argument.
428
+ Specifies the datatype for output table.
429
+ Permitted Values: table_name, table_alias
430
+ Default Value: table_name
431
+ Types: str
432
+
433
+ required_input_kind:
434
+ Optional Argument.
435
+ Specifies the kind of input.
436
+ Permitted Values: partition_by_key, partition_by_any, or dimension
437
+ Default Value: None
438
+ Types: str or list of str
439
+
440
+ partition_by_one:
441
+ Optional Argument.
442
+ Specifies that for partition_by_key input kind, the key should be
443
+ "Partition by 1". If this argument is set to true and
444
+ "partition_by_one_inclusive" is set to False, the function only accepts
445
+ "Partition by 1" but not "Partition by key".
446
+ Default Value: False
447
+ Types: bool
448
+
449
+ partition_by_one_inclusive:
450
+ Optional Argument.
451
+ Specifies that for partition_by_key input kind, the function accepts both
452
+ "Partition by 1" and "Partition by key". This argument can be set to True
453
+ only if "required_input_kind" has partition_by_key, partition_by_any.
454
+ Default Value: False
455
+ Types: bool
456
+
457
+ is_ordered:
458
+ Optional Argument.
459
+ Specifies that the table must be input with an "Order by" clause.
460
+ Default Value: False
461
+ Types: bool
462
+
463
+ is_local_ordered:
464
+ Optional Argument.
465
+ Specifies whether the table supports LOCAL ORDER BY clause or not.
466
+ Default Value: False
467
+ Types: bool
468
+
469
+ hash_by_key:
470
+ Optional Argument.
471
+ Specifies whether data is grouped according to the HASH BY clause.
472
+ Default Value: False
473
+ Types: bool
474
+
475
+ allow_lists:
476
+ Optional Argument.
477
+ Specifies whether the argument accepts list of values. If false, the
478
+ argument can only accept a single value.
479
+ Default Value: False
480
+ Types: bool
481
+
482
+ r_formula_usage:
483
+ Optional Argument.
484
+ Specifies if the argument contains a formula.
485
+ Default Value: False
486
+ Types: bool
487
+
488
+ alternate_sql_name:
489
+ Optional Argument.
490
+ Specifies alternate names for the argument.
491
+ Default Value: None
492
+ Types: str or list of str
493
+ """
494
+
495
+ # Call Abstract class constructor
496
+ super().__init__(sql_name, is_required, sql_description, lang_description,
497
+ lang_name,
498
+ use_in_r)
499
+
500
+ # Process other parameters of input table argument.
501
+ self.__required_input_kind = required_input_kind
502
+ self.__partition_by_one = partition_by_one
503
+ self.__partition_by_one_inclusive = partition_by_one_inclusive
504
+ self.__is_ordered = is_ordered
505
+ self.__is_local_ordered = is_local_ordered
506
+ self.__hash_by_key = hash_by_key
507
+ self.__datatype = datatype
508
+ self.__allows_lists = allows_lists
509
+ self.__r_formula_usage = r_formula_usage
510
+ self.__r_order_num = r_order_num
511
+ self.__alternate_sql_name = alternate_sql_name
512
+
513
+ # Create argument information matrix to do parameter checking
514
+ self.__arg_info_matrix = []
515
+ required_input_kind_permitted_values = ["PartitionByKey", "PartitionByAny", "Dimension"]
516
+ self.__arg_info_matrix.append(
517
+ ["required_input_kind", self.__required_input_kind, True, (list, str), True,
518
+ required_input_kind_permitted_values])
519
+ self.__arg_info_matrix.append(
520
+ ["partition_by_one", self.__partition_by_one, True, (bool)])
521
+ self.__arg_info_matrix.append(
522
+ ["partition_by_one_inclusive", self.__partition_by_one_inclusive, True, (bool)])
523
+ self.__arg_info_matrix.append(["is_ordered", self.__is_ordered, True, (bool)])
524
+ self.__arg_info_matrix.append(["is_local_ordered", self.__is_local_ordered, True, (bool)])
525
+ self.__arg_info_matrix.append(["hash_by_key", self.__hash_by_key, True, (bool)])
526
+ self.__arg_info_matrix.append(
527
+ ["datatype", self.__datatype, False, (str), True, ["table_name", "table_alias"]])
528
+ self.__arg_info_matrix.append(["r_order_num", self.__r_order_num, False, (int), True])
529
+ self.__arg_info_matrix.append(["allows_lists", self.__allows_lists, True, (bool)])
530
+ self.__arg_info_matrix.append(["alternate_sql_name", self.__alternate_sql_name, True, (list, str)])
531
+ self.__arg_info_matrix.append(["r_formula_usage", self.__r_formula_usage, True, (bool)])
532
+ # Perform the function validations
533
+ self.__validate()
534
+ self.get_default_value = lambda: None
535
+ self.get_permitted_values = lambda: None
536
+ self._only_partition_by_one = lambda: \
537
+ self.__partition_by_one and not self.__partition_by_one_inclusive
538
+
539
+ def __validate(self):
540
+ """
541
+ DESCRIPTION:
542
+ Function to validate arguments, which verifies missing arguments,
543
+ input argument.
544
+ """
545
+ # Validate argument types.
546
+ _Validators._validate_function_arguments(self.__arg_info_matrix)
547
+
548
+ # Getters.
549
+ def get_required_input_kind(self):
550
+ """
551
+ DESCRIPTION:
552
+ Function to get the required_input_kind argument.
553
+ """
554
+ return self.__required_input_kind
555
+
556
+ def get_python_type(self):
557
+ """
558
+ DESCRIPTION:
559
+ Function to get the python type of argument.
560
+ """
561
+ from teradataml.dataframe.dataframe import DataFrame
562
+ return DataFrame
563
+
564
+ def is_reference_function_acceptable(self):
565
+ """
566
+ DESCRIPTION:
567
+ Function to check if argument accepts reference function name or not.
568
+ """
569
+ return self.get_lang_name().lower() in ("object", "modeldata")
570
+
571
+ def is_partition_by_one(self):
572
+ """
573
+ DESCRIPTION:
574
+ Function to check whether partition_by_one is True or False.
575
+ """
576
+ return self.__partition_by_one
577
+
578
+ def is_partition_by_one_inclusive(self):
579
+ """
580
+ DESCRIPTION:
581
+ Function to check whether partition_by_one_inclusive is True or False.
582
+ """
583
+ return self.__partition_by_one_inclusive
584
+
585
+ def is_ordered(self):
586
+ """
587
+ DESCRIPTION:
588
+ Function to check whether input table has an order by clause.
589
+ """
590
+ return self.__is_ordered
591
+
592
+ def is_local_ordered(self):
593
+ """
594
+ DESCRIPTION:
595
+ Check whether input supports LOCAL ORDER BY clause or not.
596
+ """
597
+ return self.__is_local_ordered
598
+
599
+ def hash_by_key(self):
600
+ """
601
+ DESCRIPTION:
602
+ Check whether input supports HASH BY KEY clause or not.
603
+ """
604
+ return self.__hash_by_key
605
+
606
+ def get_data_type(self):
607
+ """
608
+ DESCRIPTION:
609
+ Function to get the datatype of the argument.
610
+ """
611
+ return self.__datatype
612
+
613
+ def allows_lists(self):
614
+ """
615
+ DESCRIPTION:
616
+ Function to check if argument accepts lists or not.
617
+ """
618
+ return self.__allows_lists
619
+
620
+ def get_r_formula_usage(self):
621
+ """
622
+ DESCRIPTION:
623
+ Function to check if argument is part of a formula or not.
624
+ """
625
+ return self.__r_formula_usage
626
+
627
+ def get_r_order_number(self):
628
+ """
629
+ DESCRIPTION:
630
+ Function to get the order number of the argument.
631
+ """
632
+ return self.__r_order_num
633
+
634
+ def get_alternate_sql_name(self):
635
+ """
636
+ DESCRIPTION:
637
+ Function to get the alternate SQL name of the argument.
638
+ """
639
+ return self.__alternate_sql_name
640
+
641
+ def _get_partition_column_required_kind(self):
642
+ """
643
+ DESCRIPTION:
644
+ Function to determine if the input table is partitioned by a column or ANY or 1
645
+ or data distribution is DIMENSION. This function follows below steps and derives
646
+ partition column kind.
647
+ * The input_table is partitioned by a key, if requireInputKind == PartitionByKey
648
+ and partitionByOne == False.
649
+ * The input_table is partitioned by 1/key, if requireInputKind == PartitionByKey,
650
+ partitionByOneInclusive == True and partitionByOne == True.
651
+ * The input_table is partitioned by 1 only, if partitionByOneInclusive == False
652
+ and partitionByOne=true.
653
+ * The input_table is partitioned by ANY/key, if requireInputKind == PartitionByKey
654
+ and requireInputKind == PartitionByAny.
655
+ * The input_table is partitioned by ANY only, if requireInputKind == PartitionByAny.
656
+ * The input_table is distributed by either DIMENSION or partitioned by key, if
657
+ requireInputKind == PartitionByKey and requireInputKind == DIMENSION.
658
+ * The input_table is distributed by either DIMENSION or partitioned by ANY/key, if
659
+ requireInputKind == PartitionByKey and requireInputKind == PartitionByAny and
660
+ requireInputKind == DIMENSION.
661
+
662
+ RAISES:
663
+ None
664
+
665
+ RETURNS:
666
+ enum of type teradataml.analytics.json_parser.PartitionKind
667
+
668
+ EXAMPLES:
669
+ self._get_partition_column_required_kind()
670
+ """
671
+ is_partition_by_key, is_partition_by_any, is_partition_by_one, is_dimension = [False]*4
672
+
673
+ # Input table is partitioned by 1 ONLY when partitionByOneInclusive is false and
674
+ # partitionByOne is true.
675
+ if self.__partition_by_one and not self.__partition_by_one_inclusive:
676
+ is_partition_by_one = True
677
+ else:
678
+ for input_kind in self.__required_input_kind:
679
+ if input_kind == "Dimension":
680
+ is_dimension = True
681
+ # If requiredInputKind has PartitionByKey and partitionByOneInclusive and
682
+ # partitionByOne is True then input table is partitioned by 1 or Key.
683
+ # Else input table is partitioned by Key Only.
684
+ elif input_kind == "PartitionByKey":
685
+ if self.__partition_by_one_inclusive and self.__partition_by_one:
686
+ is_partition_by_one = True
687
+ is_partition_by_key = True
688
+ else:
689
+ is_partition_by_key = True
690
+ elif input_kind == "PartitionByAny":
691
+ is_partition_by_any = True
692
+
693
+ if is_dimension:
694
+ if is_partition_by_key and is_partition_by_any:
695
+ return PartitionKind.DIMENSIONKEYANY
696
+ elif is_partition_by_key and not is_partition_by_any:
697
+ return PartitionKind.DIMENSIONKEY
698
+ else:
699
+ return PartitionKind.DIMENSION
700
+ else:
701
+ if is_partition_by_key and not is_partition_by_any and not is_partition_by_one:
702
+ return PartitionKind.KEY
703
+ elif is_partition_by_key and is_partition_by_any:
704
+ return PartitionKind.ANY
705
+ elif not is_partition_by_key and is_partition_by_any:
706
+ return PartitionKind.ANYONLY
707
+ elif is_partition_by_one and is_partition_by_key:
708
+ return PartitionKind.ONE
709
+ elif is_partition_by_one and is_partition_by_key:
710
+ return PartitionKind.ONEONLY
711
+
712
+ def _get_default_partition_column_kind(self):
713
+ """ Returns the default Parition Type based on requiredInputKind parameter in json file. """
714
+ required_column_kind = UtilFuncs._as_list(self.__required_input_kind)[0]
715
+
716
+ if required_column_kind == "PartitionByAny":
717
+ return PartitionKind.ANY
718
+ elif required_column_kind == "Dimension":
719
+ return PartitionKind.DIMENSION
720
+ elif required_column_kind == "PartitionByOne":
721
+ return PartitionKind.ONE
722
+ else:
723
+ return None
724
+
725
+ '''
726
+ @staticmethod
727
+ def _get_default_partition_by_value(partition_kind):
728
+ """
729
+ DESCRIPTION:
730
+ Function to get the default value for partition column kind.
731
+
732
+ PARAMETERS:
733
+ partition_kind:
734
+ Required Argument.
735
+ Specifies input table partition type.
736
+
737
+ RAISES:
738
+ None
739
+
740
+ RETURNS:
741
+ str OR int
742
+
743
+ EXAMPLES:
744
+ self._get_default_partition_by_value(PartitionKind.KEY)
745
+ """
746
+ if partition_kind == PartitionKind.KEY or partition_kind == PartitionKind.DIMENSIONKEY:
747
+ return None
748
+ elif partition_kind == PartitionKind.ONE or partition_kind == PartitionKind.ONEONLY:
749
+ return 1
750
+ elif partition_kind == PartitionKind.ANY or partition_kind == PartitionKind.ANYONLY or \
751
+ partition_kind == PartitionKind.DIMENSIONKEYANY:
752
+ return "ANY"
753
+ '''
754
+
755
+ def _only_partition_by_any(self):
756
+ """
757
+ DESCRIPTION:
758
+ Check partition column supports only Partition By Any.
759
+
760
+ RAISES:
761
+ None
762
+
763
+ RETURNS:
764
+ bool
765
+
766
+ EXAMPLES:
767
+ self._only_partition_by_any()
768
+ """
769
+ if isinstance(self.__required_input_kind, str):
770
+ return self.__required_input_kind == "PartitionByAny"
771
+ return self.__required_input_kind == ["PartitionByAny"]
772
+
773
+
774
+ class _AnlyFuncOutput(_AnlyFuncArgumentBase):
775
+ """
776
+ Class to hold the information about output argument.
777
+ """
778
+
779
+ def __init__(self,
780
+ sql_name,
781
+ is_required,
782
+ sql_description,
783
+ lang_description,
784
+ lang_name,
785
+ use_in_r,
786
+ r_order_num,
787
+ datatype="TABLE_NAME",
788
+ is_output_table=True,
789
+ allows_lists=False,
790
+ output_schema=None,
791
+ alternate_sql_name=None,
792
+ support_volatility=False,
793
+ is_required_dependent_argument=None):
794
+ """
795
+ Constructor for generating an object of Analytic Function Argument from
796
+ JSON for arguments accepting output table information.
797
+
798
+ PARAMETERS:
799
+ sql_name:
800
+ Required Argument.
801
+ Specifies the name of the argument in SQL.
802
+ Types: str
803
+
804
+ is_required:
805
+ Required Argument.
806
+ Specifies whether the argument is required or not.
807
+ Types: bool
808
+
809
+ sql_description:
810
+ Required Argument.
811
+ Specifies the description of argument in SQL.
812
+ Types: str
813
+
814
+ lang_description:
815
+ Required Argument.
816
+ Specifies the description of the argument, which needs to be exposed
817
+ to user.
818
+ Types: str
819
+
820
+ lang_name:
821
+ Required Argument.
822
+ Specifies the name of the argument to be exposed to user.
823
+ Types: str
824
+
825
+ use_in_r:
826
+ Required Argument.
827
+ Specifies whether argument should be used in client or not.
828
+ Types: bool
829
+
830
+ r_order_num:
831
+ Required Argument.
832
+ Specifies the ordering sequence of the argument for R function call.
833
+ Types: integer
834
+
835
+ datatype:
836
+ Optional Argument.
837
+ Specifies the datatype for output table.
838
+ Permitted Values: table_name, table_alias
839
+ Default Value: table_name
840
+ Types: str
841
+
842
+ is_output_table:
843
+ Optional Argument.
844
+ Specifies whether the argument clause has an output table name.
845
+ Default Value: True
846
+ Types: bool
847
+
848
+ allow_lists:
849
+ Optional Argument.
850
+ Specifies whether the argument accepts list of values. If false, the
851
+ argument can only accept a single value.
852
+ Default Value: False
853
+ Types: bool
854
+
855
+ output_schema:
856
+ Optional Argument.
857
+ Specifies the output schema of the function.
858
+ Default Value: None
859
+ Types: str
860
+
861
+ alternate_sql_name:
862
+ Optional Argument.
863
+ Specifies alternate names for the argument.
864
+ Default Value: None
865
+ Types: str or list of str
866
+
867
+ support_volatility:
868
+ Optional Argument.
869
+ Specifies whether the output table support VOLATILE table or not.
870
+ Default Value: False
871
+ Types: bool
872
+ """
873
+
874
+ # Call super class constructor to initialize basic parameters.
875
+ super().__init__(sql_name, is_required, sql_description, lang_description,
876
+ lang_name,
877
+ use_in_r)
878
+
879
+ self.__r_order_num = r_order_num
880
+ self.__allows_lists = allows_lists
881
+ self.__output_schema = output_schema
882
+ self.__alternate_sql_name = alternate_sql_name
883
+ self.__is_output_table = is_output_table
884
+ self.__datatype = datatype
885
+ self.__support_volatility = support_volatility
886
+ # Create argument information matrix to do parameter checking
887
+ self.__arg_info_matrix = []
888
+ self.__arg_info_matrix.append(["r_order_num", self.__r_order_num, False, int, True])
889
+ self.__arg_info_matrix.append(["allows_lists", self.__allows_lists, True, bool])
890
+ self.__arg_info_matrix.append(["output_schema", self.__output_schema, True, str, True])
891
+ self.__arg_info_matrix.append(["alternate_sql_name", self.__alternate_sql_name, True, (list, str)])
892
+ self.__arg_info_matrix.append(["is_output_table", self.__is_output_table, True, bool])
893
+ self.__arg_info_matrix.append(
894
+ ["datatype", self.__datatype, True, str, True, ["table_name", "table_alias"]])
895
+ self.__arg_info_matrix.append(["support_volatility", self.__support_volatility, True, bool])
896
+ self.__arg_info_matrix.append(
897
+ ["is_required_dependent_argument", is_required_dependent_argument, True, _DependentArgument])
898
+
899
+ # Perform the function validations
900
+ self.__validate()
901
+ self.is_volatility_supported = lambda : self.__support_volatility
902
+ self.get_is_required_dependent_argument = lambda : is_required_dependent_argument
903
+
904
+ def __validate(self):
905
+ """
906
+ DESCRIPTION:
907
+ Function to validate arguments, which verifies missing arguments,
908
+ input argument.
909
+ """
910
+ # Validate argument types.
911
+ _Validators._validate_function_arguments(self.__arg_info_matrix)
912
+
913
+ # Getters
914
+ def get_data_type(self):
915
+ """
916
+ DESCRIPTION:
917
+ Function to get the datatype of the argument.
918
+ """
919
+ return self.__datatype
920
+
921
+ def is_output_table(self):
922
+ """
923
+ DESCRIPTION:
924
+ Function to check if argument represents output table or not.
925
+ """
926
+ return self.__is_output_table
927
+
928
+ def get_r_order_number(self):
929
+ """
930
+ DESCRIPTION:
931
+ Function to get the order number of the argument.
932
+ """
933
+ return self.__r_order_num
934
+
935
+ def allows_lists(self):
936
+ """
937
+ DESCRIPTION:
938
+ Function to check if argument accepts lists or not.
939
+ """
940
+ return self.__allows_lists
941
+
942
+ def get_output_schema(self):
943
+ """
944
+ DESCRIPTION:
945
+ Function to get the output schema of the argument.
946
+ """
947
+ return self.__output_schema
948
+
949
+ def get_alternate_sql_name(self):
950
+ """
951
+ DESCRIPTION:
952
+ Function to get the alternate SQL name of the argument.
953
+ """
954
+ return self.__alternate_sql_name
955
+
956
+
957
+ class _AnlyFuncArgument(_AnlyFuncArgumentBase):
958
+ """
959
+ Class to hold the information about analytic function argument.
960
+ """
961
+
962
+ def __init__(self,
963
+ sql_name,
964
+ is_required,
965
+ sql_description,
966
+ lang_description,
967
+ lang_name,
968
+ use_in_r,
969
+ r_order_num,
970
+ datatype,
971
+ default_value=None,
972
+ permitted_values=None,
973
+ lower_bound=None,
974
+ lower_bound_type=None,
975
+ upper_bound=None,
976
+ upper_bound_type=None,
977
+ allow_nan=False,
978
+ required_length=0,
979
+ match_length_of_argument=None,
980
+ allows_lists=False,
981
+ allow_padding=False,
982
+ r_formula_usage=False,
983
+ r_default_value=None,
984
+ target_table=None,
985
+ target_table_lang_name=None,
986
+ check_duplicate=False,
987
+ allowed_types=None,
988
+ allowed_type_groups=None,
989
+ is_output_column=False,
990
+ alternate_sql_name=None,
991
+ regex_match=False,
992
+ match_name=None):
993
+ """
994
+ Constructor for generating an object of Analytic Function Argument from
995
+ JSON for other arguments.
996
+
997
+ PARAMETERS:
998
+ sql_name:
999
+ Required Argument.
1000
+ Specifies the name of the argument in SQL.
1001
+ Types: str
1002
+
1003
+ is_required:
1004
+ Required Argument.
1005
+ Specifies whether the argument is required or not.
1006
+ Types: bool
1007
+
1008
+ sql_description:
1009
+ Required Argument.
1010
+ Specifies the description of argument in SQL.
1011
+ Types: str
1012
+
1013
+ lang_description:
1014
+ Required Argument.
1015
+ Specifies the description of the argument, which needs to be exposed
1016
+ to user.
1017
+ Types: str
1018
+
1019
+ lang_name:
1020
+ Required Argument.
1021
+ Specifies the name of the argument to be exposed to user.
1022
+ Types: str
1023
+
1024
+ use_in_r:
1025
+ Required Argument.
1026
+ Specifies whether argument should be used in client or not.
1027
+ Types: bool
1028
+
1029
+ r_order_num:
1030
+ Required Argument.
1031
+ Specifies the ordering sequence of the argument.
1032
+ Types: integer
1033
+
1034
+ datatype:
1035
+ Required Argument.
1036
+ Specifies the datatype for argument.
1037
+ Types: str OR list of str
1038
+
1039
+ default_value:
1040
+ Optional Argument.
1041
+ Specifies the default value for argument.
1042
+ Types: str OR int OR float OR bool
1043
+
1044
+ permitted_values:
1045
+ Optional Argument.
1046
+ Specified the permitted values for argument.
1047
+ Types: list OR str OR float OR int
1048
+
1049
+ lower_bound:
1050
+ Optional Argument.
1051
+ Specifies the lower bound value for argument.
1052
+ Types: int OR float
1053
+
1054
+ lower_bound_type:
1055
+ Optional Argument.
1056
+ Specifies whether "lower_bound" is inclusive or exclusive.
1057
+ Permitted Values: INCLUSIVE, EXCLUSIVE
1058
+ Types: str
1059
+
1060
+ upper_bound:
1061
+ Optional Argument.
1062
+ Specifies the upper bound value for argument.
1063
+ Types: int OR float
1064
+
1065
+ upper_bound_type:
1066
+ Optional Argument.
1067
+ Specifies whether "upper_bound" is inclusive or exclusive.
1068
+ Permitted Values: INCLUSIVE, EXCLUSIVE
1069
+ Types: str
1070
+
1071
+ allow_nan:
1072
+ Optional Argument.
1073
+ Specifies whether argument accepts None or not.
1074
+ Default Value: False
1075
+ Types: bool
1076
+
1077
+ allows_lists:
1078
+ Optional Argument.
1079
+ Specifies whether argument accepts a list of values or not.
1080
+ Default Value: False
1081
+ Types: bool
1082
+
1083
+ match_length_of_argument:
1084
+ Optional Argument.
1085
+ Specifies whether length of "allow_lists" should be checked or not.
1086
+ Default Value: False
1087
+ Types: bool
1088
+
1089
+ required_length:
1090
+ Optional Argument.
1091
+ Specifies if the list must be the same length as the list specified
1092
+ in argument clause.
1093
+ Default Value: 0
1094
+ Types: int
1095
+
1096
+ allow_padding:
1097
+ Optional Argument.
1098
+ Specifies whether to add padding to argument or not. When set to True,
1099
+ user submitted value will be padded into a list equal to the required
1100
+ length.
1101
+ Default Value: False
1102
+ Types: bool
1103
+
1104
+ r_formula_usage:
1105
+ Optional Argument.
1106
+ Specifies whether argument is part of formula.
1107
+ Default Value: False
1108
+ Types: bool
1109
+
1110
+ r_default_value:
1111
+ Optional Argument.
1112
+ Specifies the default value of the argument.
1113
+ Types: str OR int OR float
1114
+
1115
+ target_table:
1116
+ Optional Argument.
1117
+ Specifies the name of the input table that the input column
1118
+ should be found in (Only applicable for datatype COLUMNS or COLUMN_NAMES)
1119
+ Types: str OR list of str
1120
+
1121
+ target_table_lang_name:
1122
+ Optional Argument.
1123
+ Specifies the lang name of the input table that the input column
1124
+ should be found in (Only applicable for datatype COLUMNS or COLUMN_NAMES)
1125
+ Types: str
1126
+
1127
+ check_duplicate:
1128
+ Optional Argument.
1129
+ Specifies whether duplicate columns should be checked in input
1130
+ or not (Only applicable for datatype COLUMNS or COLUMN_NAMES).
1131
+ Default Value: False
1132
+ Types: bool
1133
+
1134
+ allowed_types:
1135
+ Optional Argument.
1136
+ Specifies SQL types that are allowed (Only applicable for datatype
1137
+ COLUMNS or COLUMN_NAMES).
1138
+ Types: str OR list of str
1139
+
1140
+ allowed_type_groups:
1141
+ Optional Argument.
1142
+ Species the group of SQL types that are allowed.
1143
+ * NUMERIC for all numeric types.
1144
+ * STRING for all char/varchar types.
1145
+ * GROUPTYPE for any type except double or float.
1146
+ Types: list of str
1147
+
1148
+ is_output_column:
1149
+ Optional Argument.
1150
+ Specifies whether argument is output column or not.
1151
+ Default Value: False
1152
+ Types: bool
1153
+
1154
+ alternate_sql_name:
1155
+ Optional Argument.
1156
+ Specifies alternate names for the argument.
1157
+ Types: str or list of str
1158
+
1159
+ regex_match:
1160
+ Optional Argument.
1161
+ Specifies whether argument is regular expression or not.
1162
+ Default Value: False
1163
+ Types: bool
1164
+
1165
+ match_name:
1166
+ Optional Argument.
1167
+ Specifies the name to match against the user provided arguments.
1168
+ Types: str
1169
+ """
1170
+
1171
+ # Call super class constructor to initialize basic parameters.
1172
+ super().__init__(sql_name, is_required, sql_description, lang_description, lang_name, use_in_r)
1173
+
1174
+ # Initialize rest of the parameters for the Arguments class.
1175
+ self.__default_value = default_value
1176
+ self.__permitted_values = permitted_values
1177
+ self.__lower_bound = lower_bound
1178
+ self.__lower_bound_type = lower_bound_type
1179
+ self.__upper_bound = upper_bound
1180
+ self.__upper_bound_type = upper_bound_type
1181
+ self.__allow_nan = allow_nan
1182
+ self.__required_length = required_length
1183
+ self.__match_length_of_argument = match_length_of_argument
1184
+ self.__datatype = datatype
1185
+ self.__allows_lists = allows_lists
1186
+ self.__allow_padding = allow_padding
1187
+ self.__r_formula_usage = r_formula_usage
1188
+ self.__r_default_value = r_default_value
1189
+ self.__target_table = target_table
1190
+ self.__target_table_lang_name = target_table_lang_name
1191
+ self.__check_duplicate = check_duplicate
1192
+ self.__allowed_types = allowed_types
1193
+ self.__allowed_type_groups = allowed_type_groups
1194
+ self.__r_order_num = r_order_num
1195
+ self.__is_output_column = is_output_column
1196
+ self.__alternate_sql_name = alternate_sql_name
1197
+ self.__regex_match = regex_match
1198
+ self.__match_name = match_name
1199
+
1200
+ awu_matrix = []
1201
+ awu_matrix.append(["r_order_num", r_order_num, False, int])
1202
+ awu_matrix.append(["datatype", datatype, False, (list, str), True])
1203
+ awu_matrix.append(["default_value", default_value, True, (int, str, bool, float)])
1204
+ awu_matrix.append(["permitted_values", permitted_values, True, (list, str, int, float)])
1205
+ awu_matrix.append(["lower_bound", lower_bound, True, (int, float)])
1206
+ awu_matrix.append(["lower_bound_type", lower_bound_type, True, str, True, ["INCLUSIVE", "EXCLUSIVE"]])
1207
+ awu_matrix.append(["upper_bound", upper_bound, True, (int, float)])
1208
+ awu_matrix.append(["upper_bound_type", upper_bound_type, True, str, True, ["INCLUSIVE", "EXCLUSIVE"]])
1209
+ awu_matrix.append(["allow_nan", allow_nan, True, bool])
1210
+ awu_matrix.append(["allows_lists", allows_lists, True, bool])
1211
+ awu_matrix.append(["match_length_of_argument", match_length_of_argument, True, bool])
1212
+ awu_matrix.append(["required_length", required_length, True, int])
1213
+ awu_matrix.append(["allow_padding", allow_padding, True, bool])
1214
+ awu_matrix.append(["r_formula_usage", r_formula_usage, True, bool])
1215
+ awu_matrix.append(["r_default_value", r_default_value, True, (int, float, str)])
1216
+ awu_matrix.append(["target_table", target_table, True, (list, str)])
1217
+ awu_matrix.append(["target_table_lang_name", target_table_lang_name, True, str])
1218
+ awu_matrix.append(["check_duplicate", check_duplicate, True, bool])
1219
+ awu_matrix.append(["allowed_types", allowed_types, True, (list, str)])
1220
+ awu_matrix.append(["allowed_type_groups", allowed_type_groups, True, (list, str)])
1221
+ awu_matrix.append(["is_output_column", is_output_column, True, bool])
1222
+ awu_matrix.append(["alternate_sql_name", alternate_sql_name, True, (list, str)])
1223
+ awu_matrix.append(["regex_match", regex_match, True, bool])
1224
+ awu_matrix.append(["match_name", match_name, True, str, True])
1225
+
1226
+ # Validate argument types.
1227
+ _Validators._validate_function_arguments(awu_matrix)
1228
+
1229
+ # Validate lower bound is greater than upper bound.
1230
+ # _validate_argument_range validates whether lower bound is less than upper bound
1231
+ # or not if argument is None.
1232
+ _Validators._validate_argument_range(
1233
+ arg_name="dummy", arg=None, lbound=self.__lower_bound, ubound=self.__upper_bound)
1234
+
1235
+ # Getters.
1236
+ self.get_r_order_number = lambda: self.__r_order_num
1237
+ self.get_data_type = lambda: self.__datatype
1238
+ self.get_default_value = lambda: self.__default_value
1239
+ self.get_permitted_values = lambda: self.__permitted_values
1240
+ self.get_lower_bound = lambda: self.__lower_bound
1241
+ self.get_lower_bound_type = lambda: self.__lower_bound_type
1242
+ self.get_upper_bound = lambda: self.__upper_bound
1243
+ self.get_upper_bound_type = lambda: self.__upper_bound_type
1244
+ self.is_nan_allowed = lambda: self.__allow_nan
1245
+ self.get_required_length = lambda: self.__required_length
1246
+ self.get_match_length_of_argument = lambda: self.__match_length_of_argument
1247
+ self.is_lists_allowed = lambda: self.__allows_lists
1248
+ self.is_padding_required = lambda: self.__allow_padding
1249
+ self.is_argument_a_formula = lambda: self.__r_formula_usage
1250
+ self.get_r_default_value = lambda: self.__r_default_value
1251
+ self.get_target_table = lambda: self.__target_table
1252
+ self.get_target_table_lang_name = lambda: self.__target_table_lang_name
1253
+ self.check_duplicate = lambda: self.__check_duplicate
1254
+ self.get_allowed_types = lambda: self.__allowed_types
1255
+ self.get_allowed_type_groups = lambda: self.__allowed_type_groups
1256
+ self.is_output_column = lambda: self.__is_output_column
1257
+ self.get_alternate_sql_name = lambda: self.__alternate_sql_name
1258
+ self.is_empty_value_allowed = lambda: not self.is_column_argument()
1259
+ self.regex_match = lambda: self.__regex_match
1260
+ self.match_name = lambda: self.__match_name
1261
+
1262
+ def get_python_type(self):
1263
+ """
1264
+ DESCRIPTION:
1265
+ Get equivalent Python type for the JSON datatype for an argument.
1266
+
1267
+ PARAMETERS:
1268
+ None
1269
+
1270
+ RETURNS:
1271
+ type.
1272
+
1273
+ RAISES:
1274
+ None
1275
+
1276
+ EXAMPLES:
1277
+ self.get_python_type(arg1="string", arg2="db", arg3=2)
1278
+ """
1279
+ py_types = tuple()
1280
+
1281
+ # If multiple datatype's allowed, return the tuple of all allowed python types.
1282
+ if isinstance(self.__datatype, list):
1283
+ for td_type in self.__datatype:
1284
+ py_type = _Dtypes._anly_json_type_to_python_type(td_type)
1285
+
1286
+ # If py_type is not a tuple, convert to a tuple.
1287
+ py_types = py_types + ((py_type, ) if not isinstance(py_type, tuple) else py_type)
1288
+ else:
1289
+ py_type = _Dtypes._anly_json_type_to_python_type(self.__datatype)
1290
+ py_types = py_type if isinstance(py_type, tuple) else (py_type, )
1291
+
1292
+ # If lists are allowed, add list type also.
1293
+ if self.__allows_lists and (list not in py_types):
1294
+ py_types = py_types + (list, )
1295
+
1296
+ return py_types
1297
+
1298
+ def is_column_argument(self):
1299
+ """
1300
+ DESCRIPTION:
1301
+ Function checks if the argument accepts column as input or not.
1302
+
1303
+ PARAMETERS:
1304
+ None
1305
+
1306
+ RETURNS:
1307
+ bool
1308
+
1309
+ RAISES:
1310
+ None
1311
+
1312
+ EXAMPLES:
1313
+ self.is_column_argument()
1314
+ """
1315
+ # __datatype can be either string or list.
1316
+ if isinstance(self.__datatype, list):
1317
+ datatype = (datatype.lower() for datatype in self.__datatype)
1318
+ else:
1319
+ datatype = self.__datatype.lower()
1320
+ return "column" in datatype
1321
+
1322
+
1323
+ class _AnlyFuncArgumentBaseUAF(object):
1324
+ """ Class to hold the basic/common information about all the arguments."""
1325
+ def __init__(self, data_type, description, lang_name, is_required=False):
1326
+ """
1327
+ DESCRIPTION:
1328
+ Constructor for the class.
1329
+
1330
+ PARAMETERS:
1331
+ data_type:
1332
+ Required Argument.
1333
+ Specifies the data type an argument can accept.
1334
+ Type: str
1335
+
1336
+ description:
1337
+ Required Argument.
1338
+ Specifies the argument description.
1339
+ Type: str or List
1340
+
1341
+ lang_name:
1342
+ Required Argument.
1343
+ Specifies the name of the argument to be exposed to user.
1344
+ Type: str
1345
+
1346
+ is_required:
1347
+ Optional Argument.
1348
+ Specifies whether the argument is required or not.
1349
+ Default Value: False
1350
+ Types: bool
1351
+
1352
+ """
1353
+ self.__data_type = data_type
1354
+ self.__description = description
1355
+ self.__lang_name = lang_name
1356
+ self.__is_required = is_required
1357
+
1358
+ # Getters
1359
+ self.get_data_type = lambda: self.__data_type
1360
+ self.get_description = lambda: self.__description
1361
+ self.get_lang_name = lambda: self.__lang_name
1362
+ self.is_required = lambda: self.__is_required
1363
+ self.is_empty_value_allowed = lambda: True
1364
+ self.is_output_column = lambda: False
1365
+ self.get_r_default_value = lambda: None
1366
+
1367
+ # Validation
1368
+ self.__arg_info_matrix = []
1369
+ self.__arg_info_matrix.append(["type", self.__data_type, False, (list, str), True])
1370
+ self.__arg_info_matrix.append(["description", self.__description, False, (list, str)])
1371
+ self.__arg_info_matrix.append(["lang_name", self.__lang_name, False, str])
1372
+ self.__arg_info_matrix.append(["optional", self.__is_required, True, bool])
1373
+
1374
+ _Validators._validate_function_arguments(self.__arg_info_matrix)
1375
+ self.is_empty_value_allowed = lambda: True
1376
+ self.is_output_column = lambda: False
1377
+ self.get_permitted_values = lambda: None
1378
+
1379
+ # Combining list to string.
1380
+ self.__description = ''.join(description)
1381
+
1382
+ def is_column_argument(self):
1383
+ """
1384
+ DESCRIPTION:
1385
+ Function checks if the argument accepts column as input or not.
1386
+
1387
+ PARAMETERS:
1388
+ None
1389
+
1390
+ RETURNS:
1391
+ bool
1392
+
1393
+ RAISES:
1394
+ None
1395
+
1396
+ EXAMPLES:
1397
+ self.is_column_argument()
1398
+ """
1399
+ # __datatype can be either string or list.
1400
+ if isinstance(self.__data_type, list):
1401
+ datatype = (datatype.lower() for datatype in self.__data_type)
1402
+ else:
1403
+ datatype = self.__data_type.lower()
1404
+ return "column" in datatype
1405
+
1406
+ def get_python_type(self):
1407
+ """
1408
+ DESCRIPTION:
1409
+ Get equivalent Python type for the JSON datatype for an argument.
1410
+
1411
+ PARAMETERS:
1412
+ None
1413
+
1414
+ RETURNS:
1415
+ type.
1416
+
1417
+ RAISES:
1418
+ None
1419
+
1420
+ EXAMPLES:
1421
+ self.get_python_type(arg1="string", arg2="db", arg3=2)
1422
+ """
1423
+ py_types = tuple()
1424
+ supp_data_types = UtilFuncs._as_list(self.__data_type)
1425
+ # If multiple datatype's allowed, return the tuple of all allowed Python types.
1426
+ for td_type in supp_data_types:
1427
+ py_type = _Dtypes._anly_json_type_to_python_type(td_type)
1428
+
1429
+ # If py_type is not a tuple, convert to a tuple.
1430
+ py_types = py_types + ((py_type,) if not isinstance(py_type, tuple) else py_type)
1431
+
1432
+ # If lists are allowed, add list type also.
1433
+ if self.is_lists_allowed() and (list not in py_types):
1434
+ py_types = py_types + (list,)
1435
+ return py_types
1436
+
1437
+ def set_is_required(self, value):
1438
+ """
1439
+ DESCRIPTION:
1440
+ Setter function to set if argument is required or not.
1441
+
1442
+ RETURNS:
1443
+ None
1444
+
1445
+ RAISES:
1446
+ None
1447
+
1448
+ EXAMPLES:
1449
+ self.set_is_required(True)
1450
+ """
1451
+ self.__is_required = value
1452
+
1453
+
1454
+ class _AnlyFuncInputUAF(_AnlyFuncArgumentBaseUAF):
1455
+ """ Class to hold the information about input argument of UAF."""
1456
+ def __init__(self, data_type, description, lang_name, is_required=False):
1457
+ """
1458
+ DESCRIPTION:
1459
+ Constructor for the class.
1460
+
1461
+ PARAMETERS:
1462
+ data_type:
1463
+ Required Argument.
1464
+ Specifies the data type an input argument can accept.
1465
+ Type: str
1466
+
1467
+ description:
1468
+ Required Argument.
1469
+ Specifies the input argument description.
1470
+ Type: Str or List
1471
+
1472
+ lang_name:
1473
+ Required Argument.
1474
+ Specifies the name of the argument to be exposed to user.
1475
+ Type: str
1476
+
1477
+ is_required:
1478
+ Optional Argument.
1479
+ Specifies whether the argument is required or not.
1480
+ Default Value: False
1481
+ Type: bool
1482
+ """
1483
+
1484
+ # Call Abstract class constructor
1485
+ super().__init__(data_type, description, lang_name, is_required)
1486
+ self.get_default_value = lambda: None
1487
+ self.is_lists_allowed = lambda: False
1488
+
1489
+
1490
+ class _AnlyFuncOutputUAF(_AnlyFuncArgumentBaseUAF):
1491
+ """ Class to hold the information about output argument of UAF."""
1492
+ def __init__(self, data_type, description, lang_name, layer_name,
1493
+ primary_layer=False, result_table_column_types=None, is_required=False):
1494
+ """
1495
+ DESCRIPTION:
1496
+ Constructor for the class.
1497
+
1498
+ PARAMETERS:
1499
+ description:
1500
+ Required Argument.
1501
+ Specifies the output argument description.
1502
+ Type: str or List
1503
+
1504
+ data_type:
1505
+ Required Argument.
1506
+ Specifies data type an output argument can accept.
1507
+ Type: str
1508
+
1509
+ lang_name:
1510
+ Required Argument.
1511
+ Specifies the name of the argument to be exposed to user.
1512
+ Type: str
1513
+
1514
+ primary_layer:
1515
+ Optional Argument.
1516
+ Specifies whether the layer is primary or not.
1517
+ Default Value: False
1518
+ Type: bool
1519
+
1520
+ layer_name:
1521
+ Required Argument.
1522
+ Specifies the name of the output layer.
1523
+ Type:str
1524
+
1525
+ result_table_column_types:
1526
+ Optional Argument
1527
+ Specifies the column types for the result table.
1528
+ Type: List or str
1529
+
1530
+ is_required:
1531
+ Optional Argument.
1532
+ Specifies whether the argument is required or not.
1533
+ Default Value: False
1534
+ Type: bool
1535
+ """
1536
+
1537
+ # Call Abstract class constructor
1538
+ super().__init__(data_type, description, lang_name, is_required)
1539
+ # Process other parameters of output table argument.
1540
+ self.__result_table_column_types = result_table_column_types
1541
+ self.__primary_layer = primary_layer
1542
+ self.__layer_name = layer_name
1543
+
1544
+ # Getters
1545
+ self.get_result_table_column_types = lambda: self.__result_table_column_types
1546
+ self.get_primary_layer = lambda : self.__primary_layer
1547
+ self.get_layer_name = lambda : self.__layer_name
1548
+
1549
+ # Validation
1550
+ self.__arg_info_matrix = []
1551
+ self.__arg_info_matrix.append(["result_table_column_types", self.__result_table_column_types, True, (list, str)])
1552
+ self.__arg_info_matrix.append(["primary_layer", self.__primary_layer, True, bool])
1553
+ self.__arg_info_matrix.append(["layer_name", self.__layer_name, False, str])
1554
+ _Validators._validate_function_arguments(self.__arg_info_matrix)
1555
+
1556
+
1557
+ class _AnlyFuncArgumentUAF(_AnlyFuncArgumentBaseUAF):
1558
+ """Class to hold the information about the other function parameters."""
1559
+
1560
+ def __init__(self, data_type, description, name, is_required=False, permitted_values=None,
1561
+ lower_bound=None, upper_bound=None, lower_bound_type=None, upper_bound_type=None,
1562
+ check_duplicates=False, list_type=None, allow_nan=None, lang_name=None,
1563
+ default_value=None, required_length=0, nested_param_list=None,
1564
+ is_nested=False, parent=None, has_nested=False):
1565
+ """
1566
+ DESCRIPTION:
1567
+ Constructor for the class.
1568
+
1569
+ PARAMETERS:
1570
+ description:
1571
+ Required Argument.
1572
+ Specifies the argument description.
1573
+ Type: str or List
1574
+
1575
+ name:
1576
+ Required Argument.
1577
+ Specifies the SQL name of the argument.
1578
+ Type: str
1579
+
1580
+ data_type:
1581
+ Required Argument.
1582
+ Specifies the data type for the argument.
1583
+ Type: str
1584
+
1585
+ is_required:
1586
+ Optional Argument.
1587
+ Specifies whether the argument is required or not.
1588
+ Default Value: False
1589
+ Types: bool
1590
+
1591
+ permitted_values:
1592
+ Optional Argument.
1593
+ Specifies the permitted values for the particular argument.
1594
+ Type: List
1595
+
1596
+ lower_bound:
1597
+ Optional Argument.
1598
+ Specifies the lower bound for the particular argument.
1599
+ Type: int or float
1600
+
1601
+ upper_bound:
1602
+ Optional Argument.
1603
+ Specifies the upper bound for the particular argument.
1604
+ Type: int or float
1605
+
1606
+ lower_bound_type:
1607
+ Optional Argument.
1608
+ Specifies whether the lower bound is inclusive or not.
1609
+ Type: str
1610
+
1611
+ upper_bound_type:
1612
+ Optional Argument.
1613
+ Specifies whether the upper bound is inclusive or not.
1614
+ Type: str
1615
+
1616
+ check_duplicates:
1617
+ Optional Argument
1618
+ Specifies if the argument checks for duplicate values.
1619
+ Type: bool
1620
+
1621
+ list_type:
1622
+ Optional Argument.
1623
+ Specifies the type of the list in the argument.
1624
+ Type: str
1625
+
1626
+ allow_nan:
1627
+ Required Argument.
1628
+ Specifies whether nan values are allowed or not.
1629
+ Type: bool
1630
+
1631
+ is_required:
1632
+ Optional Argument.
1633
+ Specifies whether the argument is required or not .
1634
+ Type: bool
1635
+
1636
+ lang_name:
1637
+ Optional Argument.
1638
+ Specifies the name of the argument to be exposed to user.
1639
+ Type: str
1640
+
1641
+ default_value:
1642
+ Optional Argument.
1643
+ Specifies the default value of the particular argument.
1644
+ Type: int or str or float
1645
+
1646
+ required_length:
1647
+ Optional Argument.
1648
+ Specifies if the list must be the same length as the list specified
1649
+ in argument clause.
1650
+ Types: int
1651
+
1652
+ nested_params_json:
1653
+ Optional Argument.
1654
+ Specifies the json object for nested_params argument.
1655
+ Type: List
1656
+
1657
+ is_nested:
1658
+ Optional Argument.
1659
+ Specifies whether the argument is a nested argument or not.
1660
+ Default Value: False
1661
+ Type: bool
1662
+
1663
+ parent:
1664
+ Optional Argument.
1665
+ Specifies the name of the parent incase of nested argument.
1666
+ Default Value: None
1667
+ Type: str or None
1668
+
1669
+ has_nested:
1670
+ Optional Argument.
1671
+ Specifies whether the argument has nested_params or not.
1672
+ Default Value:False
1673
+ Type: bool
1674
+
1675
+ """
1676
+ # Call Abstract class constructor
1677
+ super().__init__(data_type, description, lang_name, is_required)
1678
+
1679
+ # Process other parameters of arguments.
1680
+ self.__name = name
1681
+ self.__data_type = self.get_data_type()
1682
+ self.__permitted_values = permitted_values
1683
+ self.__default_value = default_value
1684
+ self.__r_default_value = None
1685
+ self.__allow_nan = allow_nan
1686
+ self.__lower_bound = lower_bound
1687
+ self.__upper_bound = upper_bound
1688
+ self.__lower_bound_type = lower_bound_type
1689
+ self.__upper_bound_type = upper_bound_type
1690
+ self.__check_duplicates = check_duplicates
1691
+ self.__required_length = required_length
1692
+ self.__parent = parent
1693
+ self.__is_nested = is_nested
1694
+ self.__has_nested = has_nested
1695
+ self.__allows_lists = False
1696
+ self.__match_length_of_arguments = False
1697
+
1698
+ # Creating a list for nested params
1699
+ self.__nested_param_list = nested_param_list
1700
+
1701
+ # Getters
1702
+ self.get_name = lambda: self.__name
1703
+ self.get_data_type = lambda: self.__data_type
1704
+ self.get_permitted_values = lambda: self.__permitted_values
1705
+ self.get_default_value = lambda: self.__default_value
1706
+ self.get_r_default_value = lambda: self.__r_default_value
1707
+ self.is_nan_allowed = lambda: self.__allow_nan
1708
+ self.get_parent = lambda: self.__parent
1709
+ self.get_lower_bound = lambda: self.__lower_bound
1710
+ self.get_upper_bound = lambda: self.__upper_bound
1711
+ self.get_lower_bound_type = lambda: self.__lower_bound_type
1712
+ self.get_upper_bound_type = lambda: self.__upper_bound_type
1713
+ self.get_check_duplicates = lambda: self.__check_duplicates
1714
+ self.get_required_length = lambda: self.__required_length
1715
+ self.get_nested_param_list = lambda: self.__nested_param_list
1716
+ self.get_is_nested = lambda: self.__is_nested
1717
+ self.get_has_nested = lambda: self.__has_nested
1718
+ self.is_lists_allowed = lambda: self.__allows_lists
1719
+ self.get_match_length_of_arguments = lambda: self.__match_length_of_arguments
1720
+
1721
+ # In order to make it similar to variables of SQLE functions if the data_type is list
1722
+ # we are setting allows_list=True and data_type to the data_type of the list elements.
1723
+ if self.get_data_type() == "list":
1724
+ self.__allows_lists = True
1725
+ self.__data_type = list_type
1726
+
1727
+ # Validation
1728
+ self.__arg_info_matrix = []
1729
+ self.__arg_info_matrix.append(["name", self.__name, True, str])
1730
+ self.__arg_info_matrix.append(["permitted_values", self.__permitted_values, True, list])
1731
+ self.__arg_info_matrix.append(["default_value", self.__default_value, True, (int, str, float, bool, list)])
1732
+ self.__arg_info_matrix.append(["r_default_value", self.__r_default_value, True, (int, str, float, bool, list)])
1733
+ self.__arg_info_matrix.append(["allow_nan", self.__allow_nan, True, bool])
1734
+ self.__arg_info_matrix.append(["lower_bound", self.__lower_bound, True, (int, float)])
1735
+ self.__arg_info_matrix.append(["upper_bound", self.__upper_bound, True, (int, float)])
1736
+ self.__arg_info_matrix.append(["lower_bound_type", self.__lower_bound_type, True, str])
1737
+ self.__arg_info_matrix.append(["upper_bound_type", self.__upper_bound_type, True, str])
1738
+ self.__arg_info_matrix.append(["check_duplicates", self.__check_duplicates, True, bool])
1739
+ self.__arg_info_matrix.append(["list_size", self.__required_length, True, (int, str)])
1740
+
1741
+ _Validators._validate_function_arguments(self.__arg_info_matrix)
1742
+
1743
+ # Validate whether lower bound is less than upper bound.
1744
+ _Validators._validate_argument_range(arg_name="dummy", arg=None, lbound=self.__lower_bound,
1745
+ ubound=self.__upper_bound)
1746
+ # Validate whether lower_bound and lower_bound_type are mutually inclusive.
1747
+ _Validators._validate_mutually_inclusive_arguments(lower_bound, "lower_bound", lower_bound_type, "lower_bound_type")
1748
+ # Validate whether upper_bound and upper_bound_type are mutually inclusive.
1749
+ _Validators._validate_mutually_inclusive_arguments(upper_bound, "upper_bound", upper_bound_type, "upper_bound_type")
1750
+
1751
+ # In order to make it similar to variables of SQLE functions, if get_required_length specifies
1752
+ # a value we set match_length_of_arguments which will validate the length of the arguments
1753
+ if not isinstance(self.__required_length, str) and self.get_required_length() > 0:
1754
+ self.__match_length_of_arguments = True
1755
+
1756
+ # If the argument is an int type and permitted values are 0 and 1, then we should consider it as boolean.
1757
+ if "INTEGER" in self.__data_type.upper() and self.__permitted_values is not None\
1758
+ and set(self.__permitted_values) == {0, 1}:
1759
+ self.__data_type = "BOOLEAN"
1760
+ self.__permitted_values = None
1761
+ self.set_is_required(False)
1762
+ if self.__default_value is not None:
1763
+ self.__default_value = bool(self.__default_value)
1764
+ else:
1765
+ self.__r_default_value = False
1766
+
1767
+ def get_python_type(self):
1768
+ """
1769
+ DESCRIPTION:
1770
+ Get equivalent Python type for the JSON datatype for an argument.
1771
+
1772
+ PARAMETERS:
1773
+ None
1774
+
1775
+ RETURNS:
1776
+ type.
1777
+
1778
+ RAISES:
1779
+ None
1780
+
1781
+ EXAMPLES:
1782
+ self.get_python_type(arg1="string", arg2="db", arg3=2)
1783
+ """
1784
+ py_types = tuple()
1785
+
1786
+ # If multiple datatype's allowed, return the tuple of all allowed python types.
1787
+ if isinstance(self.__data_type, list):
1788
+ for td_type in self.__data_type:
1789
+ py_type = _Dtypes._anly_json_type_to_python_type(td_type)
1790
+
1791
+ # If py_type is not a tuple, convert to a tuple.
1792
+ py_types = py_types + ((py_type,) if not isinstance(py_type, tuple) else py_type)
1793
+ else:
1794
+ py_type = _Dtypes._anly_json_type_to_python_type(self.__data_type)
1795
+ py_types = py_type if isinstance(py_type, tuple) else (py_type,)
1796
+
1797
+ # If argument is float and int is not in the list of valid types, then add int to the list.
1798
+ if float in py_types and int not in py_types:
1799
+ py_types = (int,) + py_types
1800
+
1801
+ # If lists are allowed, add list type also.
1802
+ if self.__allows_lists and (list not in py_types):
1803
+ py_types = py_types + (list,)
1804
+
1805
+ return py_types