Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@benstopford
Created August 16, 2017 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benstopford/c981c3459239b0805f56849d3af6168f to your computer and use it in GitHub Desktop.
Save benstopford/c981c3459239b0805f56849d3af6168f to your computer and use it in GitHub Desktop.
//Build a stream from the orders topic
KStream ordersStream = builder.stream(..., “orders-topic”);
//Build a table from the products topic, stored in a local state store called “product-store”
GlobalKTable productsTable = builder.globalTable(...,“product-topic”,“product-store”);
//Join the orders and products to do the enrichment
KStream enrichedOrders = ordersStream.leftJoin(productsTable, (id, order) -> order.productId,...);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment