public abstract static class SnowflakeIO.Write<T> extends PTransform<PCollection<T>,PDone>
SnowflakeIO.write()
.name
Constructor and Description |
---|
Write() |
Modifier and Type | Method and Description |
---|---|
PDone |
expand(PCollection<T> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
SnowflakeIO.Write<T> |
withDataSourceConfiguration(SnowflakeIO.DataSourceConfiguration config)
Setting information about Snowflake server.
|
SnowflakeIO.Write<T> |
withDataSourceProviderFn(SerializableFunction<java.lang.Void,javax.sql.DataSource> dataSourceProviderFn)
Setting function that will provide
SnowflakeIO.DataSourceConfiguration in runtime. |
SnowflakeIO.Write<T> |
withFileNameTemplate(java.lang.String fileNameTemplate)
A template name for files saved to GCP.
|
SnowflakeIO.Write<T> |
withQueryTransformation(java.lang.String query)
A query to be executed in Snowflake.
|
SnowflakeIO.Write<T> |
withSnowflakeService(SnowflakeService snowflakeService)
A snowflake service which is supposed to be used.
|
SnowflakeIO.Write<T> |
withStagingBucketName(java.lang.String stagingBucketName)
Name of the cloud bucket (GCS by now) to use as tmp location of CSVs during COPY statement.
|
SnowflakeIO.Write<T> |
withStorageIntegrationName(java.lang.String integrationName)
Name of the Storage Integration in Snowflake to be used.
|
SnowflakeIO.Write<T> |
withTable(java.lang.String table)
A table name to be written in Snowflake.
|
SnowflakeIO.Write<T> |
withUserDataMapper(SnowflakeIO.UserDataMapper userDataMapper)
User-defined function mapping user data into CSV lines.
|
SnowflakeIO.Write<T> |
withWriteDisposition(WriteDisposition writeDisposition)
A disposition to be used during writing to table phase.
|
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate
public SnowflakeIO.Write<T> withDataSourceConfiguration(SnowflakeIO.DataSourceConfiguration config)
config
- - An instance of SnowflakeIO.DataSourceConfiguration
.public SnowflakeIO.Write<T> withDataSourceProviderFn(SerializableFunction<java.lang.Void,javax.sql.DataSource> dataSourceProviderFn)
SnowflakeIO.DataSourceConfiguration
in runtime.dataSourceProviderFn
- a SerializableFunction
.public SnowflakeIO.Write<T> withTable(java.lang.String table)
table
- - String with the name of the table.public SnowflakeIO.Write<T> withStagingBucketName(java.lang.String stagingBucketName)
stagingBucketName
- - String with the name of the bucket.public SnowflakeIO.Write<T> withStorageIntegrationName(java.lang.String integrationName)
integrationName
- - String with the name of the Storage Integration.public SnowflakeIO.Write<T> withQueryTransformation(java.lang.String query)
query
- - String with query.public SnowflakeIO.Write<T> withFileNameTemplate(java.lang.String fileNameTemplate)
fileNameTemplate
- - String with template name for files.public SnowflakeIO.Write<T> withUserDataMapper(SnowflakeIO.UserDataMapper userDataMapper)
userDataMapper
- - an instance of SnowflakeIO.UserDataMapper
.public SnowflakeIO.Write<T> withWriteDisposition(WriteDisposition writeDisposition)
writeDisposition
- - an instance of WriteDisposition
.public SnowflakeIO.Write<T> withSnowflakeService(SnowflakeService snowflakeService)
SnowflakeServiceImpl
with corresponding FakeSnowflakeServiceImpl
used for testing.snowflakeService
- - an instance of SnowflakeService
.public PDone expand(PCollection<T> input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PCollection<T>,PDone>