01-create-source.td 980 B

1234567891011121314151617181920212223242526
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr}
  10. ALTER SYSTEM SET storage_statistics_collection_interval = 1000
  11. ALTER SYSTEM SET storage_statistics_interval = 2000
  12. > DROP CLUSTER IF EXISTS test_cluster CASCADE;
  13. > CREATE CLUSTER test_cluster (SIZE '1');
  14. > CREATE SOURCE count IN CLUSTER test_cluster FROM LOAD GENERATOR COUNTER
  15. > SELECT
  16. u.rehydration_latency IS NOT NULL
  17. FROM mz_sources s
  18. JOIN mz_internal.mz_source_statistics u ON s.id = u.id
  19. WHERE s.name IN ('count')
  20. true
  21. > ALTER CLUSTER test_cluster SET (REPLICATION FACTOR = 0)