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
ConstructorDescriptionGoogleSheetsDrillSchema
(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 filesvoid
org.apache.calcite.schema.Table
Returns string describing schema type which shows where the schema came from.boolean
modifyTable
(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:AbstractSchema
Returns 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:
getTypeName
in classAbstractSchema
- Returns:
- schema type name
-
getTable
- Specified by:
getTable
in interfaceorg.apache.calcite.schema.Schema
- Overrides:
getTable
in classAbstractSchema
-
getTableNames
- Specified by:
getTableNames
in interfaceorg.apache.calcite.schema.Schema
- Overrides:
getTableNames
in classAbstractSchema
-
isMutable
public boolean isMutable()- Specified by:
isMutable
in interfaceorg.apache.calcite.schema.Schema
- Overrides:
isMutable
in classAbstractSchema
-
createNewTable
public CreateTableEntry createNewTable(String tableName, List<String> partitionColumns, StorageStrategy storageStrategy) Description copied from class:AbstractSchema
Creates table entry using table name, list of partition columns and storage strategy used to create table folder and files- Overrides:
createNewTable
in 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:AbstractSchema
Returns table entry using table name to insert records into the table.- Overrides:
modifyTable
in classAbstractSchema
- Parameters:
tableName
- : new table name.- Returns:
- insert table entry
-
dropTable
- Overrides:
dropTable
in classAbstractSchema
-