Skip to main content

SQL Stitch

SQL is the most common type of Stitch used with Sheetloom. It comprises of an SQL query and a predefined database connection. Each Stitch can only contain one SQL query, so you will need to create one Stitch per SQL query. Whilst Sheetloom is capable of running any query regardless of complexity, it cannot join between data sources.

Currently Supported Database Types

Sheetloom supports a variety of popular database types and versions, but we're always looking to expand. Need support for a database not on this list? Contact us!

DatabaseVersions Supported
PostgreSQL (including AWS Aurora)10-15
Netsuite OracleNetsuite OracleN/A
MySQL5,8

We are constantly adding new database types so be sure to check back to get the latest list.

Create an SQL Stitch

To create an SQL Stitch, click on Create Stitch from the Patterns page. The Create Stitch form will open.

Create SQL Stitch

Select type SQL and fill in the fields to create your Stitch.

FieldDescription
Pattern NameThe name of the Pattern to attach this Stitch to. Choose from a prepopulated dropdown list of all patterns.
Stitch NameThe name of the Stitch.
TypeSelect SQL
ConnectionThe connection to use when running this query. Choose from a prepopulated dropdown list of all connections.
QueryThe SQL to execute.
DescriptionGive this a meaningful description so others know what it does.
ParametersUse the plus/minus buttons to attach an existing parameter to this Stitch.

Edit Stitches

You can edit a Stitch by either clicking directly on it from the Stich page or by expanding the Pattern box it it belongs to and selecting it from there. The edit stitch panel will open. Make your changes and select Submit.

caution

Remember changing the name of an existing Stitch or Pattern will break any existing name mapping with it and the Excel template.

Adding Parameters to Queries

If you want to parameterise your SQL query to accept user input, use question marks ? as placeholders for each parameter. Sheetloom will tie the parameter name up to the field name in the query, so it is important that during parameter creation the name matches the field in the database exactly.

Examples

SELECT column FROM schema.table where column = ?
SELECT * FROM schema.table where column1 = ? and column2 = ?

Stitch Preview

Sheetloom allows you to preview the first ten rows of data a Stitch will return. Select your Stitch from either the Pattern or the Stitch view to open the Edit Stitch form. From there select Preview at the bottom.

Edit Stitch