2022-11-09 08:01:05 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#if USE_AWS_S3
|
|
|
|
|
2023-03-28 18:51:02 +00:00
|
|
|
#include <Storages/DataLakes/StorageHudi.h>
|
|
|
|
#include <TableFunctions/ITableFunctionDataLake.h>
|
|
|
|
#include <TableFunctions/TableFunctionFactory.h>
|
|
|
|
#include <TableFunctions/TableFunctionS3.h>
|
|
|
|
#include "registerTableFunctions.h"
|
2022-11-09 08:01:05 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2023-01-29 08:28:48 +00:00
|
|
|
struct TableFunctionHudiName
|
2022-11-09 08:01:05 +00:00
|
|
|
{
|
2023-01-29 08:28:48 +00:00
|
|
|
static constexpr auto name = "hudi";
|
|
|
|
};
|
2023-03-28 18:51:02 +00:00
|
|
|
using TableFunctionHudi = ITableFunctionDataLake<TableFunctionHudiName, StorageHudiS3, TableFunctionS3>;
|
2022-11-09 08:01:05 +00:00
|
|
|
|
|
|
|
void registerTableFunctionHudi(TableFunctionFactory & factory)
|
|
|
|
{
|
2022-11-11 02:42:18 +00:00
|
|
|
factory.registerFunction<TableFunctionHudi>(
|
|
|
|
{.documentation
|
2023-04-28 10:10:42 +00:00
|
|
|
= {.description=R"(The table function can be used to read the Hudi table stored on object store.)",
|
|
|
|
.examples{{"hudi", "SELECT * FROM hudi(url, access_key_id, secret_access_key)", ""}},
|
|
|
|
.categories{"DataLake"}},
|
2022-11-17 09:16:47 +00:00
|
|
|
.allow_readonly = false});
|
2022-11-09 08:01:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|