Class GoogleSheetsDrillSchema
java.lang.Object
org.apache.drill.exec.store.AbstractSchema
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema
- All Implemented Interfaces:
AutoCloseable,org.apache.calcite.schema.Schema,SchemaPartitionExplorer
This class represents the actual tab within a GoogleSheets document.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
org.apache.calcite.schema.Schema.TableType -
Field Summary
Fields inherited from class org.apache.drill.exec.store.AbstractSchema
name, SCHEMA_SEPARATOR, schemaPath -
Constructor Summary
ConstructorsConstructorDescriptionGoogleSheetsDrillSchema(AbstractSchema parent, String fileToken, GoogleSheetsStoragePlugin plugin, SchemaConfig schemaConfig, com.google.api.services.sheets.v4.Sheets sheetsService, String fileName) -
Method Summary
Modifier and TypeMethodDescriptioncreateNewTable(String tableName, List<String> partitionColumns, StorageStrategy storageStrategy) Creates table entry using table name, list of partition columns and storage strategy used to create table folder and filesvoidorg.apache.calcite.schema.TableReturns string describing schema type which shows where the schema came from.booleanmodifyTable(String tableName) Returns table entry using table name to insert records into the table.Methods inherited from class org.apache.drill.exec.store.AbstractSchema
appendToStatsTable, applyFunctionParameters, areTableNamesCaseSensitive, close, createNewTable, createStatsTable, createView, dropView, getDefaultSchema, getExpression, getFullSchemaName, getFunctionNames, getFunctionParameters, getFunctions, getName, getSchemaPath, getStatsTable, getSubPartitions, getSubSchema, getSubSchemaNames, getTableNamesAndTypes, getTablesByNames, getType, getTypeMap, getTypeNames, getUser, needToImpersonateReadingData, showInInformationSchema, snapshot, toString
-
Constructor Details
-
GoogleSheetsDrillSchema
public GoogleSheetsDrillSchema(AbstractSchema parent, String fileToken, GoogleSheetsStoragePlugin plugin, SchemaConfig schemaConfig, com.google.api.services.sheets.v4.Sheets sheetsService, String fileName)
-
-
Method Details
-
getTypeName
Description copied from class:AbstractSchemaReturns string describing schema type which shows where the schema came from. Good practice here is to return json type name of storage plugin's config.- Specified by:
getTypeNamein classAbstractSchema- Returns:
- schema type name
-
getTable
- Specified by:
getTablein interfaceorg.apache.calcite.schema.Schema- Overrides:
getTablein classAbstractSchema
-
getTableNames
- Specified by:
getTableNamesin interfaceorg.apache.calcite.schema.Schema- Overrides:
getTableNamesin classAbstractSchema
-
isMutable
public boolean isMutable()- Specified by:
isMutablein interfaceorg.apache.calcite.schema.Schema- Overrides:
isMutablein classAbstractSchema
-
createNewTable
public CreateTableEntry createNewTable(String tableName, List<String> partitionColumns, StorageStrategy storageStrategy) Description copied from class:AbstractSchemaCreates table entry using table name, list of partition columns and storage strategy used to create table folder and files- Overrides:
createNewTablein classAbstractSchema- Parameters:
tableName- : new table name.partitionColumns- : list of partition columns. Empty list if there is no partition columns.storageStrategy- : storage strategy used to create table folder and files- Returns:
- create table entry
-
modifyTable
Description copied from class:AbstractSchemaReturns table entry using table name to insert records into the table.- Overrides:
modifyTablein classAbstractSchema- Parameters:
tableName- : new table name.- Returns:
- insert table entry
-
dropTable
- Overrides:
dropTablein classAbstractSchema
-