Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions examples/quickstart/configuration_form/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

This example demonstrates how to define a connector setup form using `ConfigurationForm`, `form_field`, and `Test` from the Fivetran Connector SDK. It covers plain text, password, dropdown, and toggle fields, including dropdown options with labels and descriptions. It also shows how to register a connection test that Fivetran runs when the user clicks **Test Connection** during setup.

The API fields (`api_base_url`, `api_key`) in the configuration form illustrate how a real connector would collect connection details. The `configuration.json` file provided contains sample values for running the connector locally.
The API fields (`api_base_url`, `api_key`) in the configuration form illustrate how a real connector would collect connection details.

> Note: This project includes an empty `configuration.json` because it is required during deployment. You can optionally populate it and then deploy with the pre-populated file so the values appear pre-filled in the [setup form](https://fivetran.com/docs/connector-sdk/technical-reference/connector-sdk-setup-form).

Refer to `def configuration_form()` and `def connection_test()` in `connector.py` for the main setup form and test implementation.

Expand Down Expand Up @@ -32,7 +34,7 @@ Refer to the [Connector SDK Setup Guide](https://fivetran.com/docs/connector-sdk

For available CLI commands, refer to the [Connector SDK Commands](https://fivetran.com/docs/connector-sdk/connector-development-and-configuration/connector-sdk-commands) reference.

1. Run the `fivetran configuration` command to interactively provide values for each form field. This generates (or overrides) a `configuration.json` file in the project directory.
1. Run the `fivetran configuration` command to interactively provide values for each form field. This overrides the `configuration.json` file in the project directory.

```bash
fivetran configuration
Expand All @@ -50,6 +52,11 @@ For available CLI commands, refer to the [Connector SDK Commands](https://fivetr
fivetran debug --configuration configuration.json
```

> Note: You can deploy this connector using one of these options:
> - An empty `configuration.json` file. Configuration values are then provided through the Fivetran UI setup form after deployment.
> - A pre-populated `configuration.json` file (created either by running `fivetran configuration` or manually editing the file). The setup form displays the values already filled in.


## Features

- Demonstrates form field types: `TextField` (plain text and password variants), `DropdownField`, and `ToggleField`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-satvikpatil Can we update readme for this?
Currently it says this :
The API fields (api_base_url, api_key) in the configuration form illustrate how a real connector would collect connection details. The configuration.json file provided contains sample values for running the connector locally.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Populate the required setup fields

When users run this example from a fresh checkout with the newly provided configuration.json, the file is {} even though this connector's setup form marks api_base_url and api_key as required and update() builds the request URL from configuration.get("api_base_url", ""). The documented local debug path using configuration.json therefore sends "/posts" as the URL and fails before syncing; please include usable sample/placeholder values for the required form fields, or don't ship an empty config for this configured example.

Useful? React with 👍 / 👎.

Loading