Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for ClickHouse
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to databases
    • Stop and start the cluster
    • SQL queries in the management console
    • Changing cluster and database settings
    • Connecting to DataLens
    • Connecting external dictionaries
    • Adding your own geobase
    • Enabling machine learning models
    • Changing ClickHouse versions
    • Managing ClickHouse hosts
    • Adding ZooKeeper hosts
    • Database management
    • Managing database users
    • Managing backups
    • How to manage shards
    • Deleting clusters
  • Solutions
    • Adding data to the database
    • Migrating ClickHouse data
    • Sharding tables
  • Concepts
    • Relationship between service resources
    • Host classes
    • Network in Yandex Managed Service for ClickHouse
    • Quotas and limits
    • Storage types
    • Backups
    • Replication
    • Dictionaries
    • Sharding
    • Supported clients
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1, 2019 to February 1, 2020
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • FormatSchemaService
      • MlModelService
      • ResourcePresetService
      • UserService
      • VersionsService
      • OperationService
    • REST
      • Overview
      • Backup
        • Overview
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • addShard
        • addZookeeper
        • backup
        • create
        • createExternalDictionary
        • createShardGroup
        • delete
        • deleteExternalDictionary
        • deleteHosts
        • deleteShard
        • deleteShardGroup
        • get
        • getShard
        • getShardGroup
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • listShardGroups
        • listShards
        • move
        • rescheduleMaintenance
        • restore
        • start
        • stop
        • streamLogs
        • update
        • updateShard
        • updateShardGroup
      • Database
        • Overview
        • create
        • delete
        • get
        • list
      • FormatSchema
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • MlModel
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Versions
        • Overview
        • list
      • Operation
        • Overview
        • get
  • Questions and answers
    • General questions
    • Questions about ClickHouse
    • All questions on the same page
  1. Step-by-step instructions
  2. SQL queries in the management console

SQL queries in the management console

  • Authentication
  • Data structure visualization
  • SQL queries
  • Query restrictions in the management console

Managed Service for ClickHouse allows you to visualize the data structure in your ClickHouse cluster and send SQL queries to databases from the Yandex.Cloud management console. To do this, log in to management console, open the cluster page and go to the SQL tab.

See a reference list of supported queries in the ClickHouse documentation.

Authentication

Every time you open the SQL tab, you must enter the username and password of the cluster user. This opens the cluster data structure and the SQL query input window.

To avoid entering the password too often, open this page of the management console in a new tab.

Data structure visualization

Once you have logged in, you can see the structure of the databases and tables in the cluster:

structure

Click on the table to see the first 1000 rows of the SELECT * query result for this table (Managed Service for ClickHouse doesn't support full navigation through all the DB data). Hover over the column header to see the type of column data:

table

In the Query result offset field, you can set the offset for showing the results table. A maximum of 20 rows can be displayed on a single page. Use the < and > buttons to quickly increase and decrease the offset by 20.

SQL queries

The query input window is open on the right. Start typing your query to see suggested keyword options:

suggest

Enter your query and click Execute. The results table or error message is shown in the results panel under the buttons.

result

Query restrictions in the management console

The main query restriction in the management console is that the text of queries and their results are available only until you close or reload the page in your browser. But if a query was run successfully, Managed Service for ClickHouse processes it regardless of the state of the management console.

In addition, keep in mind the following:

  • The management console will only display the first 1000 rows of results, even if there is actually more data.
  • When a cluster query takes more than 10 minutes to complete, the management console will report an error as a result, even if the query was eventually processed successfully.
  • If your cluster has multiple ClickHouse hosts, queries from the management console are sent to a random one. Keep this in mind if you are going to modify data. For example, the CREATE TABLE db1.newtable query creates a table on one host only. To avoid this, use a distributed query, putting your cluster name inside the curly brackets: CREATE TABLE db1.newtable ON CLUSTER '{cluster}'.
In this article:
  • Authentication
  • Data structure visualization
  • SQL queries
  • Query restrictions in the management console
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC