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
Removes temporary staged files after reading.
|
static class |
SnowflakeIO.Read.MapCsvToStringArrayFn
Parses
String from incoming data in PCollection to have proper format for CSV
files. |
name, resourceHints| 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> |
fromQuery(ValueProvider<java.lang.String> query) |
SnowflakeIO.Read<T> |
fromTable(java.lang.String table)
A table name to be read in Snowflake.
|
SnowflakeIO.Read<T> |
fromTable(ValueProvider<java.lang.String> table) |
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> |
withQuotationMark(java.lang.String quotationMark)
Sets Snowflake-specific quotations around strings.
|
SnowflakeIO.Read<T> |
withQuotationMark(ValueProvider<java.lang.String> quotationMark) |
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> |
withStagingBucketName(ValueProvider<java.lang.String> stagingBucketName) |
SnowflakeIO.Read<T> |
withStorageIntegrationName(java.lang.String integrationName)
Name of the Storage Integration in Snowflake to be used.
|
SnowflakeIO.Read<T> |
withStorageIntegrationName(ValueProvider<java.lang.String> integrationName) |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setResourceHints, toString, validate, validatepublic 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> fromQuery(ValueProvider<java.lang.String> query)
public SnowflakeIO.Read<T> fromTable(java.lang.String table)
table - String with the name of the table.public SnowflakeIO.Read<T> fromTable(ValueProvider<java.lang.String> table)
public SnowflakeIO.Read<T> withStagingBucketName(java.lang.String stagingBucketName)
stagingBucketName - String with the name of the bucket.public SnowflakeIO.Read<T> withStagingBucketName(ValueProvider<java.lang.String> stagingBucketName)
public SnowflakeIO.Read<T> withStorageIntegrationName(java.lang.String integrationName)
integrationName - String with the name of the Storage Integration.public SnowflakeIO.Read<T> withStorageIntegrationName(ValueProvider<java.lang.String> integrationName)
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 SnowflakeIO.Read<T> withQuotationMark(java.lang.String quotationMark)
quotationMark - with possible single quote ', double quote " or nothing.
Default value is single quotation '.public SnowflakeIO.Read<T> withQuotationMark(ValueProvider<java.lang.String> quotationMark)
public PCollection<T> expand(PBegin input)
PTransformPTransform 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)
PTransformpopulateDisplayData(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 HasDisplayDatapopulateDisplayData in class PTransform<PBegin,PCollection<T>>builder - The builder to populate with display data.HasDisplayData