Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-5619

Fix minor bug in JdbcIO example code

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 2.8.0
    • io-java-jdbc
    • None

    Description

      There's a minor bug in JdbcIO Javadoc:

      127  * <pre>{@code
      128  * pipeline
      129  *   .apply(...)
      130  *   .apply(JdbcIO.<KV<Integer, String>>write()
      131  *      .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(
      132  *            "com.mysql.jdbc.Driver", "jdbc:mysql://hostname:3306/mydb")
      133  *          .withUsername("username")
      134  *          .withPassword("password"))
      135  *      .withStatement("insert into Person values(?, ?)")
      136  *      .withPreparedStatementSetter(new JdbcIO.PreparedStatementSetter<KV<Integer, String>>() {
      137  *        public void setParameters(KV<Integer, String> element, PreparedStatement query)
      138  *          throws SQLException {
      139  *          query.setInt(1, kv.getKey());
      140  *          query.setString(2, kv.getValue());
      141  *        }
      142  *      })
      143  *    );
      144  * }</pre>
      

      kv at the line 139 and 140 should be element.

      Attachments

        Issue Links

          Activity

            People

              sekikn Kengo Seki
              sekikn Kengo Seki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m