MindLake.DataLake
1. query() Method
Execute a SQL query or command.
mindlake.datalake.query(executeSql: str) -> ResultType
# mindlake is an instance of MindLakeParameters
executeSql -
str: the SQL statement used to query Mind Lake, such asSELECT, INSERT, UPDATE, and DELETE.
Returns
An object of ResultType. For more information.
data-dict: The result of query execution.{ 'columnList': [], 'data': [][] }columnList -
list<str>: the column names in the specific order in which they appear.data -
list<list<str>>: The query data result is presented as a 2D array, with rows and columns.
Example
2. createTable() Method
Create a table in the user's own account in Mind Lake.
Parameters
tableName-str: the name of the table to be created.columns-list<Column>: defines the columns in the table. Each column should be defined as aMindLake.DataLake.Columnobject.primaryKey(Optional) -list<str>: defines the table's primary key by specifying one or more columns. Each column in the primary key should be identified by its column name. If theprimaryKeyparameter is omitted, no primary key will be defined for the table.
Returns
An object of ResultType. For more information.
Example
3. MindLake.DataLake.Column
Column type is used to represent a single column in a table. Each Column instance encapsulates properties about the column, including its name, data type, and encryption status. By creating a Column object, you can define the properties of a table column and use it to construct a table schema.
Fields
columnName-str: The name of the column.dataType-MindLake.DataType: The data type of the column, which should be define asMindLake.DataTypeencrypt-bool: A flag that indicates whether the column should be encrypted or not.
4. listTablesByCocoon() Method
Retrieve a list of names for the tables that belong to the user invoking the method, or in the specified cocoon.
Parameters
cocoonName-str: specifies the name of the cocoon for which a list of tables should be returned.
Returns
An object of ResultType. For more information.
data-list<str>: a list of names for the tables that belong to the user invoking the method, or in the specified cocoon.
Example
5. createCocoon() Method
Create a Cocoon in Mind Lake. Tables can be categorized into cocoons for classification purposes.
Parameters
cocoonName-str: the name of the cocoon to be created.
Returns
An object of ResultType. For more information.
Example
6. listCocoon() Method
Retrieve a list of names for the cocoons that belong to the user invoking the method.
Returns
An object of ResultType. For more information.
data-list<str>: a list of names for the cocoons that belong to the user invoking the method.
Example
7. linkTableToCocoon() Method
Assign the specified cocoon tag to the table.
Parameters
tableName-str: the name of the table to be tagged with.cocoonName-str: specifies the name of the cocoon for which the table should be tagged with.
Returns
An object of ResultType. For more information.
Example
8. dropCocoon() Method
Delete a Cocoon in Mind Lake.
Parameters
cocoonName-str: the name of the cocoon to be dropped.
Returns
An object of ResultType. For more information.
Example
9. dropTable() Method
Drop a table in the user's own account in Mind Lake.
Parameters
tableName-str: the name of the table to be dropped.
Returns
An object of ResultType. For more information.
Example
Last updated