= spring-batch-bigquery Spring Batch extension which contains an `ItemWriter` and `ItemReader` implementations for https://cloud.google.com/bigquery[BigQuery]. `ItemWriter` supports next formats (https://cloud.google.com/bigquery/docs/batch-loading-data[load jobs]): * https://en.wikipedia.org/wiki/Comma-separated_values[CSV] * https://en.wikipedia.org/wiki/JSON[JSON] Based on https://github.com/googleapis/java-bigquery[Java BigQuery]. == Example of `BigQueryCsvItemWriter` [source,java] ---- @Bean BigQueryCsvItemWriter bigQueryCsvWriter() { WriteChannelConfiguration writeConfiguration = WriteChannelConfiguration .newBuilder(TableId.of("csv_dataset", "csv_table")) .setAutodetect(true) .setFormatOptions(FormatOptions.csv()) .build(); return new BigQueryCsvItemWriterBuilder() .bigQuery(bigQueryService) .writeChannelConfig(writeConfiguration) .build(); } ---- == Example of `BigQueryItemReader` [source,java] ---- @Bean BigQueryItemReader bigQueryReader() { return new BigQueryQueryItemReaderBuilder() .bigQuery(bigQueryService) .rowMapper(res -> new PersonDto(res.get("name").getStringValue())) .query("SELECT p.name FROM persons p") .build(); } ---- Additional examples could be found in the https://github.com/spring-projects/spring-batch-extensions/tree/main/spring-batch-bigquery/src/test/java/org/springframework/batch/extensions/bigquery[test folder].