Repository navigation
docs(experimentation): group warehouse pages under Connect a Warehouse #8883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
771bbd9
docs(experimentation): document PostgreSQL warehouses
Zaimwa9 21d9624
Merge remote-tracking branch 'origin/main' into docs/postgres-warehouse
Zaimwa9 7550a40
fix(experimentation): require CREATE on the database for the PostgreS…
Zaimwa9 2e8dbd5
fix(experimentation): rename the setup SQL password placeholder to YO…
Zaimwa9 5b6923c
docs(experimentation): limit Send your first event to Flagsmith Cloud…
Zaimwa9 b89effd
docs(experimentation): add PostgreSQL warehouse screenshots
Zaimwa9 6bd0b3d
docs(experimentation): remove the connected warehouse card screenshot…
Zaimwa9 663b145
docs(experimentation): fold the Flagsmith database into Connect a War…
Zaimwa9 535d89e
docs(experimentation): trim the Flagsmith database snippet and duplic…
Zaimwa9 72676a4
docs(experimentation): group warehouse pages under Connect a Warehouse
Zaimwa9 ff1ae87
docs(experimentation): move the Flagsmith database how-to to the self…
Zaimwa9 6cc79f8
docs(experimentation): point the Helm guide to self-hosting for evalu…
Zaimwa9 193c6ca
Merge remote-tracking branch 'origin/docs/postgres-warehouse' into do…
Zaimwa9 7b89137
docs(experimentation): align the ClickHouse page with the Databricks …
Zaimwa9 7b28a2c
Merge remote-tracking branch 'origin/main' into docs/warehouse-pages
Zaimwa9 50fa4be
docs(experimentation): show how to enable the Flagsmith database with…
Zaimwa9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
docs/docs/experimentation/connect-a-warehouse/_category_.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "label": "Connect a Warehouse", | ||
| "position": 2 | ||
| } |
96 changes: 96 additions & 0 deletions
96
docs/docs/experimentation/connect-a-warehouse/clickhouse.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| --- | ||
| title: Connect ClickHouse | ||
| sidebar_label: ClickHouse | ||
| sidebar_position: 1 | ||
| slug: /experimentation/connect-clickhouse | ||
| description: Store and query experiment events in your own ClickHouse instance. | ||
| --- | ||
|
|
||
| import CodeBlock from '@theme/CodeBlock'; import eventsSql from '../../../../experimentation/clickhouse/events.sql?raw'; | ||
|
|
||
| :::info Beta | ||
|
|
||
| Experimentation is in beta. | ||
|
|
||
| ::: | ||
|
|
||
| Flagsmith writes experiment events to a table in your ClickHouse instance and computes experiment results by querying it | ||
| there. Each environment has one [warehouse connection](/experimentation/connect-a-warehouse). | ||
|
|
||
| ## Before you start | ||
|
|
||
| - On Flagsmith Cloud, a [Scale-Up or Enterprise subscription](https://www.flagsmith.com/pricing). | ||
| - An instance reachable from Flagsmith: on Flagsmith Cloud, over the internet; when self-hosting, from your Flagsmith | ||
| API and warehouse delivery. | ||
| - An administrative user with `CREATE USER`, `GRANT`, `CREATE DATABASE` and `CREATE TABLE` privileges, to run the setup | ||
| SQL. | ||
| - When self-hosting, the event ingestion service, Kafka and warehouse delivery. See | ||
| [Self-Hosting and Open Source](/experimentation/self-hosting). | ||
|
|
||
| ## 1. Create the events table and user | ||
|
|
||
| Run this once against your instance. Replace `<USER>` and `<YOUR_PASSWORD>` with your own values. The same SQL is | ||
| available to copy from the Flagsmith dashboard. | ||
|
|
||
| <CodeBlock language="sql">{eventsSql}</CodeBlock> | ||
|
|
||
| ```sql | ||
| -- Create a dedicated user for Flagsmith | ||
| CREATE USER IF NOT EXISTS <USER> | ||
| IDENTIFIED WITH sha256_password BY '<YOUR_PASSWORD>'; | ||
|
|
||
| -- Allow it to write and read experiment events | ||
| GRANT SELECT, INSERT ON flagsmith_exp.events TO <USER>; | ||
|
|
||
| -- Allow it to check the events table exists | ||
| GRANT SHOW TABLES, SHOW COLUMNS ON flagsmith_exp.* TO <USER>; | ||
| ``` | ||
|
|
||
| If you use a database other than `flagsmith_exp`, use the same name in the script and in Flagsmith. | ||
|
|
||
| Flagsmith doesn't create or alter the table, so keep exactly these columns and types. | ||
|
|
||
| ## 2. Connect in Flagsmith | ||
|
|
||
| 1. Go to **Environment Settings › Warehouse** and select **ClickHouse**. | ||
| 2. Fill in the connection details: | ||
| - **Host**: the hostname of your ClickHouse instance, without protocol or port. | ||
| - **Name this warehouse**: any name, e.g. `Production ClickHouse`. | ||
| - **HTTPS port**: the port of the ClickHouse HTTP(S) interface, `8443` by default. | ||
| - **Database Name**: `flagsmith_exp`, unless you changed it. | ||
| - **Username** and **Password**: the user you created in step 1. | ||
| - **Secure connection (TLS)**: always on; it can't be turned off. | ||
| 3. Click **Test connection**. Once it succeeds, click **Save and continue**. The test checks that Flagsmith can connect | ||
| and that the events table exists. If the test can't connect, you can save anyway and test again later, but events | ||
| won't be delivered until it succeeds. If Flagsmith rejects a field, such as the host, fix it before saving. | ||
| 4. On Flagsmith Cloud, to verify events reach your table, click **Send your first event** on the connection card; the | ||
| button disappears once the first event arrives. | ||
|
|
||
|  | ||
|
|
||
| ## Manage the connection | ||
|
|
||
| ### Change the password | ||
|
|
||
| Change the user's password on your server first. Then edit the connection, enter the new password, click **Test | ||
| connection**, then click **Save changes**. Leaving the password blank keeps the current one. | ||
|
|
||
| ### Change server | ||
|
|
||
| The host can't be changed. To use a different ClickHouse instance, disconnect and create a new connection. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| Errors show under a form field, below **Test connection**, or on the connection card with status **Errored** when event | ||
| delivery fails. | ||
|
|
||
| | Message | Where | What to do | | ||
| | ---------------------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | | ||
| | Port must be a number between 1 and 65535. | Form | Fix **HTTPS port**. | | ||
| | Host must not target internal or private network addresses. | Test, card | On Flagsmith Cloud, use a host with a public address. | | ||
| | Authentication failed. | Test, card | Check **Username** and **Password**. | | ||
| | Database does not exist. | Test, card | Check **Database Name**, and that it matches the database in the setup SQL. | | ||
| | Events table not found in the configured database. Run the setup SQL to create it. | Test, card | Run the script in [step 1](#1-create-the-events-table-and-user) with the same database as the connection. | | ||
| | Could not connect to the host. | Test, card | Check **Host** and **HTTPS port**, and that the instance accepts HTTPS connections from Flagsmith. | | ||
| | The ClickHouse server rejected the request. | Test, card | Check the instance's logs for the rejected query, and that the user has the grants in step 1. | | ||
| | Connection failed. | Test, card | [Contact support](/support/). | |
5 changes: 3 additions & 2 deletions
5
...ocs/experimentation/connect-databricks.md → ...ntation/connect-a-warehouse/databricks.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.