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
|
|
|
|
2023-03-28 18:51:02 +00:00
|
|
|
#include <Storages/DataLakes/StorageIceberg.h>
|
|
|
|
#include <TableFunctions/ITableFunctionDataLake.h>
|
|
|
|
#include <TableFunctions/TableFunctionFactory.h>
|
|
|
|
#include <TableFunctions/TableFunctionS3.h>
|
|
|
|
#include "registerTableFunctions.h"
|
2023-01-18 08:33:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
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-03-28 18:51:02 +00:00
|
|
|
using TableFunctionIceberg = ITableFunctionDataLake<TableFunctionIcebergName, StorageIcebergS3, TableFunctionS3>;
|
2023-01-18 08:33:55 +00:00
|
|
|
|
|
|
|
void registerTableFunctionIceberg(TableFunctionFactory & factory)
|
|
|
|
{
|
|
|
|
factory.registerFunction<TableFunctionIceberg>(
|
|
|
|
{.documentation
|
2023-04-28 10:10:42 +00:00
|
|
|
= {.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"}},
|
2023-01-18 08:33:55 +00:00
|
|
|
.allow_readonly = false});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|