ClickHouse/src/TableFunctions/TableFunctionURL.h

36 lines
880 B
C++
Raw Normal View History

2018-06-11 12:13:00 +00:00
#pragma once
#include <TableFunctions/ITableFunctionFileLike.h>
2021-10-26 09:31:01 +00:00
#include <Storages/ExternalDataSourceConfiguration.h>
2018-06-11 12:13:00 +00:00
namespace DB
{
class Context;
2018-06-11 12:13:00 +00:00
/* url(source, format, structure) - creates a temporary storage from url
*/
class TableFunctionURL : public ITableFunctionFileLike
{
public:
static constexpr auto name = "url";
std::string getName() const override
{
return name;
}
2021-09-08 19:28:22 +00:00
protected:
void parseArguments(const ASTPtr & ast_function, ContextPtr context) override;
2018-06-11 12:13:00 +00:00
private:
StoragePtr getStorage(
const String & source, const String & format_, const ColumnsDescription & columns, ContextPtr global_context,
const std::string & table_name, const String & compression_method_) const override;
const char * getStorageTypeName() const override { return "URL"; }
2021-10-26 09:31:01 +00:00
URLBasedDataSourceConfiguration configuration;
2018-06-11 12:13:00 +00:00
};
2018-06-11 12:13:00 +00:00
}