teradataml 20.0.0.3__py3-none-any.whl → 20.0.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of teradataml might be problematic. Click here for more details.
- teradataml/LICENSE-3RD-PARTY.pdf +0 -0
- teradataml/README.md +193 -1
- teradataml/__init__.py +2 -1
- teradataml/_version.py +2 -2
- teradataml/analytics/analytic_function_executor.py +25 -18
- teradataml/analytics/byom/__init__.py +1 -1
- teradataml/analytics/json_parser/analytic_functions_argument.py +4 -0
- teradataml/analytics/sqle/__init__.py +20 -2
- teradataml/analytics/utils.py +15 -1
- teradataml/analytics/valib.py +18 -4
- teradataml/automl/__init__.py +341 -112
- teradataml/automl/autodataprep/__init__.py +471 -0
- teradataml/automl/data_preparation.py +84 -42
- teradataml/automl/data_transformation.py +69 -33
- teradataml/automl/feature_engineering.py +76 -9
- teradataml/automl/feature_exploration.py +639 -25
- teradataml/automl/model_training.py +35 -14
- teradataml/clients/auth_client.py +2 -2
- teradataml/common/__init__.py +1 -2
- teradataml/common/constants.py +122 -63
- teradataml/common/messagecodes.py +14 -3
- teradataml/common/messages.py +8 -4
- teradataml/common/sqlbundle.py +40 -10
- teradataml/common/utils.py +366 -74
- teradataml/common/warnings.py +11 -0
- teradataml/context/context.py +348 -86
- teradataml/data/amazon_reviews_25.csv +26 -0
- teradataml/data/apriori_example.json +22 -0
- teradataml/data/byom_example.json +11 -0
- teradataml/data/docs/byom/docs/DataRobotPredict.py +2 -2
- teradataml/data/docs/byom/docs/DataikuPredict.py +40 -1
- teradataml/data/docs/byom/docs/H2OPredict.py +2 -2
- teradataml/data/docs/byom/docs/ONNXEmbeddings.py +242 -0
- teradataml/data/docs/byom/docs/ONNXPredict.py +2 -2
- teradataml/data/docs/byom/docs/PMMLPredict.py +2 -2
- teradataml/data/docs/sqle/docs_17_20/Apriori.py +138 -0
- teradataml/data/docs/sqle/docs_17_20/NERExtractor.py +121 -0
- teradataml/data/docs/sqle/docs_17_20/NGramSplitter.py +3 -3
- teradataml/data/docs/sqle/docs_17_20/SMOTE.py +212 -0
- teradataml/data/docs/sqle/docs_17_20/Shap.py +28 -6
- teradataml/data/docs/sqle/docs_17_20/TextMorph.py +119 -0
- teradataml/data/docs/sqle/docs_17_20/TextParser.py +54 -3
- teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/DFFT.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/DFFT2.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/DFFTConv.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/DWT2D.py +4 -1
- teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +4 -4
- teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +6 -6
- teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +4 -4
- teradataml/data/docs/uaf/docs_17_20/MultivarRegr.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/PACF.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/PowerTransform.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/Resample.py +5 -5
- teradataml/data/docs/uaf/docs_17_20/SAX.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/SimpleExp.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/Smoothma.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/UNDIFF.py +1 -1
- teradataml/data/hnsw_alter_data.csv +5 -0
- teradataml/data/hnsw_data.csv +10 -0
- teradataml/data/jsons/byom/h2opredict.json +1 -1
- teradataml/data/jsons/byom/onnxembeddings.json +266 -0
- teradataml/data/jsons/sqle/17.20/NGramSplitter.json +6 -6
- teradataml/data/jsons/sqle/17.20/TD_Apriori.json +181 -0
- teradataml/data/jsons/sqle/17.20/TD_NERExtractor.json +145 -0
- teradataml/data/jsons/sqle/17.20/TD_SMOTE.json +267 -0
- teradataml/data/jsons/sqle/17.20/TD_Shap.json +0 -1
- teradataml/data/jsons/sqle/17.20/TD_TextMorph.json +134 -0
- teradataml/data/jsons/sqle/17.20/TD_TextParser.json +114 -9
- teradataml/data/jsons/sqle/20.00/AI_AnalyzeSentiment.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_AskLLM.json +420 -0
- teradataml/data/jsons/sqle/20.00/AI_DetectLanguage.json +343 -0
- teradataml/data/jsons/sqle/20.00/AI_ExtractKeyPhrases.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_MaskPII.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_RecognizeEntities.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_RecognizePIIEntities.json +328 -0
- teradataml/data/jsons/sqle/20.00/AI_TextClassifier.json +359 -0
- teradataml/data/jsons/sqle/20.00/AI_TextEmbeddings.json +360 -0
- teradataml/data/jsons/sqle/20.00/AI_TextSummarize.json +343 -0
- teradataml/data/jsons/sqle/20.00/AI_TextTranslate.json +343 -0
- teradataml/data/jsons/sqle/20.00/TD_HNSW.json +296 -0
- teradataml/data/jsons/sqle/20.00/TD_HNSWPredict.json +206 -0
- teradataml/data/jsons/sqle/20.00/TD_HNSWSummary.json +32 -0
- teradataml/data/jsons/sqle/20.00/TD_KMeans.json +2 -2
- teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +3 -3
- teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +6 -6
- teradataml/data/ner_dict.csv +8 -0
- teradataml/data/ner_input_eng.csv +7 -0
- teradataml/data/ner_rule.csv +5 -0
- teradataml/data/pos_input.csv +40 -0
- teradataml/data/tdnerextractor_example.json +14 -0
- teradataml/data/teradataml_example.json +21 -0
- teradataml/data/textmorph_example.json +5 -0
- teradataml/data/to_num_data.csv +4 -0
- teradataml/data/tochar_data.csv +5 -0
- teradataml/data/trans_dense.csv +16 -0
- teradataml/data/trans_sparse.csv +55 -0
- teradataml/data/vectordistance_example.json +1 -1
- teradataml/dataframe/copy_to.py +45 -29
- teradataml/dataframe/data_transfer.py +72 -46
- teradataml/dataframe/dataframe.py +642 -166
- teradataml/dataframe/dataframe_utils.py +167 -22
- teradataml/dataframe/functions.py +135 -20
- teradataml/dataframe/setop.py +11 -6
- teradataml/dataframe/sql.py +330 -78
- teradataml/dbutils/dbutils.py +556 -140
- teradataml/dbutils/filemgr.py +14 -10
- teradataml/hyperparameter_tuner/optimizer.py +12 -1
- teradataml/lib/aed_0_1.dll +0 -0
- teradataml/opensource/{sklearn/_sklearn_wrapper.py → _base.py} +168 -1013
- teradataml/opensource/_class.py +141 -17
- teradataml/opensource/{constants.py → _constants.py} +7 -3
- teradataml/opensource/_lightgbm.py +52 -53
- teradataml/opensource/_sklearn.py +1008 -0
- teradataml/opensource/_wrapper_utils.py +5 -5
- teradataml/options/__init__.py +47 -15
- teradataml/options/configure.py +103 -26
- teradataml/options/display.py +13 -2
- teradataml/plot/axis.py +47 -8
- teradataml/plot/figure.py +33 -0
- teradataml/plot/plot.py +63 -13
- teradataml/scriptmgmt/UserEnv.py +307 -40
- teradataml/scriptmgmt/lls_utils.py +428 -145
- teradataml/store/__init__.py +2 -3
- teradataml/store/feature_store/feature_store.py +102 -7
- teradataml/table_operators/Apply.py +48 -19
- teradataml/table_operators/Script.py +23 -2
- teradataml/table_operators/TableOperator.py +3 -1
- teradataml/table_operators/table_operator_util.py +58 -9
- teradataml/utils/dtypes.py +49 -1
- teradataml/utils/internal_buffer.py +38 -0
- teradataml/utils/validators.py +377 -62
- {teradataml-20.0.0.3.dist-info → teradataml-20.0.0.5.dist-info}/METADATA +200 -4
- {teradataml-20.0.0.3.dist-info → teradataml-20.0.0.5.dist-info}/RECORD +146 -112
- teradataml/data/SQL_Fundamentals.pdf +0 -0
- teradataml/libaed_0_1.dylib +0 -0
- teradataml/libaed_0_1.so +0 -0
- teradataml/opensource/sklearn/__init__.py +0 -0
- teradataml/store/vector_store/__init__.py +0 -1586
- {teradataml-20.0.0.3.dist-info → teradataml-20.0.0.5.dist-info}/WHEEL +0 -0
- {teradataml-20.0.0.3.dist-info → teradataml-20.0.0.5.dist-info}/top_level.txt +0 -0
- {teradataml-20.0.0.3.dist-info → teradataml-20.0.0.5.dist-info}/zip-safe +0 -0
|
@@ -125,6 +125,7 @@ class ErrorInfoCodes(Enum):
|
|
|
125
125
|
SPECIFY_AT_LEAST_ONE_ARG = 'TDML_2037'
|
|
126
126
|
CANNOT_USE_TOGETHER_WITH = 'TDML_2042'
|
|
127
127
|
TABLE_DOES_NOT_EXIST = 'TDML_2046'
|
|
128
|
+
DEPENDENT_METHOD = 'TDML_2113'
|
|
128
129
|
|
|
129
130
|
# Reserved for Generic Error Messages: 2121 - 2199
|
|
130
131
|
RESERVED_KEYWORD = 'TDML_2121'
|
|
@@ -164,7 +165,7 @@ class ErrorInfoCodes(Enum):
|
|
|
164
165
|
AED_SETOP_INPUT_TABLE_COLUMNS_COUNT_MISMATCH = 'TDML_2111'
|
|
165
166
|
AED_SHOW_QUERY_MULTIPLE_OPTIONS = 'TDML_2112'
|
|
166
167
|
|
|
167
|
-
# Table Operator Error Codes starting from 2300 - Reserved till
|
|
168
|
+
# Table Operator Error Codes starting from 2300 - Reserved till 2314
|
|
168
169
|
INPUT_FILE_NOT_FOUND = 'TDML_2300'
|
|
169
170
|
REMOVE_FILE_FAILED = 'TDML_2301'
|
|
170
171
|
INSTALL_FILE_FAILED = 'TDML_2302'
|
|
@@ -175,6 +176,8 @@ class ErrorInfoCodes(Enum):
|
|
|
175
176
|
NOT_ALLOWED_VALUES = 'TDML_2307'
|
|
176
177
|
ARGUMENT_VALUE_SAME = 'TDML_2308'
|
|
177
178
|
PYTHON_NOT_INSTALLED = 'TDML_2309'
|
|
179
|
+
PYTHON_VERSION_MISMATCH = 'TDML_2310'
|
|
180
|
+
PYTHON_VERSION_MISMATCH_OAF = 'TDML_2416'
|
|
178
181
|
EMPTY_FILE = 'TDML_2311'
|
|
179
182
|
ARG_NONE = 'TDML_2312'
|
|
180
183
|
EITHER_FUNCTION_OR_ARGS = 'TDML_2313'
|
|
@@ -223,7 +226,7 @@ class ErrorInfoCodes(Enum):
|
|
|
223
226
|
TARGET_COL_NOT_FOUND_FOR_EVALUATE = 'TDML_2541'
|
|
224
227
|
|
|
225
228
|
# OpenAF Error codes starting from 2551 - Reserved till 2560.
|
|
226
|
-
|
|
229
|
+
SET_REQUIRED_PARAMS = 'TDML_2551'
|
|
227
230
|
|
|
228
231
|
class MessageCodes(Enum):
|
|
229
232
|
"""
|
|
@@ -396,6 +399,10 @@ class MessageCodes(Enum):
|
|
|
396
399
|
|
|
397
400
|
PYTHON_NOT_INSTALLED = "Python is not installed on Vantage. " \
|
|
398
401
|
"Please install Python interpreter and add-on packages on Vantage."
|
|
402
|
+
PYTHON_VERSION_MISMATCH = "Python version on Vantage is not same as that of local environment. " \
|
|
403
|
+
"Use the same Python version '{}' or '{}.x' in local environment."
|
|
404
|
+
PYTHON_VERSION_MISMATCH_OAF = "Python version of Lake user environment '{}' is not same as that of local environment '{}'. " \
|
|
405
|
+
"Maintain similar version of Python between Lake user environment and local environment."
|
|
399
406
|
IMPORT_PYTHON_PACKAGE = "Module '{}' not found. Install '{}' before running {}()."
|
|
400
407
|
INT_ARGUMENT_COMPARISON = "Argument '{}' must be {} to argument '{}'"
|
|
401
408
|
EXECUTION_FAILED = "Failed to {}. {}"
|
|
@@ -430,4 +437,8 @@ class MessageCodes(Enum):
|
|
|
430
437
|
PATH_NOT_FOUND = "Specified local path '{}' not found. Please check the path."
|
|
431
438
|
TARGET_COL_NOT_FOUND_FOR_EVALUATE = "Target column '{}' not found in the passed dataFrame. "\
|
|
432
439
|
"evaluate() requires target column to be present in the dataFrame."
|
|
433
|
-
|
|
440
|
+
SET_REQUIRED_PARAMS = "{} is required to run '{}'. Set it using {}()."
|
|
441
|
+
CONNECTION_PARAMS = "Required connection parameters are missing. Connection parameters should either be " \
|
|
442
|
+
"explicitly passed to function or specified using a configuration file, or setting up " \
|
|
443
|
+
"the environment variables."
|
|
444
|
+
DEPENDENT_METHOD = "Method(s) {} must be called before calling '{}'."
|
teradataml/common/messages.py
CHANGED
|
@@ -168,6 +168,8 @@ class Messages():
|
|
|
168
168
|
[ErrorInfoCodes.UNSUPPORTED_FILE_EXTENSION, MessageCodes.UNSUPPORTED_FILE_EXTENSION],
|
|
169
169
|
[ErrorInfoCodes.FILE_EMPTY, MessageCodes.FILE_EMPTY],
|
|
170
170
|
[ErrorInfoCodes.PYTHON_NOT_INSTALLED, MessageCodes.PYTHON_NOT_INSTALLED],
|
|
171
|
+
[ErrorInfoCodes.PYTHON_VERSION_MISMATCH, MessageCodes.PYTHON_VERSION_MISMATCH],
|
|
172
|
+
[ErrorInfoCodes.PYTHON_VERSION_MISMATCH_OAF, MessageCodes.PYTHON_VERSION_MISMATCH_OAF],
|
|
171
173
|
[ErrorInfoCodes.INT_ARGUMENT_COMPARISON, MessageCodes.INT_ARGUMENT_COMPARISON],
|
|
172
174
|
[ErrorInfoCodes.EXECUTION_FAILED, MessageCodes.EXECUTION_FAILED],
|
|
173
175
|
[ErrorInfoCodes.INVALID_COLUMN_DATATYPE, MessageCodes.INVALID_COLUMN_DATATYPE],
|
|
@@ -192,7 +194,9 @@ class Messages():
|
|
|
192
194
|
[ErrorInfoCodes.INVALID_PARTITIONING_COLS, MessageCodes.INVALID_PARTITIONING_COLS],
|
|
193
195
|
[ErrorInfoCodes.PATH_NOT_FOUND, MessageCodes.PATH_NOT_FOUND],
|
|
194
196
|
[ErrorInfoCodes.TARGET_COL_NOT_FOUND_FOR_EVALUATE, MessageCodes.TARGET_COL_NOT_FOUND_FOR_EVALUATE],
|
|
195
|
-
[ErrorInfoCodes.
|
|
197
|
+
[ErrorInfoCodes.SET_REQUIRED_PARAMS, MessageCodes.SET_REQUIRED_PARAMS],
|
|
198
|
+
[ErrorInfoCodes.MISSING_ARGS, MessageCodes.CONNECTION_PARAMS],
|
|
199
|
+
[ErrorInfoCodes.DEPENDENT_METHOD, MessageCodes.DEPENDENT_METHOD]
|
|
196
200
|
]
|
|
197
201
|
|
|
198
202
|
@staticmethod
|
|
@@ -221,11 +225,11 @@ class Messages():
|
|
|
221
225
|
|
|
222
226
|
"""
|
|
223
227
|
for msg in Messages.__messages:
|
|
224
|
-
if msg[1] == messagecode
|
|
228
|
+
if msg[1] == messagecode:
|
|
225
229
|
message = "{}({}) {}".format(Messages.__standard_message, msg[0].value, msg[1].value)
|
|
226
230
|
if len(variables) != 0:
|
|
227
231
|
message = message.format(*variables)
|
|
228
|
-
if len(kwargs) != 0
|
|
232
|
+
if len(kwargs) != 0:
|
|
229
233
|
message = "{} {}".format(message, kwargs)
|
|
230
|
-
|
|
234
|
+
break
|
|
231
235
|
return message
|
teradataml/common/sqlbundle.py
CHANGED
|
@@ -40,9 +40,9 @@ class SQLBundle:
|
|
|
40
40
|
[SQLConstants.SQL_BASE_QUERY, "SELECT * FROM {0}"],
|
|
41
41
|
[SQLConstants.SQL_SAMPLE_QUERY, " {0} SAMPLE {1}"],
|
|
42
42
|
[SQLConstants.SQL_SAMPLE_WITH_WHERE_QUERY, " {0} WHERE {1} SAMPLE {2}"],
|
|
43
|
-
[SQLConstants.SQL_CREATE_VOLATILE_TABLE_FROM_QUERY_WITH_DATA, "CREATE MULTISET VOLATILE TABLE {0} AS ({1}) WITH DATA ON COMMIT PRESERVE ROWS"],
|
|
44
|
-
[SQLConstants.SQL_CREATE_VOLATILE_TABLE_FROM_QUERY_WITHOUT_DATA, "CREATE MULTISET VOLATILE TABLE {0} AS ({1}) WITH NO DATA"],
|
|
45
|
-
[SQLConstants.SQL_CREATE_VOLATILE_TABLE_USING_COLUMNS, "CREATE MULTISET VOLATILE TABLE {0}( {1} )"],
|
|
43
|
+
[SQLConstants.SQL_CREATE_VOLATILE_TABLE_FROM_QUERY_WITH_DATA, "CREATE MULTISET VOLATILE TABLE {0} AS ({1}) WITH DATA NO PRIMARY INDEX ON COMMIT PRESERVE ROWS"],
|
|
44
|
+
[SQLConstants.SQL_CREATE_VOLATILE_TABLE_FROM_QUERY_WITHOUT_DATA, "CREATE MULTISET VOLATILE TABLE {0} AS ({1}) WITH NO DATA NO PRIMARY INDEX"],
|
|
45
|
+
[SQLConstants.SQL_CREATE_VOLATILE_TABLE_USING_COLUMNS, "CREATE MULTISET VOLATILE TABLE {0}( {1} ) NO PRIMARY INDEX"],
|
|
46
46
|
[SQLConstants.SQL_CREATE_TABLE_FROM_QUERY_WITH_DATA, "CREATE MULTISET TABLE {0} AS ({1}) WITH DATA"],
|
|
47
47
|
[SQLConstants.SQL_HELP_COLUMNS, "help column {0}.*"],
|
|
48
48
|
[SQLConstants.SQL_DROP_TABLE, "DROP TABLE {0}"],
|
|
@@ -69,6 +69,8 @@ class SQLBundle:
|
|
|
69
69
|
[SQLConstants.SQL_CREATE_TABLE_USING_COLUMNS, "CREATE MULTISET TABLE {0}( {1} )"],
|
|
70
70
|
[SQLConstants.SQL_EXEC_STORED_PROCEDURE, "call {0}"],
|
|
71
71
|
[SQLConstants.SQL_SELECT_COLUMNNAMES_WITH_WHERE, "sel {0} from {1} where {2}"],
|
|
72
|
+
[SQLConstants.SQL_HELP_DATABASE, "HELP DATABASE {0}"],
|
|
73
|
+
[SQLConstants.SQL_HELP_DATALAKE, "HELP DATALAKE {0}"]
|
|
72
74
|
|
|
73
75
|
]
|
|
74
76
|
self._add_sql_version()
|
|
@@ -257,14 +259,15 @@ class SQLBundle:
|
|
|
257
259
|
return query.format(tablename, select_query)
|
|
258
260
|
|
|
259
261
|
@staticmethod
|
|
260
|
-
def _build_drop_table(tablename):
|
|
262
|
+
def _build_drop_table(tablename, purge_clause=None):
|
|
261
263
|
"""
|
|
262
264
|
Returns a drop table DDL statement for a table.
|
|
263
265
|
Example:
|
|
264
266
|
drop table mytab
|
|
265
267
|
|
|
266
268
|
PARAMETERS:
|
|
267
|
-
tablename - The table to drop
|
|
269
|
+
tablename - The table to drop.
|
|
270
|
+
purge_clause - String representing purge clause.
|
|
268
271
|
|
|
269
272
|
RETURNS:
|
|
270
273
|
Returns a drop table DDL statement for the table.
|
|
@@ -273,12 +276,17 @@ class SQLBundle:
|
|
|
273
276
|
None
|
|
274
277
|
|
|
275
278
|
EXAMPLES:
|
|
276
|
-
|
|
277
|
-
|
|
279
|
+
drop_stmt = SQLBundle._build_drop_table('my_tab')
|
|
280
|
+
drop_stmt = SQLBundle._build_drop_table("my_lake"."my_db"."my_tab",
|
|
281
|
+
purge_clause='PURGE ALL')
|
|
282
|
+
drop_stmt = SQLBundle._build_drop_table("my_lake"."my_db"."my_tab",
|
|
283
|
+
purge_clause='NO PURGE')
|
|
278
284
|
"""
|
|
279
285
|
sqlbundle = SQLBundle()
|
|
280
|
-
|
|
281
|
-
|
|
286
|
+
drop_stmt = sqlbundle._get_sql_query(SQLConstants.SQL_DROP_TABLE).format(tablename)
|
|
287
|
+
if purge_clause:
|
|
288
|
+
drop_stmt = "{} {}".format(drop_stmt, purge_clause)
|
|
289
|
+
return drop_stmt
|
|
282
290
|
|
|
283
291
|
@staticmethod
|
|
284
292
|
def _build_drop_view(viewname):
|
|
@@ -400,6 +408,28 @@ class SQLBundle:
|
|
|
400
408
|
return sqlbundle._get_sql_query(SQLConstants.SQL_HELP_VOLATILE_TABLE)
|
|
401
409
|
|
|
402
410
|
@staticmethod
|
|
411
|
+
def _build_help_datalake(datalake_name):
|
|
412
|
+
"""
|
|
413
|
+
Builds a query to get help on datalake.
|
|
414
|
+
|
|
415
|
+
Example:
|
|
416
|
+
"HELP DATALAKE datalake_name;"
|
|
417
|
+
|
|
418
|
+
PARAMETERS:
|
|
419
|
+
|
|
420
|
+
RETURNS:
|
|
421
|
+
returns a HELP DATALAKE <datalake_name> command.
|
|
422
|
+
|
|
423
|
+
RAISES:
|
|
424
|
+
None
|
|
425
|
+
|
|
426
|
+
EXAMPLES:
|
|
427
|
+
query = SQLBundle._build_help_datalake(datalake_name)
|
|
428
|
+
"""
|
|
429
|
+
sqlbundle = SQLBundle()
|
|
430
|
+
help_datalake_sql = sqlbundle._get_sql_query(SQLConstants.SQL_HELP_DATALAKE)
|
|
431
|
+
return help_datalake_sql.format(datalake_name)
|
|
432
|
+
|
|
403
433
|
def _build_select_table_name(tab_name):
|
|
404
434
|
"""
|
|
405
435
|
Builds a query to get table name from DBC.TABLESV
|
|
@@ -463,7 +493,7 @@ class SQLBundle:
|
|
|
463
493
|
# Extracting table name without '%' character
|
|
464
494
|
table_name_str = table_name.replace('%', '')
|
|
465
495
|
|
|
466
|
-
# Adding condition to check if table name contains the string using POSITION function
|
|
496
|
+
# Adding condition to check if table name contains the string using POSITION function.
|
|
467
497
|
# POSITION function returns the position index of the substring in the string if found,
|
|
468
498
|
# else returns 0
|
|
469
499
|
query = "{0}{1}{2}".format(query, sqlbundle._get_sql_query(SQLConstants.SQL_AND_TABLE_NAME_LIKE).format(table_name), \
|