Class GoogleSheetsBatchWriter
java.lang.Object
org.apache.drill.exec.store.AbstractRecordWriter
org.apache.drill.exec.store.googlesheets.GoogleSheetsBatchWriter
- All Implemented Interfaces:
RecordWriter
- Direct Known Subclasses:
GoogleSheetsBatchInsertWriter
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGoogleSheetsBatchWriter
(OperatorContext context, String name, GoogleSheetsWriter config) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
void
cleanup()
void
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods.getNewBigIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewBitConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewDateConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewFloat4Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewFloat8Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableBigIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableBitConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableDateConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableFloat4Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableFloat8Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableSmallIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableTimeConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableTimeStampConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableTinyIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableVarCharConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableVarDecimalConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewSmallIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewTimeConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewTimeStampConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewTinyIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewVarCharConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewVarDecimalConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.void
Initialize the writer.void
Called before starting writing fields in a record.void
updateSchema
(VectorAccessible batch) Update the schema in RecordWriter.Methods inherited from class org.apache.drill.exec.store.AbstractRecordWriter
checkForNewPartition, getNewDecimal18Converter, getNewDecimal28DenseConverter, getNewDecimal28SparseConverter, getNewDecimal38DenseConverter, getNewDecimal38SparseConverter, getNewDecimal9Converter, getNewDictConverter, getNewIntervalConverter, getNewIntervalDayConverter, getNewIntervalYearConverter, getNewMapConverter, getNewNullableDecimal18Converter, getNewNullableDecimal28DenseConverter, getNewNullableDecimal28SparseConverter, getNewNullableDecimal38DenseConverter, getNewNullableDecimal38SparseConverter, getNewNullableDecimal9Converter, getNewNullableIntervalConverter, getNewNullableIntervalDayConverter, getNewNullableIntervalYearConverter, getNewNullableUInt1Converter, getNewNullableUInt2Converter, getNewNullableUInt4Converter, getNewNullableUInt8Converter, getNewNullableVar16CharConverter, getNewNullableVarBinaryConverter, getNewRepeatedBigIntConverter, getNewRepeatedBitConverter, getNewRepeatedDateConverter, getNewRepeatedDecimal18Converter, getNewRepeatedDecimal28DenseConverter, getNewRepeatedDecimal28SparseConverter, getNewRepeatedDecimal38DenseConverter, getNewRepeatedDecimal38SparseConverter, getNewRepeatedDecimal9Converter, getNewRepeatedDictConverter, getNewRepeatedFloat4Converter, getNewRepeatedFloat8Converter, getNewRepeatedIntConverter, getNewRepeatedIntervalConverter, getNewRepeatedIntervalDayConverter, getNewRepeatedIntervalYearConverter, getNewRepeatedListConverter, getNewRepeatedMapConverter, getNewRepeatedSmallIntConverter, getNewRepeatedTimeConverter, getNewRepeatedTimeStampConverter, getNewRepeatedTinyIntConverter, getNewRepeatedUInt1Converter, getNewRepeatedUInt2Converter, getNewRepeatedUInt4Converter, getNewRepeatedUInt8Converter, getNewRepeatedVar16CharConverter, getNewRepeatedVarBinaryConverter, getNewRepeatedVarCharConverter, getNewRepeatedVarDecimalConverter, getNewUInt1Converter, getNewUInt2Converter, getNewUInt4Converter, getNewUInt8Converter, getNewUnionConverter, getNewVar16CharConverter, getNewVarBinaryConverter, newPartition, postProcessing, setPartitionVector, supportsField
-
Field Details
-
service
protected final com.google.api.services.sheets.v4.Sheets service -
tabName
-
sheetName
-
values
-
spreadsheetID
-
-
Constructor Details
-
GoogleSheetsBatchWriter
-
-
Method Details
-
init
Description copied from interface:RecordWriter
Initialize the writer.- Parameters:
writerOptions
- Contains key, value pair of settings.
-
updateSchema
Description copied from interface:RecordWriter
Update the schema in RecordWriter. Called at least once before starting writing the records.- Throws:
IOException
-
startRecord
public void startRecord()Description copied from interface:RecordWriter
Called before starting writing fields in a record. -
endRecord
public void endRecord()Description copied from interface:RecordWriter
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods. -
abort
public void abort() -
cleanup
public void cleanup() -
getNewNullableBigIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableBigIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableBigIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableBigIntConverter
in classAbstractRecordWriter
-
getNewBigIntConverter
public EventBasedRecordWriter.FieldConverter getNewBigIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewBigIntConverter
in interfaceRecordWriter
- Overrides:
getNewBigIntConverter
in classAbstractRecordWriter
-
getNewNullableIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableIntConverter
in classAbstractRecordWriter
-
getNewIntConverter
public EventBasedRecordWriter.FieldConverter getNewIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewIntConverter
in interfaceRecordWriter
- Overrides:
getNewIntConverter
in classAbstractRecordWriter
-
getNewNullableSmallIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableSmallIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableSmallIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableSmallIntConverter
in classAbstractRecordWriter
-
getNewSmallIntConverter
public EventBasedRecordWriter.FieldConverter getNewSmallIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewSmallIntConverter
in interfaceRecordWriter
- Overrides:
getNewSmallIntConverter
in classAbstractRecordWriter
-
getNewNullableTinyIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableTinyIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableTinyIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableTinyIntConverter
in classAbstractRecordWriter
-
getNewTinyIntConverter
public EventBasedRecordWriter.FieldConverter getNewTinyIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewTinyIntConverter
in interfaceRecordWriter
- Overrides:
getNewTinyIntConverter
in classAbstractRecordWriter
-
getNewNullableFloat8Converter
public EventBasedRecordWriter.FieldConverter getNewNullableFloat8Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableFloat8Converter
in interfaceRecordWriter
- Overrides:
getNewNullableFloat8Converter
in classAbstractRecordWriter
-
getNewFloat8Converter
public EventBasedRecordWriter.FieldConverter getNewFloat8Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewFloat8Converter
in interfaceRecordWriter
- Overrides:
getNewFloat8Converter
in classAbstractRecordWriter
-
getNewNullableFloat4Converter
public EventBasedRecordWriter.FieldConverter getNewNullableFloat4Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableFloat4Converter
in interfaceRecordWriter
- Overrides:
getNewNullableFloat4Converter
in classAbstractRecordWriter
-
getNewFloat4Converter
public EventBasedRecordWriter.FieldConverter getNewFloat4Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewFloat4Converter
in interfaceRecordWriter
- Overrides:
getNewFloat4Converter
in classAbstractRecordWriter
-
getNewNullableVarDecimalConverter
public EventBasedRecordWriter.FieldConverter getNewNullableVarDecimalConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableVarDecimalConverter
in interfaceRecordWriter
- Overrides:
getNewNullableVarDecimalConverter
in classAbstractRecordWriter
-
getNewVarDecimalConverter
public EventBasedRecordWriter.FieldConverter getNewVarDecimalConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewVarDecimalConverter
in interfaceRecordWriter
- Overrides:
getNewVarDecimalConverter
in classAbstractRecordWriter
-
getNewNullableVarCharConverter
public EventBasedRecordWriter.FieldConverter getNewNullableVarCharConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableVarCharConverter
in interfaceRecordWriter
- Overrides:
getNewNullableVarCharConverter
in classAbstractRecordWriter
-
getNewVarCharConverter
public EventBasedRecordWriter.FieldConverter getNewVarCharConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewVarCharConverter
in interfaceRecordWriter
- Overrides:
getNewVarCharConverter
in classAbstractRecordWriter
-
getNewNullableDateConverter
public EventBasedRecordWriter.FieldConverter getNewNullableDateConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableDateConverter
in interfaceRecordWriter
- Overrides:
getNewNullableDateConverter
in classAbstractRecordWriter
-
getNewDateConverter
public EventBasedRecordWriter.FieldConverter getNewDateConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewDateConverter
in interfaceRecordWriter
- Overrides:
getNewDateConverter
in classAbstractRecordWriter
-
getNewNullableTimeConverter
public EventBasedRecordWriter.FieldConverter getNewNullableTimeConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableTimeConverter
in interfaceRecordWriter
- Overrides:
getNewNullableTimeConverter
in classAbstractRecordWriter
-
getNewTimeConverter
public EventBasedRecordWriter.FieldConverter getNewTimeConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewTimeConverter
in interfaceRecordWriter
- Overrides:
getNewTimeConverter
in classAbstractRecordWriter
-
getNewNullableTimeStampConverter
public EventBasedRecordWriter.FieldConverter getNewNullableTimeStampConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableTimeStampConverter
in interfaceRecordWriter
- Overrides:
getNewNullableTimeStampConverter
in classAbstractRecordWriter
-
getNewTimeStampConverter
public EventBasedRecordWriter.FieldConverter getNewTimeStampConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewTimeStampConverter
in interfaceRecordWriter
- Overrides:
getNewTimeStampConverter
in classAbstractRecordWriter
-
getNewNullableBitConverter
public EventBasedRecordWriter.FieldConverter getNewNullableBitConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableBitConverter
in interfaceRecordWriter
- Overrides:
getNewNullableBitConverter
in classAbstractRecordWriter
-
getNewBitConverter
public EventBasedRecordWriter.FieldConverter getNewBitConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewBitConverter
in interfaceRecordWriter
- Overrides:
getNewBitConverter
in classAbstractRecordWriter
-