Try your first query

CelerData Cloud Serverless offers convenient ways for you to author queries using SQL.

You can use the SQL Editor provided by CelerData to run a query that would normally be run using SQL. You can also run a query via a MySQL client.

Prerequisites

Before you can run a query, make sure the warehouse with which you want to query data is in the Running state.

Run queries using SQL Editor

  1. In the CelerData Cloud Serverless console, click SQL Editor in the left-side navigation pane.

    SQL Editor

  2. In the upper-right corner of the editor, select the warehouse you want to use. If the warehouse is suspended, click Quick resume next to the warehouse to resume the warehouse.

  3. On the Data explorer tab, choose your desired catalog and database. This examples uses the default_catalog catalog and example_test database.

  4. Write your first query in the editor, drag your cursor to select the query, and click Run.

    NOTE

    For the SELECT statements that are run in the SQL Editor, a maximum of 1000 rows of results can be returned by default.

    Following is an example of a simple query.

    select * from test123;

Query result:

query result

After the query is complete, you can click View query profile in the lower-right corner to view the details of the SQL execution.

In the displayed page, you can view the profile details.

profile page

Run queries via MySQL client

  1. If you want to run a query via a MySQL client, make sure your client is properly connected to CelerData. See Connect via MySQL client for details.

  2. After the connection is ready, switch to the warehouse with which you want to query data. Example:

    SET WAREHOUSE default_warehouse;
  3. Switch to the target catalog. Example:

    SET CATALOG default_catalog;
  4. Switch to the target database. Example:

    USE example_test;
  5. Try your first query. Example:

    SELECT * FROM test123;

    You can run EXPLAIN ANALYZE <query_statement>; to obtain the query profile.

    EXPLAIN ANALYZE select * from test123;