OmniSciDB  94e8789169
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CsvShared.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 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 <map>
20 #include <vector>
21 
22 #include "Catalog/Catalog.h"
23 #include "Catalog/ForeignTable.h"
24 #include "DataMgr/Chunk/Chunk.h"
25 #include "ForeignDataWrapper.h"
26 #include "ImportExport/Importer.h"
27 
28 namespace foreign_storage {
29 namespace Csv {
30 
31 // Construct data wrapper for foreign_table parameters
32 std::unique_ptr<ForeignDataWrapper> get_csv_data_wrapper(
33  int db_id,
34  const ForeignTable* foreign_table);
35 
36 // Validate CSV Specific options
37 void validate_options(const ForeignTable* foreign_table);
38 
39 import_export::CopyParams validate_and_get_copy_params(const ForeignTable* foreign_table);
40 
41 void validate_file_path(const ForeignTable* foreign_table);
42 
43 // Return true if this used s3 select to access underlying CSV
44 bool validate_and_get_is_s3_select(const ForeignTable* foreign_table);
45 
46 } // namespace Csv
47 } // namespace foreign_storage
import_export::CopyParams validate_and_get_copy_params(const ForeignTable *foreign_table)
Definition: CsvShared.cpp:101
void validate_options(const ForeignTable *foreign_table)
Definition: CsvShared.cpp:86
This file contains the class specification and related data structures for Catalog.
std::unique_ptr< ForeignDataWrapper > get_csv_data_wrapper(int db_id, const ForeignTable *foreign_table)
Definition: CsvShared.cpp:158
void validate_file_path(const ForeignTable *foreign_table)
Definition: CsvShared.cpp:92
bool validate_and_get_is_s3_select(const ForeignTable *foreign_table)
Definition: CsvShared.cpp:59