Skip to content

Commit

Permalink
feat: updated minor syntax updates in docs (#7949) (#7962)
Browse files Browse the repository at this point in the history
Co-authored-by: Tolga H. Dur <[email protected]>
  • Loading branch information
JimGalasyn and tolgadur authored Aug 9, 2021
1 parent ba91734 commit 0544986
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/developer-guide/joins/partition-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ CREATE STREAM clicks (
url STRING
) WITH (
kafka_topic='clickstream',
value_format='json'
value_format='json',
partitions=1
);

-- users table, with userId primary key.
Expand All @@ -64,8 +65,9 @@ CREATE TABLE users (
fullName STRING
) WITH (
kafka_topic='users',
value_format='json'
);
value_format='json',
partitions=1
);

-- join of users table with clicks stream, joining on the table's primary key and the stream's userId column:
-- join will automatically repartition clicks stream:
Expand All @@ -74,7 +76,8 @@ SELECT
c.url,
u.fullName
FROM clicks c
JOIN users u ON c.userId = u.id;
JOIN users u ON c.userId = u.id
EMIT CHANGES;
```

Co-partitioning Requirements
Expand Down Expand Up @@ -134,7 +137,8 @@ SELECT
clicks.url,
users.fullName
FROM clicks
JOIN users ON CAST(clicks.userId AS BIGINT) = users.id;
JOIN users ON CAST(clicks.userId AS BIGINT) = users.id
EMIT CHANGES;
```

Tables created on top of existing Kafka topics, for example those created with
Expand Down

0 comments on commit 0544986

Please sign in to comment.