OmniSciDB
a5dc49c757
|
#include <ForeignDataWrapperFactory.h>
Static Public Member Functions | |
static std::unique_ptr < ForeignDataWrapper > | create (const std::string &data_wrapper_type, const int db_id, const ForeignTable *foreign_table) |
static std::unique_ptr < UserMapping > | createUserMappingProxyIfApplicable (const int db_id, const int user_id, const std::string &file_path, const import_export::CopyParams ©_params, const ForeignServer *server) |
static std::unique_ptr < ForeignServer > | createForeignServerProxy (const int db_id, const int user_id, const std::string &file_path, const import_export::CopyParams ©_params) |
static std::unique_ptr < ForeignTable > | createForeignTableProxy (const int db_id, const TableDescriptor *table, const std::string &file_path, const import_export::CopyParams ©_params, const ForeignServer *server) |
static std::unique_ptr < ForeignDataWrapper > | createForImport (const std::string &data_wrapper_type, const int db_id, const ForeignTable *foreign_table, const UserMapping *user_mapping) |
static std::unique_ptr < ForeignDataWrapper > | createForGeneralImport (const import_export::CopyParams ©_params, const int db_id, const ForeignTable *foreign_table, const UserMapping *user_mapping) |
static const ForeignDataWrapper * | createForValidation (const std::string &data_wrapper_type, const ForeignTable *foreign_table=nullptr) |
static void | validateDataWrapperType (const std::string &data_wrapper_type) |
Static Private Attributes | |
static std::map< std::string, std::unique_ptr < ForeignDataWrapper > > | validation_data_wrappers_ |
Definition at line 107 of file ForeignDataWrapperFactory.h.
|
static |
Creates an instance of a ForeignDataWrapper for the given data wrapper type using provided database and foreign table details.
Definition at line 343 of file ForeignDataWrapperFactory.cpp.
References foreign_storage::DataWrapperType::CSV, foreign_storage::DataWrapperType::INTERNAL_CATALOG, foreign_storage::DataWrapperType::INTERNAL_EXECUTOR_STATS, foreign_storage::DataWrapperType::INTERNAL_LOGS, foreign_storage::DataWrapperType::INTERNAL_MEMORY_STATS, foreign_storage::DataWrapperType::INTERNAL_ML_MODEL_METADATA, foreign_storage::DataWrapperType::INTERNAL_STORAGE_STATS, foreign_storage::DataWrapperType::PARQUET, foreign_storage::DataWrapperType::REGEX_PARSER, UNREACHABLE, and foreign_storage::CsvDataWrapper::validateAndGetIsS3Select().
|
static |
Definition at line 184 of file ForeignDataWrapperFactory.cpp.
References CHECK, foreign_storage::DataWrapperType::CSV, shared::is_s3_uri(), foreign_storage::is_valid_source_type(), import_export::kDelimitedFile, import_export::kOdbc, import_export::kParquetFile, import_export::kRegexParsedFile, foreign_storage::AbstractFileStorageDataWrapper::LOCAL_FILE_STORAGE_TYPE, foreign_storage::DataWrapperType::PARQUET, foreign_storage::DataWrapperType::REGEX_PARSER, import_export::CopyParams::source_type, foreign_storage::AbstractFileStorageDataWrapper::STORAGE_TYPE_KEY, and UNREACHABLE.
Referenced by foreign_storage::create_proxy_fsi_objects().
|
static |
Definition at line 237 of file ForeignDataWrapperFactory.cpp.
References import_export::CopyParams::array_begin, import_export::CopyParams::array_delim, foreign_storage::CsvFileBufferParser::ARRAY_DELIMITER_KEY, import_export::CopyParams::array_end, foreign_storage::CsvFileBufferParser::ARRAY_MARKER_KEY, foreign_storage::bool_to_option_value(), import_export::CopyParams::buffer_size, foreign_storage::TextFileBufferParser::BUFFER_SIZE_KEY, CHECK, import_export::CopyParams::delimiter, foreign_storage::CsvFileBufferParser::DELIMITER_KEY, import_export::CopyParams::escape, foreign_storage::CsvFileBufferParser::ESCAPE_KEY, import_export::CopyParams::file_sort_order_by, foreign_storage::AbstractFileStorageDataWrapper::FILE_SORT_ORDER_BY_KEY, import_export::CopyParams::file_sort_regex, foreign_storage::AbstractFileStorageDataWrapper::FILE_SORT_REGEX_KEY, import_export::CopyParams::geo_explode_collections, foreign_storage::CsvFileBufferParser::GEO_EXPLODE_COLLECTIONS_KEY, import_export::CopyParams::geo_validate_geometry, foreign_storage::ForeignTable::GEO_VALIDATE_GEOMETRY_KEY, Catalog_Namespace::SysCatalog::getCatalog(), import_export::CopyParams::has_header, Catalog_Namespace::SysCatalog::instance(), shared::is_s3_uri(), foreign_storage::is_valid_source_type(), import_export::kAutoDetect, import_export::kDelimitedFile, import_export::kOdbc, import_export::kParquetFile, import_export::kRegexParsedFile, import_export::CopyParams::line_delim, foreign_storage::CsvFileBufferParser::LINE_DELIMITER_KEY, import_export::CopyParams::line_regex, foreign_storage::RegexFileBufferParser::LINE_REGEX_KEY, import_export::CopyParams::line_start_regex, foreign_storage::RegexFileBufferParser::LINE_START_REGEX_KEY, import_export::CopyParams::lonlat, foreign_storage::CsvFileBufferParser::LONLAT_KEY, import_export::CopyParams::null_str, foreign_storage::CsvFileBufferParser::NULLS_KEY, import_export::num_import_threads(), foreign_storage::OptionsContainer::options, import_export::CopyParams::quote, foreign_storage::CsvFileBufferParser::QUOTE_KEY, import_export::CopyParams::quoted, foreign_storage::CsvFileBufferParser::QUOTED_KEY, import_export::CopyParams::regex_path_filter, foreign_storage::AbstractFileStorageDataWrapper::REGEX_PATH_FILTER_KEY, foreign_storage::anonymous_namespace{ForeignDataWrapperFactory.cpp}::set_header_option(), import_export::CopyParams::source_srid, foreign_storage::CsvFileBufferParser::SOURCE_SRID_KEY, import_export::CopyParams::source_type, import_export::CopyParams::threads, foreign_storage::AbstractFileStorageDataWrapper::THREADS_KEY, to_string(), import_export::CopyParams::trim_spaces, and foreign_storage::CsvFileBufferParser::TRIM_SPACES_KEY.
Referenced by foreign_storage::create_proxy_fsi_objects().
|
static |
Definition at line 135 of file ForeignDataWrapperFactory.cpp.
References CHECK, foreign_storage::DataWrapperType::CSV, anonymous_namespace{ForeignDataWrapperFactory.cpp}::get_data_wrapper_type(), anonymous_namespace{ForeignDataWrapperFactory.cpp}::is_valid_data_wrapper(), foreign_storage::DataWrapperType::PARQUET, and foreign_storage::DataWrapperType::REGEX_PARSER.
Referenced by import_export::ForeignDataImporter::importGeneral().
|
static |
Create for the import use-case.
Definition at line 160 of file ForeignDataWrapperFactory.cpp.
References CHECK, and foreign_storage::DataWrapperType::PARQUET.
|
static |
Creates an instance (or gets an existing instance) of an immutable ForeignDataWrapper to be used for validation purposes. Returned instance should not be used for any stateful operations, such as fetching foreign table data/metadata.
Definition at line 381 of file ForeignDataWrapperFactory.cpp.
References foreign_storage::DataWrapperType::CSV, foreign_storage::DataWrapperType::INTERNAL_CATALOG, foreign_storage::DataWrapperType::INTERNAL_EXECUTOR_STATS, foreign_storage::DataWrapperType::INTERNAL_LOGS, foreign_storage::DataWrapperType::INTERNAL_MEMORY_STATS, foreign_storage::DataWrapperType::INTERNAL_ML_MODEL_METADATA, foreign_storage::DataWrapperType::INTERNAL_STORAGE_STATS, foreign_storage::DataWrapperType::PARQUET, foreign_storage::DataWrapperType::REGEX_PARSER, UNREACHABLE, foreign_storage::CsvDataWrapper::validateAndGetIsS3Select(), and validation_data_wrappers_.
Referenced by foreign_storage::ForeignServer::validateStorageParameters().
|
static |
Definition at line 175 of file ForeignDataWrapperFactory.cpp.
Referenced by foreign_storage::create_proxy_fsi_objects().
|
static |
Checks that the given data wrapper type is valid.
Definition at line 426 of file ForeignDataWrapperFactory.cpp.
References shared::contains(), foreign_storage::DataWrapperType::INTERNAL_DATA_WRAPPERS, join(), foreign_storage::DataWrapperType::supported_data_wrapper_types, and run_benchmark_import::type.
Referenced by foreign_storage::ForeignServer::validate().
|
staticprivate |
Definition at line 168 of file ForeignDataWrapperFactory.h.
Referenced by createForValidation().