Skip to content

Add 3 examples in playground SQL transform, schema transform and Composite Combine #34322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 8, 2025

Conversation

razvanculea
Copy link
Contributor

3 simple examples of applying multiple combiners on the input PCollection (Min,Max,Sum).

3 different ways of achieving this in Beam

  • SQL transform, using the powerful SQL syntax
  • Schema transformations, leveraging schemas and Group.byFilelds
  • Composed Combiners, same results without the need to use Rows or Schema transforms and with full control over the combiner logic

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

…osed Combine. All applying the same combiners (Min,Max,Sum) on the input.
Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damondouglas for label java.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@razvanculea
Copy link
Contributor Author

@damondouglas this blog post will explain how to apply multiple combiners to an input PColl in different ways with Beam and link to these 3 examples

Copy link
Contributor

Reminder, please take a look at this pr: @damondouglas

@razvanculea
Copy link
Contributor Author

assign to next reviewer

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @kennknowles for label java.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

// default_example: false
// context_line: 60
// categories:
// - SQL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just had a minor comment

@Abacn
Copy link
Contributor

Abacn commented Apr 8, 2025

Please add the new subproject to https://github.com/apache/beam/blob/master/build.gradle.kts#L254 to include the build in precommit test

@Abacn
Copy link
Contributor

Abacn commented Apr 8, 2025

The error message is:

* What went wrong:
Execution failed for task ':examples:java:sql:analyzeClassesDependencies'.
> Dependency analysis found issues.
  unusedDeclaredArtifacts
   - beam.sdks.java.extensions:google-cloud-platform-core:2.65.0-SNAPSHOT@jar
   - beam.sdks.java.extensions:ml:2.65.0-SNAPSHOT@jar
   - beam.sdks.java.extensions:python:2.65.0-SNAPSHOT@jar
   - beam.sdks.java.io:google-cloud-platform:2.65.0-SNAPSHOT@jar
   - beam.sdks.java:managed:2.65.0-SNAPSHOT@jar
   - com.fasterxml.jackson.core:jackson-annotations:2.15.4@jar
   - com.fasterxml.jackson.core:jackson-core:2.15.4@jar
   - com.fasterxml.jackson.core:jackson-databind:2.15.4@jar
   - com.google.api-client:google-api-client:2.0.0@jar
   - com.google.api.grpc:proto-google-cloud-bigtable-v2:2.56.0@jar
   - com.google.api.grpc:proto-google-cloud-datastore-v1:0.118.1@jar
   - com.google.api.grpc:proto-google-cloud-language-v1:2.61.0@jar
   - com.google.apis:google-api-services-bigquery:v2-rev20250313-2.0.0@jar
   - com.google.apis:google-api-services-pubsub:v1-rev20220904-2.0.0@jar
   - com.google.auth:google-auth-library-credentials:1.33.1@jar
   - com.google.auth:google-auth-library-oauth2-http:1.33.1@jar
   - com.google.cloud.bigdataoss:util:2.2.26@jar
   - com.google.cloud.datastore:datastore-v1-proto-client:2.27.1@jar
   - com.google.code.gson:gson:2.10.1@jar
   - com.google.http-client:google-http-client:1.46.3@jar
   - com.google.oauth-client:google-oauth-client:1.34.1@jar
   - com.google.protobuf:protobuf-java:4.29.4@jar
   - commons-io:commons-io:2.16.1@jar
   - joda-time:joda-time:2.10.14@jar
   - org.apache.beam:beam-vendor-grpc-1_69_0:0.1@jar
   - org.apache.beam:beam-vendor-guava-32_1_2-jre:0.1@jar
   - org.apache.commons:commons-csv:1.8@jar
   - org.apache.commons:commons-lang3:3.14.0@jar
   - org.apache.httpcomponents:httpclient:4.5.13@jar
   - org.apache.httpcomponents:httpcore:4.4.14@jar
   - org.apache.kafka:kafka-clients:2.4.1@jar

need to clean up build.gradle

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Abacn Abacn merged commit f35ac20 into apache:master Apr 8, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants