ClickHouse/docs/zh/getting-started/playground.md

72 lines
3.5 KiB
Markdown
Raw Normal View History

2020-04-03 13:23:32 +00:00
---
toc_priority: 14
2020-12-01 14:23:12 +00:00
toc_title: 体验平台
2020-04-03 13:23:32 +00:00
---
# ClickHouse体验平台 {#clickhouse-playground}
2020-04-03 13:23:32 +00:00
2021-09-22 00:22:57 +00:00
[ClickHouse体验平台](https://play.clickhouse.com?file=welcome) 允许人们通过即时运行查询来尝试ClickHouse而无需设置他们的服务器或集群。
2020-12-01 14:23:12 +00:00
体验平台中提供几个示例数据集以及显示ClickHouse特性的示例查询。还有一些ClickHouse LTS版本可供尝试。
ClickHouse体验平台提供了小型集群[Managed Service for ClickHouse](https://cloud.yandex.com/services/managed-clickhouse)实例配置(4 vCPU, 32 GB RAM)它们托管在[Yandex.Cloud](https://cloud.yandex.com/). 更多信息查询[cloud providers](../commercial/cloud.md).
您可以使用任何HTTP客户端对ClickHouse体验平台进行查询例如[curl](https://curl.haxx.se)或者[wget](https://www.gnu.org/software/wget/),或使用[JDBC](../interfaces/jdbc.md)或者[ODBC](../interfaces/odbc.md)驱动连接。关于支持ClickHouse的软件产品的更多信息详见[here](../interfaces/index.md).
## Credentials {#credentials}
| 参数 | 值 |
|:--------------------|:----------------------------------------|
2021-09-22 00:22:57 +00:00
| HTTPS端点 | `https://play-api.clickhouse.com:8443` |
| TCP端点 | `play-api.clickhouse.com:9440` |
2020-12-01 14:23:12 +00:00
| 用户 | `playground` |
| 密码 | `clickhouse` |
还有一些带有特定ClickHouse版本的附加信息来试验它们之间的差异(端口和用户/密码与上面相同):
2021-09-22 00:22:57 +00:00
- 20.3 LTS: `play-api-v20-3.clickhouse.com`
- 19.14 LTS: `play-api-v19-14.clickhouse.com`
2020-12-01 14:23:12 +00:00
!!! note "注意"
所有这些端点都需要安全的TLS连接。
## 查询限制 {#limitations}
2020-04-03 13:23:32 +00:00
查询以只读用户身份执行。 这意味着一些局限性:
2020-04-03 13:23:32 +00:00
- 不允许DDL查询
- 不允许插入查询
2020-04-03 13:23:32 +00:00
还强制执行以下设置:
2020-12-02 08:26:57 +00:00
- [max_result_bytes=10485760](../operations/settings/query-complexity/#max-result-bytes)
- [max_result_rows=2000](../operations/settings/query-complexity/#setting-max_result_rows)
- [result_overflow_mode=break](../operations/settings/query-complexity/#result-overflow-mode)
- [max_execution_time=60000](../operations/settings/query-complexity/#max-execution-time)
2020-04-03 13:23:32 +00:00
ClickHouse体验还有如下
[ClickHouse管理服务](https://cloud.yandex.com/services/managed-clickhouse)
实例托管 [Yandex云](https://cloud.yandex.com/)。
更多信息 [云提供商](../commercial/cloud.md)。
2020-04-03 13:23:32 +00:00
2020-12-01 14:23:12 +00:00
## 示例 {#examples}
2020-04-03 13:23:32 +00:00
2020-12-01 14:23:12 +00:00
使用`curl`连接Https服务
2020-04-03 13:23:32 +00:00
2020-12-01 14:23:12 +00:00
``` bash
2021-09-22 00:22:57 +00:00
curl "https://play-api.clickhouse.com:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets"
2020-12-01 14:23:12 +00:00
```
2020-04-03 13:23:32 +00:00
2020-12-01 14:23:12 +00:00
TCP连接示例[CLI](../interfaces/cli.md):
2020-04-03 13:23:32 +00:00
``` bash
2021-09-22 00:22:57 +00:00
clickhouse client --secure -h play-api.clickhouse.com --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'"
2020-04-03 13:23:32 +00:00
```
2020-12-01 14:23:12 +00:00
## Implementation Details {#implementation-details}
ClickHouse体验平台界面实际上是通过ClickHouse [HTTP API](../interfaces/http.md)接口实现的。
ClickHouse体验平台是一个ClickHouse集群没有任何附加的服务器端应用程序。如上所述ClickHouse的HTTPS和TCP/TLS端点也可以作为体验平台的一部分公开使用, 代理通过[Cloudflare Spectrum](https://www.cloudflare.com/products/cloudflare-spectrum/)增加一层额外的保护和改善连接。
!!! warning "注意"
**强烈不推荐**在任何其他情况下将ClickHouse服务器暴露给公共互联网。确保它只在私有网络上侦听并由正确配置的防火墙监控。