From 79153d58ae7ffd072eb8ac378e44d961f0918130 Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Thu, 5 Oct 2023 17:56:21 +0200 Subject: [PATCH 1/4] draft --- _toc.yml | 4 +++ docs/products/clickhouse/reference.rst | 8 +++++ .../reference/s3-supported-file-formats.rst | 17 ++++++++++ .../clickhouse/reference/table-functions.rst | 31 +++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 docs/products/clickhouse/reference/s3-supported-file-formats.rst create mode 100644 docs/products/clickhouse/reference/table-functions.rst diff --git a/_toc.yml b/_toc.yml index 4810310070..68728347e2 100644 --- a/_toc.yml +++ b/_toc.yml @@ -815,6 +815,10 @@ entries: title: Supported table engines - file: docs/products/clickhouse/reference/metrics-list title: ClickHouse metrics in Grafana + - file: docs/products/clickhouse/reference/table-functions + title: Table functions + - file: docs/products/clickhouse/reference/s3-supported-file-formats + title: S3 file formats - file: docs/products/clickhouse/reference/supported-input-output-formats title: Formats for ClickHouse-Kafka data exchange - file: docs/products/clickhouse/reference/advanced-params diff --git a/docs/products/clickhouse/reference.rst b/docs/products/clickhouse/reference.rst index 198c2f88df..33d26733a7 100644 --- a/docs/products/clickhouse/reference.rst +++ b/docs/products/clickhouse/reference.rst @@ -20,3 +20,11 @@ Additional reference information for Aiven for ClickHouse®: .. grid-item-card:: :doc:`Advanced parameters ` :shadow: md :margin: 2 2 0 0 + + .. grid-item-card:: :doc:`File formats for the S3 table function in Aiven for ClickHouse® ` + :shadow: md + :margin: 2 2 0 0 + + .. grid-item-card:: :doc:`Table functions supported in Aiven for ClickHouse® ` + :shadow: md + :margin: 2 2 0 0 diff --git a/docs/products/clickhouse/reference/s3-supported-file-formats.rst b/docs/products/clickhouse/reference/s3-supported-file-formats.rst new file mode 100644 index 0000000000..f59a66118e --- /dev/null +++ b/docs/products/clickhouse/reference/s3-supported-file-formats.rst @@ -0,0 +1,17 @@ +File formats for the S3 table function in Aiven for ClickHouse® +=============================================================== + +The `S3 table function `_ allows you to select and insert data in S3-compatible storages. The S3 table function in Aiven for ClickHouse® can be used with the following file formats: + +* ``Arrow`` +* ``CSV`` +* ``JSON`` +* ``TSV`` +* ``Parquet`` +* ``ORC`` +* ``Avro`` + +.. seealso:: + + * :doc:`Table functions supported in Aiven for ClickHouse® ` + * :doc:`Read and pull data from S3 object storages and web resources over HTTP ` diff --git a/docs/products/clickhouse/reference/table-functions.rst b/docs/products/clickhouse/reference/table-functions.rst new file mode 100644 index 0000000000..e6b1f06650 --- /dev/null +++ b/docs/products/clickhouse/reference/table-functions.rst @@ -0,0 +1,31 @@ +Table functions supported in Aiven for ClickHouse® +================================================== + +Table functions return data of the table type and are used to construct tables. Aiven for ClickHouse® supports the following `table functions `_: + +* ``cluster`` +* ``clusterAllReplicas`` +* ``cosn`` +* ``deltaLake`` +* ``format`` +* ``generateRandom`` +* ``hudi`` +* ``iceberg`` +* ``input`` +* ``merge`` +* ``mysql`` +* ``null`` +* ``numbers`` +* ``numbers_mt`` +* ``postgresql`` +* ``remote`` +* ``remoteSecure`` +* ``s3`` +* ``s3Cluster`` +* ``url`` +* ``values`` +* ``view`` +* ``viewExplain`` +* ``viewIfPermitted`` +* ``zeros`` +* ``zeros_mt`` From e3d0069a47745ada390b7f9f021a9fae69bf1bbd Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Fri, 6 Oct 2023 12:57:34 +0200 Subject: [PATCH 2/4] Comments from Arthur and Joe --- _toc.yml | 2 +- .../clickhouse/reference/s3-supported-file-formats.rst | 2 +- ...table-functions.rst => supported-table-functions.rst} | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) rename docs/products/clickhouse/reference/{table-functions.rst => supported-table-functions.rst} (57%) diff --git a/_toc.yml b/_toc.yml index 68728347e2..47afc43008 100644 --- a/_toc.yml +++ b/_toc.yml @@ -815,7 +815,7 @@ entries: title: Supported table engines - file: docs/products/clickhouse/reference/metrics-list title: ClickHouse metrics in Grafana - - file: docs/products/clickhouse/reference/table-functions + - file: docs/products/clickhouse/reference/supported-table-functions title: Table functions - file: docs/products/clickhouse/reference/s3-supported-file-formats title: S3 file formats diff --git a/docs/products/clickhouse/reference/s3-supported-file-formats.rst b/docs/products/clickhouse/reference/s3-supported-file-formats.rst index f59a66118e..690580e244 100644 --- a/docs/products/clickhouse/reference/s3-supported-file-formats.rst +++ b/docs/products/clickhouse/reference/s3-supported-file-formats.rst @@ -13,5 +13,5 @@ The `S3 table function ` + * :doc:`Table functions supported in Aiven for ClickHouse® ` * :doc:`Read and pull data from S3 object storages and web resources over HTTP ` diff --git a/docs/products/clickhouse/reference/table-functions.rst b/docs/products/clickhouse/reference/supported-table-functions.rst similarity index 57% rename from docs/products/clickhouse/reference/table-functions.rst rename to docs/products/clickhouse/reference/supported-table-functions.rst index e6b1f06650..7b4b760038 100644 --- a/docs/products/clickhouse/reference/table-functions.rst +++ b/docs/products/clickhouse/reference/supported-table-functions.rst @@ -1,7 +1,14 @@ Table functions supported in Aiven for ClickHouse® ================================================== -Table functions return data of the table type and are used to construct tables. Aiven for ClickHouse® supports the following `table functions `_: +`Table functions `_ can be used to construct tables, for example, in a `FROM` clause of a query or in an `INSERT INTO TABLE FUNCTION` statement. + +.. code-block:: bash + + SELECT * + FROM deltaLake('s3://bucket/path/to/lake') + +Aiven for ClickHouse® supports the following table functions: * ``cluster`` * ``clusterAllReplicas`` From 117763d07804fc8cb866b3321179f306f0b46adb Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Fri, 6 Oct 2023 13:31:38 +0200 Subject: [PATCH 3/4] fix --- docs/products/clickhouse/reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/products/clickhouse/reference.rst b/docs/products/clickhouse/reference.rst index 33d26733a7..724adc8807 100644 --- a/docs/products/clickhouse/reference.rst +++ b/docs/products/clickhouse/reference.rst @@ -25,6 +25,6 @@ Additional reference information for Aiven for ClickHouse®: :shadow: md :margin: 2 2 0 0 - .. grid-item-card:: :doc:`Table functions supported in Aiven for ClickHouse® ` + .. grid-item-card:: :doc:`Table functions supported in Aiven for ClickHouse® ` :shadow: md :margin: 2 2 0 0 From 7421db08aa78d3018b333f8c731285b6018af40c Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Fri, 6 Oct 2023 13:56:32 +0200 Subject: [PATCH 4/4] fix --- _toc.yml | 2 +- .../clickhouse/reference/supported-table-functions.rst | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/_toc.yml b/_toc.yml index 47afc43008..7c16985543 100644 --- a/_toc.yml +++ b/_toc.yml @@ -812,7 +812,7 @@ entries: title: Reference entries: - file: docs/products/clickhouse/reference/supported-table-engines - title: Supported table engines + title: Table engines - file: docs/products/clickhouse/reference/metrics-list title: ClickHouse metrics in Grafana - file: docs/products/clickhouse/reference/supported-table-functions diff --git a/docs/products/clickhouse/reference/supported-table-functions.rst b/docs/products/clickhouse/reference/supported-table-functions.rst index 7b4b760038..befb1b2971 100644 --- a/docs/products/clickhouse/reference/supported-table-functions.rst +++ b/docs/products/clickhouse/reference/supported-table-functions.rst @@ -1,12 +1,14 @@ Table functions supported in Aiven for ClickHouse® ================================================== -`Table functions `_ can be used to construct tables, for example, in a `FROM` clause of a query or in an `INSERT INTO TABLE FUNCTION` statement. +`Table functions `_ can be used to construct tables, for example, in a FROM clause of a query or in an INSERT INTO TABLE FUNCTION statement. -.. code-block:: bash +.. topic:: Sample usage of the S3 table function - SELECT * - FROM deltaLake('s3://bucket/path/to/lake') + .. code-block:: bash + + SELECT * + FROM deltaLake('s3://bucket/path/to/lake') Aiven for ClickHouse® supports the following table functions: