Skip to content

Commit 7946573

Browse files
authored
[bq] 0.2 upgrade dependencies & refactor writers
1 parent ce115bb commit 7946573

File tree

12 files changed

+566
-328
lines changed

12 files changed

+566
-328
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Please carefully follow the same [code style as Spring Framework](https://github
114114

115115
```java
116116
/*
117-
* Copyright 2002-2021 the original author or authors.
117+
* Copyright 2002-2022 the original author or authors.
118118
*
119119
* Licensed under the Apache License, Version 2.0 (the "License");
120120
* you may not use this file except in compliance with the License.

spring-batch-bigquery/README.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
Spring Batch extension which contains an `ItemWriter` implementation for https://cloud.google.com/bigquery[BigQuery] based on https://github.com/googleapis/java-bigquery[Java BigQuery]. It supports writing https://en.wikipedia.org/wiki/Comma-separated_values[CSV], https://en.wikipedia.org/wiki/JSON[JSON] using https://cloud.google.com/bigquery/docs/batch-loading-data[load jobs].
44

5-
## Configuration of `BigQueryItemWriter`
5+
## Configuration of `BigQueryCsvItemWriter`
66

7-
Next to the https://docs.spring.io/spring-batch/reference/html/configureJob.html[configuration of Spring Batch] one needs to configure the `BigQueryItemWriter`.
7+
Next to the https://docs.spring.io/spring-batch/reference/html/configureJob.html[configuration of Spring Batch] one needs to configure the `BigQueryCsvItemWriter`.
88

9-
```java
9+
```javaBigQueryCsv
1010
@Bean
11-
BigQueryItemWriter<MyDto> bigQueryCsvWriter() {
11+
BigQueryCsvItemWriter<MyDto> bigQueryCsvWriter() {
1212
WriteChannelConfiguration writeConfiguration = WriteChannelConfiguration
1313
.newBuilder(TableId.of("csv_dataset", "csv_table"))
1414
.setAutodetect(true)
1515
.setFormatOptions(FormatOptions.csv())
1616
.build();
1717

18-
BigQueryItemWriter<MyDto> writer = new BigQueryItemWriterBuilder<MyDto>()
18+
BigQueryCsvItemWriter<MyDto> writer = new BigQueryCsvItemWriterBuilder<MyDto>()
1919
.bigQuery(mockedBigQuery)
2020
.writeChannelConfig(writeConfiguration)
2121
.build();
2222
}
2323
```
2424

25-
Additional examples could be found in https://github.com/spring-projects/spring-batch-extensions/blob/main/spring-batch-bigquery/src/test/java/org/springframework/batch/extensions/bigquery/builder/BigQueryItemWriterBuilderTests.java[here].
25+
Additional examples could be found in https://github.com/spring-projects/spring-batch-extensions/blob/main/spring-batch-bigquery/src/test/java/org/springframework/batch/extensions/bigquery/writer/builder/[here].
2626

2727
## Configuration properties
2828
[cols="1,1,4"]

spring-batch-bigquery/pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
~ Copyright 2002-2021 the original author or authors.
3+
~ Copyright 2002-2022 the original author or authors.
44
~
55
~ Licensed under the Apache License, Version 2.0 (the "License");
66
~ you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
2727
<developers>
2828
<developer>
2929
<id>Dgray16</id>
30-
<name>Vova Perebykivskyi</name>
30+
<name>Volodymyr Perebykivskyi</name>
3131
<email>[email protected]</email>
3232
</developer>
3333
</developers>
@@ -50,25 +50,25 @@
5050
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5151

5252
<!-- Dependent on Spring Batch core -->
53-
<java.version>8</java.version>
53+
<java.version>17</java.version>
5454
</properties>
5555

5656
<dependencies>
5757
<dependency>
5858
<groupId>org.springframework.batch</groupId>
5959
<artifactId>spring-batch-core</artifactId>
60-
<version>4.3.3</version>
60+
<version>5.0.0</version>
6161
</dependency>
6262

6363
<dependency>
6464
<groupId>com.google.cloud</groupId>
6565
<artifactId>google-cloud-bigquery</artifactId>
66-
<version>1.133.0</version>
66+
<version>2.19.1</version>
6767
</dependency>
6868
<dependency>
6969
<groupId>com.fasterxml.jackson.dataformat</groupId>
7070
<artifactId>jackson-dataformat-csv</artifactId>
71-
<version>2.12.3</version>
71+
<version>2.14.1</version>
7272
</dependency>
7373

7474
<dependency>
@@ -87,13 +87,13 @@
8787
<dependency>
8888
<groupId>org.junit.jupiter</groupId>
8989
<artifactId>junit-jupiter-api</artifactId>
90-
<version>5.7.2</version>
90+
<version>5.9.1</version>
9191
<scope>test</scope>
9292
</dependency>
9393
<dependency>
9494
<groupId>org.mockito</groupId>
9595
<artifactId>mockito-core</artifactId>
96-
<version>3.11.1</version>
96+
<version>4.9.0</version>
9797
<scope>test</scope>
9898
</dependency>
9999

@@ -105,7 +105,7 @@
105105
<plugin>
106106
<groupId>org.apache.maven.plugins</groupId>
107107
<artifactId>maven-compiler-plugin</artifactId>
108-
<version>3.8.1</version>
108+
<version>3.10.1</version>
109109
<configuration>
110110
<source>${java.version}</source>
111111
<target>${java.version}</target>
@@ -123,7 +123,7 @@
123123
<plugin>
124124
<groupId>org.apache.maven.plugins</groupId>
125125
<artifactId>maven-javadoc-plugin</artifactId>
126-
<version>3.2.0</version>
126+
<version>3.4.1</version>
127127
<executions>
128128
<execution>
129129
<id>attach-javadocs</id>

spring-batch-bigquery/src/main/java/org/springframework/batch/extensions/bigquery/package-info.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)