Skip to main content

SQL Database Writer

General

The SQL Database module allows you to write the results of your pipeline to a SQL Database.

Supported Databases

Data Composer is capable of querying from the following database providers, but not all have been thoroughly tested.

  • Microsoft SQL Server
  • MySQL
  • PostgreSQL
  • SQLite
  • Oracle - Oracle is supported. If running in Docker, you must use one of the oracle tagged images. If you are running in Windows, you need to install the Oracle Instant Client and SQLPlus binaries from Oracle.

For more information on configuring the connection, please see the Knex Documentation

Module Options

Database Name

Type: string
Required: False
Description: The name of the database to use.

Filename

Type: string
Required: False
Description: The file name to use when using the SQLite provider. This should be relative to the server.

Example:

C:\Users\Public\Documents\Test.db

Host

Type: string
Required: False
Description: The database server IP address or FQDN.

Password

Type: password
Required: False
Description: The password for the User account.

Port

Type: integer
Required: False
Default Value: 1433
Description: The TCP port used to establish a connection to the database.

Database Provider

Type: enum
Required: True
Default Value: Microsoft SQL Server
Options: Microsoft SQL Server, MySQL, PostgreSQL, SQLite, Oracle
Description: The database provider. Microsoft SQL Server has been the most thoroughly tested, but the others should work.

Query

Type: code
Required: True
Description: The query to execute on the database. The results of the pipeline will be set as parameters in the query.

For example, if the result of your pipeline is:

{
"Name": "Daniel",
"Email": "daniel@datacomposer.app"
}

Your query could be:

INSERT INTO Table(Name, Email) VALUES(:Name, :Email)

When the query is executed, ':Name' and ':Email' will be replaced with the values from the pipeline result.

Username

Type: string
Required: False
Description: The user account to authenticate with to access the database. The user will need at least Read permission on the database.

We strongly recommend using a dedicated user for Data Composer with as few permissions as needed.