ClickHouse/src/TableFunctions/TableFunctionHudi.cpp

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

32 lines
909 B
C++
Raw Normal View History

2022-11-09 08:01:05 +00:00
#include "config.h"
#if USE_AWS_S3
# include <Storages/StorageHudi.h>
2023-01-29 08:28:48 +00:00
# include <TableFunctions/ITableFunctionDataLake.h>
2022-11-09 08:01:05 +00:00
# include <TableFunctions/TableFunctionFactory.h>
2023-02-16 12:48:22 +00:00
# include <TableFunctions/TableFunctionS3.h>
2022-11-09 08:01:05 +00:00
# include "registerTableFunctions.h"
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-02-16 13:42:19 +00:00
using TableFunctionHudi = ITableFunctionDataLake<TableFunctionHudiName, StorageHudi, 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
= {R"(The table function can be used to read the Hudi table stored on object store.)",
Documentation::Examples{{"hudi", "SELECT * FROM hudi(url, access_key_id, secret_access_key)"}},
Documentation::Categories{"DataLake"}},
.allow_readonly = false});
2022-11-09 08:01:05 +00:00
}
}
#endif