2022-11-09 08:01:05 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2023-04-18 04:37:32 +00:00
|
|
|
#if USE_AWS_S3 && USE_PARQUET
|
2022-11-09 08:01:05 +00:00
|
|
|
|
2023-03-28 18:51:02 +00:00
|
|
|
#include <Storages/DataLakes/StorageDeltaLake.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 TableFunctionDeltaLakeName
|
2022-11-09 08:01:05 +00:00
|
|
|
{
|
2023-01-29 08:28:48 +00:00
|
|
|
static constexpr auto name = "deltaLake";
|
|
|
|
};
|
2022-11-09 08:01:05 +00:00
|
|
|
|
2023-03-28 18:51:02 +00:00
|
|
|
using TableFunctionDeltaLake = ITableFunctionDataLake<TableFunctionDeltaLakeName, StorageDeltaLakeS3, TableFunctionS3>;
|
2022-11-09 08:01:05 +00:00
|
|
|
|
2022-11-21 08:23:33 +00:00
|
|
|
void registerTableFunctionDeltaLake(TableFunctionFactory & factory)
|
2022-11-09 08:01:05 +00:00
|
|
|
{
|
2023-05-06 15:01:24 +00:00
|
|
|
factory.registerFunction<TableFunctionDeltaLake>(
|
|
|
|
{.documentation = {
|
|
|
|
.description=R"(The table function can be used to read the DeltaLake table stored on object store.)",
|
|
|
|
.examples{{"deltaLake", "SELECT * FROM deltaLake(url, access_key_id, secret_access_key)", ""}},
|
|
|
|
.categories{"DataLake"}},
|
|
|
|
.allow_readonly = false});
|
2022-11-09 08:01:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|