---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/concepts/query_execution/federated_query.md
  - https://ydb.tech/docs/ru/concepts/query_execution/federated_query.md
sourcePath: en/core/concepts/query_execution/federated_query/index.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Federated Queries

Federated queries allow retrieving information from various data sources without needing to transfer the data from these sources into YDB storage. Currently, federated queries support interaction with ClickHouse, PostgreSQL, and S3-compatible data stores. Using YQL queries, you can access these databases without the need to duplicate data between systems.

To work with data stored in external DBMSs, it is sufficient to create an [external data source](https://ydb.tech/docs/en/concepts/datamodel/external_data_source.md). To work with unstructured data stored in S3 buckets, you additionally need to create an [external table](https://ydb.tech/docs/en/concepts/datamodel/external_table.md). In both cases, it is necessary to create [secrets](https://ydb.tech/docs/en/concepts/datamodel/secrets.md) objects first that store confidential data required for authentication in external systems.

You can learn about the internals of the federated query processing system in the [architecture](https://ydb.tech/docs/en/concepts/query_execution/federated_query/architecture.md) section. Detailed information on working with various data sources is provided in the corresponding sections:

- [ClickHouse](https://ydb.tech/docs/en/concepts/query_execution/federated_query/clickhouse.md)
- [Greenplum](https://ydb.tech/docs/en/concepts/query_execution/federated_query/greenplum.md)
- [Microsoft SQL Server](https://ydb.tech/docs/en/concepts/query_execution/federated_query/ms_sql_server.md#query)
- [MySQL](https://ydb.tech/docs/en/concepts/query_execution/federated_query/mysql.md)
- [PostgreSQL](https://ydb.tech/docs/en/concepts/query_execution/federated_query/postgresql.md)
- [S3](https://ydb.tech/docs/en/concepts/query_execution/federated_query/s3/external_table.md)
- [YDB](https://ydb.tech/docs/en/concepts/query_execution/federated_query/ydb.md)
