/** * @deprecated Use {@link #read(SerializableFunction)} or {@link #readTableRows} instead. {@link * #readTableRows()} does exactly the same as {@link #read}, however {@link * #read(SerializableFunction)} performs better. */ @Deprecated public static Read read() { return new Read(); }
/** Same as {@code fromQuery(String)}, but with a {@link ValueProvider}. */ public Read fromQuery(ValueProvider<String> query) { return new Read(this.inner.fromQuery(query)); }
/** Same as {@code from(String)}, but with a {@link ValueProvider}. */ public Read from(ValueProvider<String> tableSpec) { return new Read(this.inner.from(tableSpec)); }
/** * Disable validation that the table exists or the query succeeds prior to pipeline submission. * Basic validation (such as ensuring that a query or table is specified) still occurs. */ public Read withoutValidation() { return new Read(this.inner.withoutValidation()); }
Read withTestServices(BigQueryServices testServices) { return new Read(this.inner.withTestServices(testServices)); }
/** * Reads results received after executing the given query. * * <p>By default, the query results will be flattened -- see "flattenResults" in the <a * href="https://cloud.google.com/bigquery/docs/reference/v2/jobs">Jobs documentation</a> for * more information. To disable flattening, use {@link Read#withoutResultFlattening}. * * <p>By default, the query will use BigQuery's legacy SQL dialect. To use the BigQuery Standard * SQL dialect, use {@link Read#usingStandardSql}. */ public Read fromQuery(String query) { return new Read(this.inner.fromQuery(query)); }
/** Read from table specified by a {@link TableReference}. */ public Read from(TableReference table) { return new Read(this.inner.from(table)); }
/** * Enables BigQuery's Standard SQL dialect when reading from a query. * * <p>Only valid when a query is used ({@link #fromQuery}). Setting this option when reading * from a table will cause an error during validation. */ public Read usingStandardSql() { return new Read(this.inner.usingStandardSql()); }
/** * Disable <a href="https://cloud.google.com/bigquery/docs/reference/v2/jobs">flattening of * query results</a>. * * <p>Only valid when a query is used ({@link #fromQuery}). Setting this option when reading * from a table will cause an error during validation. */ public Read withoutResultFlattening() { return new Read(this.inner.withoutResultFlattening()); }
/** * Reads a BigQuery table specified as {@code "[project_id]:[dataset_id].[table_id]"} or {@code * "[dataset_id].[table_id]"} for tables within the current project. */ public Read from(String tableSpec) { return new Read(this.inner.from(tableSpec)); }
/** * Use new template-compatible source implementation. * * <p>Use new template-compatible source implementation. This implementation is compatible with * repeated template invocations. It does not support dynamic work rebalancing. */ @Experimental(Experimental.Kind.SOURCE_SINK) public Read withTemplateCompatibility() { return new Read(this.inner.withTemplateCompatibility()); } }