public class TextTableProvider extends java.lang.Object implements TableProvider
A sample of text table is:
CREATE TABLE ORDERS(
ID INT PRIMARY KEY COMMENT 'this is the primary key',
NAME VARCHAR(127) COMMENT 'this is the name'
)
TYPE 'text'
COMMENT 'this is the table orders'
LOCATION 'text://home/admin/orders'
TBLPROPERTIES '{"format": "Excel"}' -- format of each text line(csv format)
Constructor and Description |
---|
TextTableProvider() |
Modifier and Type | Method and Description |
---|---|
BeamSqlTable |
buildBeamSqlTable(Table table)
Build a
BeamSqlTable using the given table meta info. |
void |
close()
Close the provider.
|
void |
createTable(Table table)
Creates a table.
|
void |
dropTable(java.lang.String tableName)
Drops a table.
|
java.lang.String |
getTableType()
Gets the table type this provider handles.
|
void |
init()
Init the provider.
|
java.util.List<Table> |
listTables()
List all tables from this provider.
|
public java.lang.String getTableType()
TableProvider
getTableType
in interface TableProvider
public BeamSqlTable buildBeamSqlTable(Table table)
TableProvider
BeamSqlTable
using the given table meta info.buildBeamSqlTable
in interface TableProvider
public void createTable(Table table)
TableProvider
createTable
in interface TableProvider
public void dropTable(java.lang.String tableName)
TableProvider
dropTable
in interface TableProvider
public java.util.List<Table> listTables()
TableProvider
listTables
in interface TableProvider
public void init()
TableProvider
init
in interface TableProvider
public void close()
TableProvider
close
in interface TableProvider