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