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 DATA.

    The DATA view appears, open on the Datasets tab.

  2. Open the Supplemental menu ( ellipsis icon) and click >_ Direct Access.
    The Direct Access interface appears, where you can select the database you want to access.
  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 execute the SQL query.

    After the query executes, the results area shows the query results.

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