public abstract static class SnowflakeIO.Read<T> extends PTransform<PBegin,PCollection<T>>
SnowflakeIO.read()
.Modifier and Type | Class and Description |
---|---|
static class |
SnowflakeIO.Read.CleanTmpFilesFromGcsFn |
static class |
SnowflakeIO.Read.MapCsvToStringArrayFn |
name
Constructor and Description |
---|
Read() |
Modifier and Type | Method and Description |
---|---|
PCollection<T> |
expand(PBegin input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
SnowflakeIO.Read<T> |
fromQuery(java.lang.String query)
A query to be executed in Snowflake.
|
SnowflakeIO.Read<T> |
fromTable(java.lang.String table)
A table name to be read in Snowflake.
|
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
SnowflakeIO.Read<T> |
withCoder(Coder<T> coder)
A Coder to be used by the output PCollection generated by the source.
|
SnowflakeIO.Read<T> |
withCsvMapper(SnowflakeIO.CsvMapper<T> csvMapper)
User-defined function mapping CSV lines into user data.
|
SnowflakeIO.Read<T> |
withDataSourceConfiguration(SnowflakeIO.DataSourceConfiguration config)
Setting information about Snowflake server.
|
SnowflakeIO.Read<T> |
withDataSourceProviderFn(SerializableFunction<java.lang.Void,javax.sql.DataSource> dataSourceProviderFn)
Setting function that will provide
SnowflakeIO.DataSourceConfiguration in runtime. |
SnowflakeIO.Read<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.Read<T> |
withStorageIntegrationName(java.lang.String integrationName)
Name of the Storage Integration in Snowflake to be used.
|
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString, validate
public SnowflakeIO.Read<T> withDataSourceConfiguration(SnowflakeIO.DataSourceConfiguration config)
config
- - An instance of SnowflakeIO.DataSourceConfiguration
.public SnowflakeIO.Read<T> withDataSourceProviderFn(SerializableFunction<java.lang.Void,javax.sql.DataSource> dataSourceProviderFn)
SnowflakeIO.DataSourceConfiguration
in runtime.dataSourceProviderFn
- a SerializableFunction
.public SnowflakeIO.Read<T> fromQuery(java.lang.String query)
query
- - String with query.public SnowflakeIO.Read<T> fromTable(java.lang.String table)
table
- - String with the name of the table.public SnowflakeIO.Read<T> withStagingBucketName(java.lang.String stagingBucketName)
stagingBucketName
- - String with the name of the bucket.public SnowflakeIO.Read<T> withStorageIntegrationName(java.lang.String integrationName)
integrationName
- - String with the name of the Storage Integration.public SnowflakeIO.Read<T> withCsvMapper(SnowflakeIO.CsvMapper<T> csvMapper)
csvMapper
- - an instance of SnowflakeIO.CsvMapper
.public SnowflakeIO.Read<T> withCoder(Coder<T> coder)
coder
- - an instance of Coder
.public PCollection<T> expand(PBegin 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<PBegin,PCollection<T>>
public void populateDisplayData(DisplayData.Builder builder)
PTransform
populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData)
. Implementations may call super.populateDisplayData(builder)
in order to register display data in the current namespace,
but should otherwise use subcomponent.populateDisplayData(builder)
to use the namespace
of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData
in interface HasDisplayData
populateDisplayData
in class PTransform<PBegin,PCollection<T>>
builder
- The builder to populate with display data.HasDisplayData