OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ForeignDataImporter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2021 OmniSci, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include "AbstractImporter.h"
21 #include "CopyParams.h"
22 #include "ParserNode.h"
23 
24 namespace import_export {
25 
27  public:
28  ForeignDataImporter(const std::string& file_path,
29  const CopyParams& copy_params,
30  const TableDescriptor* table);
31 
32  /*
33  * Import data returning the status of the import.
34  */
35  ImportStatus import(const Catalog_Namespace::SessionInfo* session_info) override;
36 
37  protected:
38  std::unique_ptr<Fragmenter_Namespace::InsertDataLoader::DistributedConnector>
40 
41  private:
42  void finalize(const Catalog_Namespace::SessionInfo& parent_session_info,
43  ImportStatus& import_status,
44  const std::vector<std::pair<const ColumnDescriptor*, StringDictionary*>>&
45  string_dictionaries);
46 
47  std::string file_path_;
50 };
51 } // namespace import_export
Classes representing a parse tree.
ForeignDataImporter(const std::string &file_path, const CopyParams &copy_params, const TableDescriptor *table)
std::unique_ptr< Fragmenter_Namespace::InsertDataLoader::DistributedConnector > connector_
void finalize(const Catalog_Namespace::SessionInfo &parent_session_info, ImportStatus &import_status, const std::vector< std::pair< const ColumnDescriptor *, StringDictionary * >> &string_dictionaries)