Running a SQL query in Direct Access

Learn how you can run a SQL query in the Direct Access interface of Cloudera Data Visualization.

  1. On the main navigation bar, click SQL.

    Alternatively, you can click DATA > > >_ Direct Access.

  2. Select the database in the left-side panel.
  3. Add your SQL data query to the Enter SQL below code-enabled text box.

    The Autocomplete option is on by default. It validates the syntax of the SQL query you enter.

    If you want to limit the number of, you have two options:

    1. You can add a limit clause in the SQL query syntax.
    2. You can mark the Add in a "LIMIT 100" clause to any SQL select query that does not have a limit clause option. This limitation is on by default. If you set a record limit in the SQL query, it will override this default option, even if it is checked.
  4. Click RUN to initiate the SQL query.

    After the query runs, the results tabe shows the query results.

    In this example, the following query has been run: select * from main.us_counties limit 5

    For more information about the content available on the other tabs, see Cloudera Data Visualization, SQL interface.