configure-cluster.html 491 B

123456789101112
  1. To direct queries to a specific cluster, [set the cluster at the role
  2. level](/sql/alter-role) using the following SQL statement:
  3. ```sql
  4. ALTER ROLE <your_user> SET CLUSTER = <custom_cluster>;
  5. ```
  6. Replace `<your_user>` with the name of your Materialize role and `<custom_cluster>` with the name of the cluster you want to use.
  7. Once set, all new sessions for that user will automatically run in the specified
  8. cluster, eliminating the need to manually specify it in each query or
  9. connection.