use of com.google.cloud.spark.bigquery.v2.context.BigQueryDataSourceReaderModule in project spark-bigquery-connector by GoogleCloudDataproc.
the class BigQueryTableProvider method getTable.
@Override
public Table getTable(StructType schema, Transform[] partitioning, Map<String, String> properties) {
Injector injector = createInjector(schema, properties, new BigQueryDataSourceReaderModule());
BigQueryTable table = new BigQueryTable(injector.getInstance(BigQueryDataSourceReaderContext.class));
return table;
}
use of com.google.cloud.spark.bigquery.v2.context.BigQueryDataSourceReaderModule in project spark-bigquery-connector by GoogleCloudDataproc.
the class BigQueryDataSourceV2 method createReader.
@Override
public DataSourceReader createReader(StructType schema, DataSourceOptions options) {
Injector injector = createInjector(schema, options.asMap(), new BigQueryDataSourceReaderModule());
BigQueryDataSourceReader reader = new BigQueryDataSourceReader(injector.getInstance(BigQueryDataSourceReaderContext.class));
return reader;
}
Aggregations