You can query directly against Treasure Data to quickly create Chartio reports and dashboards. Chartio provides easy-to-use cloud-based data visualization and exploration service. See the Chartio Documentation for more information.

Prerequisites

  • Chartio account

  • Basic knowledge of Treasure Data and its account

Set up Your Data Source

  1. Access the following URLs. Replace ORGANIZATION_NAME with your organization name on Chartio.
    https://chartio.com/ORGANIZATION_NAME/settings/datasources/new/presto/

  2. Choose Direct Connection tab. Edit the following information as shown:

  • Hostname: api-presto.treasuredata.com

  • Port: 443

  • Database Username: YOUR_MASTER_API_KEY

  • Catalog: td-presto

  • Schema Name: YOUR_DATABASE

  • Time Zone Support: Select one

  • Data Source Alias: Your data source alias

  1. Click Connect to create new data sources. It will take a minute or two.

  2. Go to the Schema tab and click Refresh Schema. Your tables are displayed.

  3. Click Apply.

  4. Access these tables from charts:

Create Your Chart

  1. Select your dashboard (create, if necessary.

  2. Click Add Element which is located at the right top of the dashboard screen.

  3. Select the Data Source created in the previous step.

  4. A list of tables and fields are shown on the left column. In this example, the sample dataset contains 5,000 Apache weblogs.

Create the report of distribution of HTTP response code to ensure the website doesn’t return any errors. First, drag Code field to Measures. Then, select aggregation as Count of all Www Access.Code, and choose descending as sort order.

Then, drag Code field to Dimensions. Click Run Query to fetch the results.

When you choose the diagram type, you can see the result as a pie chart, for example. Click Save to put this on the dashboard.

Design Your Dashboard

You can add as many charts you want on your dashboard, and arrange them using drag & drop. You can use advanced features such as ‘scheduled dashboard delivery with email’ and ‘exporting with PDF.’

  • No labels