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.

The below features are currently in beta. If you have feedback or feature requests, please let us know.

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 in the builder, select the Query a Database action for the relevant database app

Select the Execute SQL Query 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

  • Once you've successfully connected your account, you can explore the database schema to understand the tables and columns in your database

Write and execute your query

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

Supported Databases

The SQL editor, schema explorer, and support for prepared statements are currently supported for these datbase apps:

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