Docs about Docs logo Docs about Docs

About this template

File location: /_templates/common/database-connection-settings.yml
Used in:
Repo link: Click to view in the Stitch Docs repo
Instructions:

This template is used to add the fields in the Stitch app users must complete to connect their database integration or destination. Data from this file is used by the _includes/shared/database-connection-settings.html include to generate the list of fields in the Define the connection details in Stitch step of a connection’s setup guide.

Here’s an example of a destination guide and a database integration guide.


Template sections

Each template is grouped into sections to make parameters easier to find. These sections and the parameters they contain are described below.

[connection-name]

This section contains a list of UI fields in the Stitch app for the database or destination. Each UI field is an item in the list.

The list is named after the name of the connection, not its type. Each variant of the connection should have its own list, which means that this section can contain multiple field lists.

For example: Aurora PostgreSQL is based on PostgreSQL, so it would have a type of postgres. Its name, however, is aurora-postgres, so the list for Aurora PostgreSQL will be named aurora-postgres:

## _data/ui/destination-settings/postgres.yml

aurora-postgres:
  - name: "{{ site.data.ui.common.database-connections.field-names.host }}"
    copy: "{{ site.data.ui.common.database-connections.field-copy.host-rds | flatify }}"

  - name: "{{ site.data.ui.common.database-connections.field-names.port }}"
    copy: "{{ site.data.ui.common.database-connections.field-copy.port | flatify }}"

  - name: "{{ site.data.ui.common.database-connections.field-names.username }}"
    copy: "{{ site.data.ui.common.database-connections.field-copy.username | flatify }}"

  - name: "{{ site.data.ui.common.database-connections.field-names.password }}"
    copy: "{{ site.data.ui.common.database-connections.field-copy.password | flatify }}"

  - name: "{{ site.data.ui.common.database-connections.field-names.database }}"
    copy: "{{ site.data.ui.destination-settings.common.field-copy.destination-database | flatify }}"

The _includes/shared/database-connection-settings.html include will loop through the list for the applicable connection and display the correct fields. Here’s an example.

Each item in the list can have the following parameters:

Parameter Description
name
STRING

The name of the field as it appears in the Stitch app.

Looking for common fields? Check these files:

  • _data/ui/common/database-connections.yml
  • _data/ui/destination-settings/common.yml

Example values:

  • Host
  • Password
copy
STRING

The description of the field and the info the user should enter into it. This description should include how the value should be formatted, if relevant.

For example: If this value is a URL and must contain https://, the description should include that information.

This is an example from _data/ui/common/database-connections.yml:

Enter the host address (endpoint) used by the {{ page.display_name }} instance. For example: This could be a network address such as `192.68.0.1`, or a server endpoint like `dbname.hosting-provider.com`.
Back to top
Back to top

Last updated: 30 July 2021