Skip to content

Commit

Permalink
platform checks: unique source name
Browse files Browse the repository at this point in the history
  • Loading branch information
nrainer-materialize committed Oct 25, 2024
1 parent d6b2910 commit b236223
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions misc/python/materialize/checks/all_checks/upsert.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ def initialize(self) -> Testdrive:
$ kafka-ingest format=avro key-format=avro topic=upsert-legacy-syntax key-schema=${keyschema} schema=${schema} repeat=10000
{"key1": "A${kafka-ingest.iteration}"} {"f1": "A${kafka-ingest.iteration}"}
> CREATE SOURCE upsert_insert
> CREATE SOURCE upsert_insert_legacy
FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-upsert-legacy-syntax-${testdrive.seed}')
FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn
ENVELOPE UPSERT
> CREATE MATERIALIZED VIEW upsert_insert_view AS SELECT COUNT(DISTINCT key1 || ' ' || f1) FROM upsert_insert;
> CREATE MATERIALIZED VIEW upsert_insert_legacy_view AS SELECT COUNT(DISTINCT key1 || ' ' || f1) FROM upsert_insert_legacy;
"""
)
)
Expand All @@ -227,10 +227,10 @@ def validate(self) -> Testdrive:
return Testdrive(
dedent(
"""
> SELECT COUNT(*), COUNT(DISTINCT key1), COUNT(DISTINCT f1) FROM upsert_insert
> SELECT COUNT(*), COUNT(DISTINCT key1), COUNT(DISTINCT f1) FROM upsert_insert_legacy
10000 10000 10000
> SELECT * FROM upsert_insert_view;
> SELECT * FROM upsert_insert_legacy_view;
10000
"""
)
Expand Down

0 comments on commit b236223

Please sign in to comment.