diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java index eeea9e8a4745..1be672cb9615 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java @@ -57,7 +57,7 @@ public class JdbcReadSchemaTransformProvider @Override public String description() { - return baseDescription("JDBC") + return "Read from a JDBC source using a SQL query or by directly accessing a single table.\n" + "\n" + "This transform can be used to read from a JDBC source using either a given JDBC driver jar " + "and class name, or by using one of the default packaged drivers given a `jdbc_type`.\n" @@ -111,16 +111,11 @@ public String description() { + "All properties should be semi-colon-delimited (e.g. \"key1=value1;key2=value2;\")\n"; } - protected String baseDescription(String jdbcType) { - return String.format( - "Read from a %s source using a SQL query or by directly accessing " + "a single table.\n", - jdbcType); - } - protected String inheritedDescription( String prettyName, String transformName, String databaseSchema, int defaultJdbcPort) { return String.format( - "\n" + "Read from a %s source using a SQL query or by directly accessing a single table.\n" + + "\n" + "This is a special case of ReadFromJdbc that includes the " + "necessary %s Driver and classes.\n" + "\n" @@ -145,6 +140,7 @@ protected String inheritedDescription( + "transform. If that is the case, see ReadFromJdbc which " + "allows for more custom configuration.", prettyName, + prettyName, transformName, transformName, databaseSchema, diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcWriteSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcWriteSchemaTransformProvider.java index 8e8692f07ae5..a61fa74b4ce5 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcWriteSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcWriteSchemaTransformProvider.java @@ -62,7 +62,7 @@ public class JdbcWriteSchemaTransformProvider @Override public String description() { - return baseDescription("JDBC") + return "Write to a JDBC sink using a SQL query or by directly accessing a single table.\n" + "\n" + "This transform can be used to write to a JDBC sink using either a given JDBC driver jar " + "and class name, or by using one of the default packaged drivers given a `jdbc_type`.\n" @@ -116,16 +116,11 @@ public String description() { + "All properties should be semi-colon-delimited (e.g. \"key1=value1;key2=value2;\")\n"; } - protected String baseDescription(String jdbcType) { - return String.format( - "Write to a %s sink using a SQL query or by directly accessing " + "a single table.\n", - jdbcType); - } - protected String inheritedDescription( String prettyName, String transformName, String prefix, int port) { return String.format( - "\n" + "Write to a %s sink using a SQL query or by directly accessing a single table.\n" + + "\n" + "This is a special case of WriteToJdbc that includes the " + "necessary %s Driver and classes.\n" + "\n" @@ -149,7 +144,15 @@ protected String inheritedDescription( + "It might be necessary to use a custom JDBC driver that is not packaged with this " + "transform. If that is the case, see WriteToJdbc which " + "allows for more custom configuration.", - prettyName, transformName, transformName, prefix, port, transformName, prefix, port); + prettyName, + prettyName, + transformName, + transformName, + prefix, + port, + transformName, + prefix, + port); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromMySqlSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromMySqlSchemaTransformProvider.java index 19c588f5049b..3d0135ef8ecd 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromMySqlSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromMySqlSchemaTransformProvider.java @@ -36,7 +36,7 @@ public class ReadFromMySqlSchemaTransformProvider extends JdbcReadSchemaTransfor @Override public String description() { - return baseDescription("MySQL") + inheritedDescription("MySQL", "ReadFromMySql", "mysql", 3306); + return inheritedDescription("MySQL", "ReadFromMySql", "mysql", 3306); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromOracleSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromOracleSchemaTransformProvider.java index a3e99aede3e8..de18d5aa8189 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromOracleSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromOracleSchemaTransformProvider.java @@ -36,8 +36,7 @@ public class ReadFromOracleSchemaTransformProvider extends JdbcReadSchemaTransfo @Override public String description() { - return baseDescription("Oracle") - + inheritedDescription("Oracle", "ReadFromOracle", "oracle", 1521); + return inheritedDescription("Oracle", "ReadFromOracle", "oracle", 1521); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromPostgresSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromPostgresSchemaTransformProvider.java index 82aa50e6e5fc..62ff14c23e0a 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromPostgresSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromPostgresSchemaTransformProvider.java @@ -36,8 +36,7 @@ public class ReadFromPostgresSchemaTransformProvider extends JdbcReadSchemaTrans @Override public String description() { - return baseDescription("PostgreSQL") - + inheritedDescription("Postgres", "ReadFromPostgres", "postgresql", 5432); + return inheritedDescription("Postgres", "ReadFromPostgres", "postgresql", 5432); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromSqlServerSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromSqlServerSchemaTransformProvider.java index bc9e95fc7881..e4767177bb2f 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromSqlServerSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromSqlServerSchemaTransformProvider.java @@ -36,8 +36,7 @@ public class ReadFromSqlServerSchemaTransformProvider extends JdbcReadSchemaTran @Override public String description() { - return baseDescription("Sql Server (Microsoft SQL)") - + inheritedDescription("SQL Server", "ReadFromSqlServer", "sqlserver", 1433); + return inheritedDescription("SQL Server", "ReadFromSqlServer", "sqlserver", 1433); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToMySqlSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToMySqlSchemaTransformProvider.java index 3ed71e8164d1..57f085220162 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToMySqlSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToMySqlSchemaTransformProvider.java @@ -36,7 +36,7 @@ public class WriteToMySqlSchemaTransformProvider extends JdbcWriteSchemaTransfor @Override public String description() { - return baseDescription("MySQL") + inheritedDescription("MySQL", "WriteToMySql", "mysql", 3306); + return inheritedDescription("MySQL", "WriteToMySql", "mysql", 3306); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToOracleSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToOracleSchemaTransformProvider.java index fc39110bc102..5b3ae2c35e9d 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToOracleSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToOracleSchemaTransformProvider.java @@ -36,8 +36,7 @@ public class WriteToOracleSchemaTransformProvider extends JdbcWriteSchemaTransfo @Override public String description() { - return baseDescription("Oracle") - + inheritedDescription("Oracle", "WriteToOracle", "oracle", 1521); + return inheritedDescription("Oracle", "WriteToOracle", "oracle", 1521); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToPostgresSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToPostgresSchemaTransformProvider.java index e15d2794490a..c50b84311630 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToPostgresSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToPostgresSchemaTransformProvider.java @@ -36,8 +36,7 @@ public class WriteToPostgresSchemaTransformProvider extends JdbcWriteSchemaTrans @Override public String description() { - return baseDescription("PostgreSQL") - + inheritedDescription("Postgres", "WriteToPostgres", "postgresql", 5432); + return inheritedDescription("Postgres", "WriteToPostgres", "postgresql", 5432); } @Override diff --git a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToSqlServerSchemaTransformProvider.java b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToSqlServerSchemaTransformProvider.java index 4c9566cdf58b..9e849f4e49e2 100644 --- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToSqlServerSchemaTransformProvider.java +++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/WriteToSqlServerSchemaTransformProvider.java @@ -36,8 +36,7 @@ public class WriteToSqlServerSchemaTransformProvider extends JdbcWriteSchemaTran @Override public String description() { - return baseDescription("Sql Server (Microsoft SQL)") - + inheritedDescription("SQL Server", "WriteToSqlServer", "sqlserver", 1433); + return inheritedDescription("SQL Server", "WriteToSqlServer", "sqlserver", 1433); } @Override