Databases
Working with SQL

Working with SQL

Pipedream makes it easy to interact with SQL databases within your workflows. You can securely connect to your database and use either pre-built no-code triggers and actions to interact with your database, or execute custom SQL queries.

SQL Editor

With the built-in SQL editor, you access linting and auto-complete features typical of modern SQL editors.

SQL editor

Schema Explorer

When querying a database, you need to understand the schema of the tables you're working with. The schema explorer provides a visual interface to explore the tables in your database, view their columns, and understand the relationships between them.

  • Once you connect your account with one of the supported database apps, we automatically fetch and display the details of the database schema below
  • You can view the columns of a table, their data types, and relationships between tables
  • You can also search and filter the set of tables that are listed in your schema based on table or column name

SQL Schema Explorer

Prepared Statements

Prepared statements let you safely execute SQL queries with dynamic inputs that are automatically defined as parameters, in order to help prevent SQL injection attacks.

To reference dynamic data in a SQL query, simply use the standard {{ }} notation just like any other code step in Pipedream. For example,

SELECT *
  FROM products
  WHERE type = {{steps.get_product_info.$return_value}}

Below your query input, you can toggle between the computed and prepared statements:

Getting Started

Select the Execute SQL Query action

  • From the step selector, select either Execute MySQL Query or Execute PostgreSQL Query

Select SQL action

Connect your account

  • If you already have a connected account, select it from the dropdown. Otherwise, click Connect Account to configure the database connection
  • Follow the prompts to connect your account, then click Test connection to ensure Pipedream can successfully connect to your database

Connect and test your account

Explore the schema

  • Connect your account and explore the database schema

Write and execute your query

  • Write your SQL query in the editor — read more about prepared statements above to leverage dynamic data in your query

Supported Databases

The first-class database support described above is currently supported for these apps:

Need to query a different database type? Let us know!