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

JdbcIO.Write.withResults work without statement

Details

    • Improvement
    • Status: Triage Needed
    • P2
    • Resolution: Fixed
    • None
    • 2.32.0
    • io-java-jdbc
    • None

    Description

      JdbcIO.Write can work without statement and preparedStatementSetter in all case except using "Write.withResults". e.g.

            PCollection<Row> dataCollection = pipeline.apply(Create.of(data));
            PCollection<Void> rowsWritten =
                dataCollection.apply(
                    JdbcIO.<Row>write()
                        .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
                        .withBatchSize(10L)
                        .withTable(firstTableName)
                        .withResults());
            .dataCollection .
                .apply(Wait.on(rowsWritten))
                .apply(
                    JdbcIO.<Row>write()
                        .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
                        .withBatchSize(10L)
                        .withTable(secondTableName));
      
            .run();
      

      Need to add ability to use "Write.withResults" without statement and preparedStatementSetter.

      Attachments

        Issue Links

          Activity

            People

              raphael.sanamyan Sanamyan Raphael
              raphael.sanamyan Sanamyan Raphael
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 3h 20m
                  3h 20m