Table of Contents
SQL
src/modules/sql/index.js:12-109
SQL module for DataFrame, providing SQL-like syntax for data exploration in DataFrames.
Parameters
df
DataFrame An instance of DataFrame.
register
src/modules/sql/index.js:105-108
Register the DataFrame as temporary table.
Parameters
tableName
String The name of the table.overwrite
Boolean Overwrite if the table already exists. (optional, defaultfalse
)
Examples
df.sql.register('tmp');
request
src/modules/sql/index.js:20-24
Request on a SQL query.
Parameters
query
String A SQL query to request.
Examples
DataFrame.request('SELECT * FROM tmp');
Returns any The result of the query.
dropTables
src/modules/sql/index.js:31-33
Drop or remove all registered tables.
Examples
DataFrame.dropTables();
dropTable
src/modules/sql/index.js:41-43
Drop or remove a registered table.
Parameters
tableName
String The registered table to drop.
Examples
DataFrame.dropTable('tmp1');
renameTable
src/modules/sql/index.js:53-56
Rename a registered table.
Parameters
tableName
String The registered table to rename.replacement
String The new table name.overwrite
Boolean Overwrite if the table already exists. (optional, defaultfalse
)
Examples
DataFrame.renameTable('tmp1', 'notTmp1');
listTables
src/modules/sql/index.js:64-66
List all registered tables.
Examples
DataFrame.listTables();
Returns Array A list of the registered tables.
registerTable
src/modules/sql/index.js:76-87
Register a DataFrame as a temporary table.
Parameters
df
DataFrame The DataFrame to register.tableName
String The temporary table name.overwrite
Boolean Overwrite if the table already exists. (optional, defaultfalse
)
Examples
DataFrame.registerTable('tmp', df);