Skip to content

Commit

Permalink
Fixed the example of external data source creation for ClickHouse (#8989
Browse files Browse the repository at this point in the history
)

Co-authored-by: Ivan Blinkov <ivan@ydb.tech>
  • Loading branch information
zinal and blinkov authored Sep 12, 2024
1 parent 058fb5d commit 1f76d9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions ydb/docs/en/core/concepts/datamodel/external_data_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ CREATE EXTERNAL DATA SOURCE test_data_source WITH (
AUTH_METHOD="BASIC",
USE_TLS="TRUE",
LOGIN="login",
PASSWORD_SECRET_NAME="test_password_name"
)
PASSWORD_SECRET_NAME="test_password_name",
PROTOCOL="NATIVE"
);
```

After creating an external data source, you can read data from the created `EXTERNAL DATA SOURCE` object. The example below illustrates reading data from the `test_table` table in the `default` database in the ClickHouse cluster:

```yql
SELECT * FROM test_data_source.test_table
SELECT * FROM test_data_source.test_table;
```

External data sources allow execution of [federated queries](../federated_query/index.md) for cross-system data analytics tasks.
Expand Down
7 changes: 4 additions & 3 deletions ydb/docs/ru/core/concepts/datamodel/external_data_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ CREATE EXTERNAL DATA SOURCE test_data_source WITH (
AUTH_METHOD="BASIC",
USE_TLS="TRUE",
LOGIN="login",
PASSWORD_SECRET_NAME="test_password_name"
)
PASSWORD_SECRET_NAME="test_password_name",
PROTOCOL="NATIVE"
);
```

После создания внешнего источника данных можно выполнять чтение данных из созданного объекта `EXTERNAL DATA SOURCE`. Пример ниже иллюстрирует чтение данных из таблицы `test_table` из базы данных `default` в кластере ClickHouse:

```yql
SELECT * FROM test_data_source.test_table
SELECT * FROM test_data_source.test_table;
```

С помощью внешних источников данных можно выполнять [федеративные запросы](../federated_query/index.md) для задач межсистемной аналитики данных.
Expand Down

0 comments on commit 1f76d9d

Please sign in to comment.