ClickHouse/src/TableFunctions/TableFunctionIceberg.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
957 B
C++
Raw Normal View History

2023-01-18 08:33:55 +00:00
#include "config.h"
2023-02-18 17:14:25 +00:00
#if USE_AWS_S3 && USE_AVRO
2023-01-18 08:33:55 +00:00
# include <Storages/StorageIceberg.h>
2023-01-29 08:28:48 +00:00
# include <TableFunctions/ITableFunctionDataLake.h>
2023-01-18 08:33:55 +00:00
# include <TableFunctions/TableFunctionFactory.h>
2023-02-16 12:48:22 +00:00
# include <TableFunctions/TableFunctionS3.h>
2023-01-18 08:33:55 +00:00
# include "registerTableFunctions.h"
namespace DB
{
2023-01-29 08:28:48 +00:00
struct TableFunctionIcebergName
2023-01-18 08:33:55 +00:00
{
2023-01-29 08:28:48 +00:00
static constexpr auto name = "iceberg";
};
2023-01-18 08:33:55 +00:00
2023-02-16 13:42:19 +00:00
using TableFunctionIceberg = ITableFunctionDataLake<TableFunctionIcebergName, StorageIceberg, TableFunctionS3>;
2023-01-18 08:33:55 +00:00
void registerTableFunctionIceberg(TableFunctionFactory & factory)
{
factory.registerFunction<TableFunctionIceberg>(
{.documentation
= {R"(The table function can be used to read the Iceberg table stored on object store.)",
Documentation::Examples{{"iceberg", "SELECT * FROM iceberg(url, access_key_id, secret_access_key)"}},
Documentation::Categories{"DataLake"}},
.allow_readonly = false});
}
}
#endif