---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/integrations/visualization/finebi.md?version=v25.4
  - https://ydb.tech/docs/ru/integrations/visualization/finebi.md?version=v25.4
  - href: en/integrations/visualization/finebi.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/integrations/visualization/finebi.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# FineBI

FineBI is a powerful big data analytics tool. FineBI allows organizations to analyze and share data for informed decision-making. It helps transform raw data into insightful visualizations, track KPIs, identify trends, and predict future outcomes.

[PostgreSQL compatibility mode in YDB](https://ydb.tech/docs/en/postgresql/intro.md?version=v25.4) enables the use of [FineBI](https://intl.finebi.com/) to query and visualize data from YDB. In this case FineBI works with YDB just like with PostgreSQL.

{% note warning %}

At the moment, YDB's compatibility with PostgreSQL **is under development**, so not all PostgreSQL constructs and [functions](https://ydb.tech/docs/en/postgresql/functions.md?version=v25.4) are supported yet. PostgreSQL compatibility is available for testing in the form of a Docker container, which can be deployed by following these [instructions](https://ydb.tech/docs/en/postgresql/docker-connect.md?version=v25.4).

{% endnote %}

## Prerequisites

Before you begin, make sure that the following software is installed:

* [FineBI](https://intl.finebi.com/).
* PostgreSQL JDBC driver uploaded to FineBI.

    {% note info %}

    You can download the latest PostgreSQL JDBC driver from the [Download page](https://jdbc.postgresql.org/download/) of the PostgreSQL web site. For information on how to upload the PostgreSQL JDBC driver to FineBI, refer to the [FineBI documentation](https://help.fanruan.com/finebi-en/doc-view-1540.html).

    {% endnote %}


## Adding a database connection to YDB {#add-database-connection}

To connect to YDB from FineBI using the PostgreSQL wire protocol, follow these steps:

1. Log in to FineBI as the `admin` user.

1. Navigate to **System Management** > **Data Connection** > **Data Connection Management**.

1. Click the **New Data Connection** button.

1. In the **Search** field, type `postgresql` to find the PostgreSQL icon.

1. Click the PostgreSQL icon.

1. Enter the YDB credentials in the corresponding fields:

    * **Data Connection Name**. The YDB connection name in FineBI.

    * **Driver**. The driver that FineBI uses to connect to YDB.

        Select `Custom` and the installed JDBC driver `org.postgresql.Driver`.

    * **Database Name**. The path to the [database](https://ydb.tech/docs/en/concepts/glossary.md?version=v25.4#database) in the YDB cluster where queries will be executed.

        {% note alert %}

        Special characters in the path string must be [URL encoded](https://en.wikipedia.org/wiki/Percent-encoding). For example, ensure that you replace slash (`/`) characters with `%2F`.

        {% endnote %}

    * **Host**. The [endpoint](https://ydb.tech/docs/en/concepts/connect#endpoint) of the YDB cluster to which the connection will be made.

    * **Port**. The port of the YDB endpoint.

    * **Username**. The login for connecting to the YDB database.

    * **Password**. The password for connecting to the YDB database.

    ![](_assets/finebi/finebi-database-connection.png =600x)

1. Click **Test Connection**.

    If the connection details are correct, a message confirming a successful connection will appear.

1. To save the database connection, click **Save**.

    A new database connection will appear in the **Data Connection** list.

## Adding an SQL Dataset {#add-dataset}

To create a dataset for a YDB table, follow these steps:

1. In FineBI, open the **Public Data** tab.

1. Select a folder, to which you want to add a dataset.

    {% note warning %}

    You must have the [Public Data Management](https://help.fanruan.com/finebi-en/doc-view-5734.html) permission for the selected folder in FineBI.

    {% endnote %}

1. Click **Add Dataset** and select **SQL Dataset** from the drop-down list.

1. In the **Table Name** field, enter a name for the dataset.

1. In the **Data from Data Connection** drop-down list, select the YDB connection you created.

1. In the **SQL Statement** field, enter the SQL query to retrieve the necessary columns from a YDB table. For example, `SELECT * FROM <ydb_table_name>` for all columns.

    {% note tip %}

    To create a dataset for a table located in a subdirectory of a YDB database, specify the table path in the table name. For example:

    ```sql
    SELECT * FROM "<path/to/subdirectory/table_name>";
    ```

    {% endnote %}

1. To test the SQL query, click **Preview**. If the query is correct, the table data will appear in the preview pane.

    ![](_assets/finebi/finebi-sql-dataset.png)

1. To save the dataset, click **OK**.

After creating datasets, you can use data from YDB to create charts in FineBI. For more information, refer to the [FineBI](https://help.fanruan.com/finebi-en/) documentation.

## Creating a chart {#create-chart}

Let's create a sample chart using the dataset from the `episodes` table, as described in the [YQL tutorial](https://ydb.tech/docs/en/dev/yql-tutorial/index.md?version=v25.4). Among other things, this tutorial covers how to [create](https://ydb.tech/docs/en/dev/yql-tutorial/create_demo_tables.md?version=v25.4) this table and [populate it with data](https://ydb.tech/docs/en/dev/yql-tutorial/fill_tables_with_data.md?version=v25.4). It will be a pie chart that demonstrates how many episodes each season of a given series contains.

The table contains the following columns:

* `series_id`
* `season_id`
* `episode_id`
* `title`
* `air_date`

To create a chart, follow these steps:

1. In FineBI, open the **My Analysis** tab.

1. Click **New Subject**.

    The **Select Data** dialog box will appear.

1. In the **Select Data** dialog box, navigate to the dataset for the `episodes` table and click **OK**.

1. Click the **Component** tab at the bottom of the page.

1. In the **Chart Type** pane, click the **Pie Chart** icon.

1. In the list of columns in the `episodes` dataset, click the arrow next to the `episode_id` column and select **Convert to Dimension** from the drop-down list.

    ![](_assets/finebi/finebi-convert2dimension.png =350x)

1. Drag the `season_id` column to the **Color** field.

1. Drag the `title` column to the **Label** field.

1. Drag the `series_id` column to the **Filter** field.

    The **Add Filter to episodes.series_id** dialog box will appear.

1. In the **Add Filter to episodes.series_id** dialog box, select `Detailed Value` and click **Next Step**.

1. Specify the following condition:

    `series_id` `Equal To` `Fixed Value` `2`

1. Click **OK**.

    The diagram will display data only for the series that has the ID of `2`.

    ![](_assets/finebi/finebi-sample-chart.png)

1. Click **Save**.