Package org.pipecraft.infra.bq
Class TableExportConfig
- java.lang.Object
-
- org.pipecraft.infra.bq.TableExportConfig
-
public class TableExportConfig extends Object
Settings for BQ table export operation. An export consists of copying table's contents to GoogleStorage. Immutable.- Author:
- Eyal Rubichi, Eyal Schneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTableExportConfig.Builderstatic classTableExportConfig.Compressionstatic classTableExportConfig.ExportFormat
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TableExportConfig.CompressiongetCompression()chargetCSVFieldDelimiter()Set<String>getDestinationURIs()TableExportConfig.ExportFormatgetExportFormat()com.google.cloud.bigquery.TableIdgetSourceTableReference()LonggetTimeoutMs()booleanisPrintHeader()static TableExportConfig.BuildernewBuilder(com.google.cloud.bigquery.TableId sourceTableReference, String destinationURI)static TableExportConfig.BuildernewBuilder(com.google.cloud.bigquery.TableId sourceTableReference, Set<String> destinationURIs)StringtoString()
-
-
-
Method Detail
-
newBuilder
public static TableExportConfig.Builder newBuilder(com.google.cloud.bigquery.TableId sourceTableReference, Set<String> destinationURIs)
- Parameters:
sourceTableReference- reference to the table to exportdestinationURIs- The set of fully-qualified Google Cloud Storage URIs where the table should be written to. A URI may contain a wildcard ('*') in the file name part of the path, indicating that a sharded output is required. BigQuery makes it mandatory for large tables.- Returns:
- A new builder initialized with the given source and destinations, having default values for other fields.
-
newBuilder
public static TableExportConfig.Builder newBuilder(com.google.cloud.bigquery.TableId sourceTableReference, String destinationURI)
- Parameters:
sourceTableReference- reference to the table to exportdestinationURI- The fully-qualified Google Cloud Storage URI where the table should be written to. A URI may contain a wildcard ('*') in the file name part of the path, indicating that a sharded output is required. BigQuery makes it mandatory for large tables.- Returns:
- A new builder initialized with the given source and destination, having default values for other fields.
-
getExportFormat
public TableExportConfig.ExportFormat getExportFormat()
- Returns:
- the format of the output file. Default is CSV.
-
getCompression
public TableExportConfig.Compression getCompression()
- Returns:
- the compression of the output file/s. Default is NONE.
-
getCSVFieldDelimiter
public char getCSVFieldDelimiter()
- Returns:
- the field delimiter in the output file/s. Default is ','. Relevant only for CSV format.
-
isPrintHeader
public boolean isPrintHeader()
- Returns:
- indicates whether the file should contain the column names. Relevant only for CSV format. Default is true.
-
getSourceTableReference
public com.google.cloud.bigquery.TableId getSourceTableReference()
- Returns:
- reference to the table to export
-
getDestinationURIs
public Set<String> getDestinationURIs()
- Returns:
- The set of fully-qualified Google Cloud Storage URIs where the table should be written to. A URI may contain a wildcard ('*') in the file name part of the path, indicating that a sharded output is required. BigQuery makes it mandatory for large tables.
-
getTimeoutMs
public Long getTimeoutMs()
- Returns:
- The export execution timeout, in milliseconds. Null means no timeout.
NOTE: Google's API doesn't seem to always respect this limit, and it's not always clear which timeout applies
(The export level timeout here or the global one as provided in the
BigQueryConnector's constructor.
-
-