Skip to content
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

docs: cherry-pick: updated minor syntax updates in docs (DOCS-9451) #7963

Merged
merged 1 commit into from
Aug 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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