diff options
| author | vitalyisaev <[email protected]> | 2023-11-14 09:58:56 +0300 |
|---|---|---|
| committer | vitalyisaev <[email protected]> | 2023-11-14 10:20:20 +0300 |
| commit | c2b2dfd9827a400a8495e172a56343462e3ceb82 (patch) | |
| tree | cd4e4f597d01bede4c82dffeb2d780d0a9046bd0 /contrib/clickhouse/src/TableFunctions/TableFunctionIceberg.cpp | |
| parent | d4ae8f119e67808cb0cf776ba6e0cf95296f2df7 (diff) | |
YQ Connector: move tests from yql to ydb (OSS)
Перенос папки с тестами на Коннектор из папки yql в папку ydb (синхронизируется с github).
Diffstat (limited to 'contrib/clickhouse/src/TableFunctions/TableFunctionIceberg.cpp')
| -rw-r--r-- | contrib/clickhouse/src/TableFunctions/TableFunctionIceberg.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/contrib/clickhouse/src/TableFunctions/TableFunctionIceberg.cpp b/contrib/clickhouse/src/TableFunctions/TableFunctionIceberg.cpp new file mode 100644 index 00000000000..eba19680c76 --- /dev/null +++ b/contrib/clickhouse/src/TableFunctions/TableFunctionIceberg.cpp @@ -0,0 +1,34 @@ +#include "clickhouse_config.h" + +#if USE_AWS_S3 && USE_AVRO + +#include <Storages/DataLakes/StorageIceberg.h> +#include <TableFunctions/ITableFunctionDataLake.h> +#include <TableFunctions/TableFunctionFactory.h> +#include <TableFunctions/TableFunctionS3.h> +#include "registerTableFunctions.h" + + +namespace DB +{ + +struct TableFunctionIcebergName +{ + static constexpr auto name = "iceberg"; +}; + +using TableFunctionIceberg = ITableFunctionDataLake<TableFunctionIcebergName, StorageIcebergS3, TableFunctionS3>; + +void registerTableFunctionIceberg(TableFunctionFactory & factory) +{ + factory.registerFunction<TableFunctionIceberg>( + {.documentation + = {.description=R"(The table function can be used to read the Iceberg table stored on object store.)", + .examples{{"iceberg", "SELECT * FROM iceberg(url, access_key_id, secret_access_key)", ""}}, + .categories{"DataLake"}}, + .allow_readonly = false}); +} + +} + +#endif |
