GPUdb C++ API  Version 7.2.3.0
create_table_external.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __CREATE_TABLE_EXTERNAL_H__
7 #define __CREATE_TABLE_EXTERNAL_H__
8 
9 namespace gpudb
10 {
31  {
37  tableName(std::string()),
38  filepaths(std::vector<std::string>()),
39  modifyColumns(std::map<std::string, std::map<std::string, std::string> >()),
40  createTableOptions(std::map<std::string, std::string>()),
41  options(std::map<std::string, std::string>())
42  {
43  }
44 
1363  CreateTableExternalRequest(const std::string& tableName_, const std::vector<std::string>& filepaths_, const std::map<std::string, std::map<std::string, std::string> >& modifyColumns_, const std::map<std::string, std::string>& createTableOptions_, const std::map<std::string, std::string>& options_):
1364  tableName( tableName_ ),
1365  filepaths( filepaths_ ),
1366  modifyColumns( modifyColumns_ ),
1367  createTableOptions( createTableOptions_ ),
1368  options( options_ )
1369  {
1370  }
1371 
1380  std::string tableName;
1381 
1412  std::vector<std::string> filepaths;
1413 
1417  std::map<std::string, std::map<std::string, std::string> > modifyColumns;
1418 
1595  std::map<std::string, std::string> createTableOptions;
1596 
2277  std::map<std::string, std::string> options;
2278  };
2279 } // end namespace gpudb
2280 
2281 namespace avro
2282 {
2283  template<> struct codec_traits<gpudb::CreateTableExternalRequest>
2284  {
2285  static void encode(Encoder& e, const gpudb::CreateTableExternalRequest& v)
2286  {
2287  ::avro::encode(e, v.tableName);
2288  ::avro::encode(e, v.filepaths);
2289  ::avro::encode(e, v.modifyColumns);
2290  ::avro::encode(e, v.createTableOptions);
2291  ::avro::encode(e, v.options);
2292  }
2293 
2294  static void decode(Decoder& d, gpudb::CreateTableExternalRequest& v)
2295  {
2296  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2297  {
2298  const std::vector<size_t> fo = rd->fieldOrder();
2299 
2300  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2301  {
2302  switch (*it)
2303  {
2304  case 0:
2305  ::avro::decode(d, v.tableName);
2306  break;
2307 
2308  case 1:
2309  ::avro::decode(d, v.filepaths);
2310  break;
2311 
2312  case 2:
2313  ::avro::decode(d, v.modifyColumns);
2314  break;
2315 
2316  case 3:
2317  ::avro::decode(d, v.createTableOptions);
2318  break;
2319 
2320  case 4:
2321  ::avro::decode(d, v.options);
2322  break;
2323 
2324  default:
2325  break;
2326  }
2327  }
2328  }
2329  else
2330  {
2331  ::avro::decode(d, v.tableName);
2332  ::avro::decode(d, v.filepaths);
2333  ::avro::decode(d, v.modifyColumns);
2334  ::avro::decode(d, v.createTableOptions);
2335  ::avro::decode(d, v.options);
2336  }
2337  }
2338  };
2339 } // end namespace avro
2340 
2341 namespace gpudb
2342 {
2349  {
2355  tableName(std::string()),
2356  typeId(std::string()),
2357  typeDefinition(std::string()),
2358  typeLabel(std::string()),
2359  typeProperties(std::map<std::string, std::vector<std::string> >()),
2360  countInserted(int64_t()),
2361  countSkipped(int64_t()),
2362  countUpdated(int64_t()),
2363  info(std::map<std::string, std::string>()),
2364  files(std::vector<std::string>())
2365  {
2366  }
2367 
2372  std::string tableName;
2373 
2379  std::string typeId;
2380 
2384  std::string typeDefinition;
2385 
2389  std::string typeLabel;
2390 
2395  std::map<std::string, std::vector<std::string> > typeProperties;
2396 
2400  int64_t countInserted;
2401 
2406  int64_t countSkipped;
2407 
2412  int64_t countUpdated;
2413 
2417  std::map<std::string, std::string> info;
2418 
2419  std::vector<std::string> files;
2420  };
2421 } // end namespace gpudb
2422 
2423 namespace avro
2424 {
2425  template<> struct codec_traits<gpudb::CreateTableExternalResponse>
2426  {
2427  static void encode(Encoder& e, const gpudb::CreateTableExternalResponse& v)
2428  {
2429  ::avro::encode(e, v.tableName);
2430  ::avro::encode(e, v.typeId);
2431  ::avro::encode(e, v.typeDefinition);
2432  ::avro::encode(e, v.typeLabel);
2433  ::avro::encode(e, v.typeProperties);
2434  ::avro::encode(e, v.countInserted);
2435  ::avro::encode(e, v.countSkipped);
2436  ::avro::encode(e, v.countUpdated);
2437  ::avro::encode(e, v.info);
2438  ::avro::encode(e, v.files);
2439  }
2440 
2441  static void decode(Decoder& d, gpudb::CreateTableExternalResponse& v)
2442  {
2443  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2444  {
2445  const std::vector<size_t> fo = rd->fieldOrder();
2446 
2447  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2448  {
2449  switch (*it)
2450  {
2451  case 0:
2452  ::avro::decode(d, v.tableName);
2453  break;
2454 
2455  case 1:
2456  ::avro::decode(d, v.typeId);
2457  break;
2458 
2459  case 2:
2460  ::avro::decode(d, v.typeDefinition);
2461  break;
2462 
2463  case 3:
2464  ::avro::decode(d, v.typeLabel);
2465  break;
2466 
2467  case 4:
2468  ::avro::decode(d, v.typeProperties);
2469  break;
2470 
2471  case 5:
2472  ::avro::decode(d, v.countInserted);
2473  break;
2474 
2475  case 6:
2476  ::avro::decode(d, v.countSkipped);
2477  break;
2478 
2479  case 7:
2480  ::avro::decode(d, v.countUpdated);
2481  break;
2482 
2483  case 8:
2484  ::avro::decode(d, v.info);
2485  break;
2486 
2487  case 9:
2488  ::avro::decode(d, v.files);
2489  break;
2490 
2491  default:
2492  break;
2493  }
2494  }
2495  }
2496  else
2497  {
2498  ::avro::decode(d, v.tableName);
2499  ::avro::decode(d, v.typeId);
2500  ::avro::decode(d, v.typeDefinition);
2501  ::avro::decode(d, v.typeLabel);
2502  ::avro::decode(d, v.typeProperties);
2503  ::avro::decode(d, v.countInserted);
2504  ::avro::decode(d, v.countSkipped);
2505  ::avro::decode(d, v.countUpdated);
2506  ::avro::decode(d, v.info);
2507  ::avro::decode(d, v.files);
2508  }
2509  }
2510  };
2511 } // end namespace avro
2512 
2513 #endif // __CREATE_TABLE_EXTERNAL_H__
std::string tableName
Value of tableName.
A set of parameters for GPUdb::createTableExternal.
std::map< std::string, std::string > info
Additional information.
int64_t countInserted
Number of records inserted into the external table.
CreateTableExternalResponse()
Constructs a CreateTableExternalResponse object with default parameters.
CreateTableExternalRequest()
Constructs a CreateTableExternalRequest object with default parameters.
std::string typeLabel
The user-defined description associated with the table's structure.
CreateTableExternalRequest(const std::string &tableName_, const std::vector< std::string > &filepaths_, const std::map< std::string, std::map< std::string, std::string > > &modifyColumns_, const std::map< std::string, std::string > &createTableOptions_, const std::map< std::string, std::string > &options_)
Constructs a CreateTableExternalRequest object with the specified parameters.
std::map< std::string, std::string > createTableOptions
Options from GPUdb::createTable, allowing the structure of the table to be defined independently of t...
int64_t countUpdated
[Not yet implemented] Number of records updated within the external table.
std::map< std::string, std::map< std::string, std::string > > modifyColumns
Not implemented yet.
A set of results returned by GPUdb::createTableExternal.
std::string typeId
ID of the currently registered table structure type for this external table.
std::string typeDefinition
A JSON string describing the columns of the created external table.
std::string tableName
Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution...
std::vector< std::string > filepaths
A list of file paths from which data will be sourced;.
std::map< std::string, std::vector< std::string > > typeProperties
A mapping of each external table column name to an array of column properties associated with that co...
std::map< std::string, std::string > options
Optional parameters.
int64_t countSkipped
Number of records skipped, when not running in abort error handling mode.