Getting started overview
Redash is an open-source platform designed for data exploration, visualization, and dashboard creation. This guide outlines the initial steps to get Redash operational, focusing on deployment, connecting a data source, and executing a foundational query. Redash facilitates connecting to various data sources, writing SQL queries, and sharing insights through interactive dashboards. The process typically begins with setting up a Redash instance, either through self-hosting the open-source version or utilizing a cloud offering, followed by configuring access to your desired databases.
Quick Reference: Redash Getting Started Steps
This table provides a concise overview of the essential steps for initiating Redash usage:
| Step | What to Do | Where |
|---|---|---|
| 1. Deploy Redash | Choose self-hosted or cloud-based deployment. | Redash Open Source Setup Guide / Redash Cloud signup page |
| 2. Initial Setup | Create an admin user account. | Redash web interface (first login) |
| 3. Connect Data Source | Add credentials for your database (e.g., PostgreSQL, MySQL). | Redash web interface: Settings > Data Sources > New Data Source |
| 4. Create New Query | Write and execute your first SQL query. | Redash web interface: Create > New Query |
| 5. Visualize Results | Select a visualization type (e.g., table, chart) for your query results. | Redash web interface: Query editor, Add Visualization button |
Create an account and get keys
Redash offers two primary deployment models: self-hosted open-source and Redash Cloud. The method for creating an account and obtaining access credentials varies based on your chosen model.
Self-Hosted Open-Source Deployment
For the self-hosted version, you are responsible for deploying the Redash application on your own infrastructure. This typically involves using Docker or a similar containerization method. The official Redash documentation provides detailed instructions for setting up an open-source instance, including environment configuration and initial database setup. Upon successful deployment, the first user to access the Redash web interface will be prompted to create an administrator account. This account serves as the primary access point for managing data sources, users, and queries within your Redash instance. No API keys are generated at this stage; API access is configured post-deployment via user settings.
- Deployment Steps: Refer to the Redash Open Source Setup Guide for detailed instructions on installation, which includes options for Docker-based deployment.
- Admin Account Creation: After deployment, navigate to your Redash instance URL in a web browser. The first visit will present a form to create the initial administrator user.
Redash Cloud Hosting
If you opt for Redash Cloud, the deployment and infrastructure management are handled by Redash. The process for creating an account typically involves signing up directly on the Redash website. This usually entails providing an email address, setting a password, and potentially selecting a subscription plan. Upon successful signup, you gain immediate access to a hosted Redash instance. For programmatic access to your Redash Cloud instance, such as automating query execution or dashboard updates, you will generate API keys directly within the Redash web interface. These keys authenticate your applications or scripts when interacting with the Redash API.
- Signup: Visit the Redash homepage and look for options related to Redash Cloud or hosted services.
- API Key Generation: Once logged into your Redash Cloud instance, navigate to your user settings or profile. Look for a section related to 'API Keys' or 'Personal Access Tokens' to generate credentials for programmatic access. The Redash API documentation provides further details on API key usage.
Your first request
After successfully deploying Redash and creating an administrator account, the next step is to connect a data source and execute your first query. This example uses a hypothetical PostgreSQL database, but the principles apply to other supported data sources like MySQL, Google BigQuery, or Redshift.
1. Connect a Data Source
Before querying, Redash needs to know where your data resides. You'll add a new data source configuration:
- Log in to your Redash instance.
- Navigate to
Settings(usually via the gear icon in the top right). - Click on
Data Sourcesin the left-hand menu. - Click the
New Data Sourcebutton. - Select your data source type (e.g.,
PostgreSQL). - Fill in the connection details. For a PostgreSQL database, this typically includes:
- Name: A descriptive name for your data source (e.g.,
Production Database). - Host: The hostname or IP address of your PostgreSQL server.
- Port: The port for your PostgreSQL server (default is
5432). - User: The username with access to the database.
- Password: The password for the specified user.
- Database Name: The name of the specific database you want to connect to.
- Click
Createand thenTest Connectionto verify the credentials.
Ensure that your Redash instance has network access to the database server and that any necessary firewall rules are configured. For example, if your database is hosted on a cloud provider like AWS, you might need to adjust AWS Security Group rules to allow incoming connections from your Redash server's IP address.
2. Write and Execute Your First Query
With a data source connected, you can now write your first SQL query:
- From the Redash homepage, click
Create > New Query. - In the query editor, select your newly added data source from the dropdown menu.
- Enter a simple SQL query. For instance, if you have a table named
userswith columnsid,name, andemail:
SELECT id, name, email
FROM users
LIMIT 10;
- Click the
Executebutton (often a play icon). - The results will appear in the 'Table' tab below the query editor.
- Optionally, name your query by clicking on the default query name (e.g.,
New Query) and typing a new title. ClickSave.
3. Visualize Your Results
Redash allows you to quickly visualize query results:
- After executing your query, click the
Add Visualizationbutton below the query results. - Choose a visualization type (e.g.,
Table,Chart,Counter). For the example query, a simpleTableis suitable. - Configure the visualization properties as needed (e.g., for a chart, select X and Y axes).
- Click
Saveto add the visualization to your query.
Common next steps
After successfully running your first query and creating a visualization, consider these common next steps to leverage Redash's full capabilities:
- Create Dashboards: Combine multiple queries and their visualizations into interactive dashboards. Dashboards provide a consolidated view of key metrics and allow for collaborative data exploration. You can add widgets from existing queries to a new dashboard via the
Add Widgetbutton on a dashboard page. - Share and Collaborate: Share queries and dashboards with teammates. Redash supports user management and permissions, allowing you to control who can view or edit specific data assets.
- Schedule Queries: Configure queries to run automatically at specified intervals. This keeps your dashboards updated with the latest data without manual intervention. Navigate to a saved query and click the
Schedulebutton to set refresh frequency. - Use Query Parameters: Make your queries dynamic by adding parameters. This allows users to filter results directly from the dashboard without modifying the underlying SQL. Parameters are defined within the query using double curly braces (e.g.,
WHERE country = '{{ country_param }}'). - Explore More Data Sources: Connect to additional databases or services. Redash supports a wide array of data sources, enabling a unified view across different data silos.
- Advanced Visualizations: Experiment with different chart types and customization options to represent your data effectively. Redash offers various chart types, including bar charts, line charts, pie charts, and more.
- API Integration: Utilize the Redash API for programmatic interaction. This allows for embedding dashboards, automating query execution, or integrating Redash data into other applications. The Redash API documentation provides endpoints for queries, dashboards, and data sources.
Troubleshooting the first call
Encountering issues during your initial Redash setup or query execution is common. Here are some troubleshooting steps for typical problems:
- Connection Test Failure:
- Incorrect Credentials: Double-check the hostname, port, username, and password for your data source. Even minor typos can prevent a successful connection.
- Network Accessibility: Ensure that your Redash instance can reach the data source's host. This might involve checking firewall rules, security groups (e.g., on AWS EC2 or Google Cloud Platform), or VPN configurations. Confirm the database port is open and accessible from the Redash server.
- Database User Permissions: Verify that the database user specified in Redash has the necessary permissions to connect and query the intended database.
- SSL/TLS Issues: If your database requires SSL/TLS, ensure that Redash is configured to use it, and any required certificates are correctly installed.
- Query Execution Errors:
- SQL Syntax Errors: Review your SQL query for any syntax mistakes. Databases are strict about syntax; even a missing comma or incorrect keyword can cause an error. Use a SQL linter or test the query directly in a database client.
- Table/Column Not Found: Confirm that the table and column names in your query exactly match those in your database, including case sensitivity if applicable (some databases are case-sensitive by default).
- Permissions for Query: The database user connected to Redash might have sufficient permissions to connect but not to query specific tables or schemas. Verify the user's read permissions on the relevant database objects.
- Data Source Selected: Ensure you have selected the correct data source in the Redash query editor dropdown before executing the query.
- Redash Instance Issues (Self-Hosted):
- Container Status: If using Docker, check that all Redash containers are running correctly (
docker-compose psordocker ps). Restarting containers can often resolve transient issues. - Logs: Examine the Redash server logs for detailed error messages. These logs can pinpoint issues with database connections, query processing, or application errors. For Docker, use
docker-compose logsordocker logs <container_name>. - Resource Constraints: Ensure your server has sufficient memory and CPU resources to run Redash and its associated services.
- Container Status: If using Docker, check that all Redash containers are running correctly (
- Blank Visualization or No Data:
- Query Returns No Rows: The query might be valid but returns no data. Adjust your
WHEREclauses or remove filters to see if data appears. - Visualization Configuration: For charts, ensure that the correct columns are mapped to the X-axis, Y-axis, and other relevant chart properties. Incorrect mapping can lead to an empty chart.
- Query Returns No Rows: The query might be valid but returns no data. Adjust your