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!
Database | Versions Supported |
---|---|
PostgreSQL (including AWS Aurora) | 10-15 |
Netsuite OracleNetsuite Oracle | N/A |
MySQL | 5,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.
Select type SQL
and fill in the fields to create your Stitch.
Field | Description |
---|---|
Pattern Name | The name of the Pattern to attach this Stitch to. Choose from a prepopulated dropdown list of all patterns. |
Stitch Name | The name of the Stitch. |
Type | Select SQL |
Connection | The connection to use when running this query. Choose from a prepopulated dropdown list of all connections. |
Query | The SQL to execute. |
Description | Give this a meaningful description so others know what it does. |
Parameters | Use 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.
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.