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 
1377  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_):
1378  tableName( tableName_ ),
1379  filepaths( filepaths_ ),
1380  modifyColumns( modifyColumns_ ),
1381  createTableOptions( createTableOptions_ ),
1382  options( options_ )
1383  {
1384  }
1385 
1394  std::string tableName;
1395 
1426  std::vector<std::string> filepaths;
1427 
1431  std::map<std::string, std::map<std::string, std::string> > modifyColumns;
1432 
1609  std::map<std::string, std::string> createTableOptions;
1610 
2302  std::map<std::string, std::string> options;
2303  };
2304 } // end namespace gpudb
2305 
2306 namespace avro
2307 {
2308  template<> struct codec_traits<gpudb::CreateTableExternalRequest>
2309  {
2310  static void encode(Encoder& e, const gpudb::CreateTableExternalRequest& v)
2311  {
2312  ::avro::encode(e, v.tableName);
2313  ::avro::encode(e, v.filepaths);
2314  ::avro::encode(e, v.modifyColumns);
2315  ::avro::encode(e, v.createTableOptions);
2316  ::avro::encode(e, v.options);
2317  }
2318 
2319  static void decode(Decoder& d, gpudb::CreateTableExternalRequest& v)
2320  {
2321  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2322  {
2323  const std::vector<size_t> fo = rd->fieldOrder();
2324 
2325  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2326  {
2327  switch (*it)
2328  {
2329  case 0:
2330  ::avro::decode(d, v.tableName);
2331  break;
2332 
2333  case 1:
2334  ::avro::decode(d, v.filepaths);
2335  break;
2336 
2337  case 2:
2338  ::avro::decode(d, v.modifyColumns);
2339  break;
2340 
2341  case 3:
2342  ::avro::decode(d, v.createTableOptions);
2343  break;
2344 
2345  case 4:
2346  ::avro::decode(d, v.options);
2347  break;
2348 
2349  default:
2350  break;
2351  }
2352  }
2353  }
2354  else
2355  {
2356  ::avro::decode(d, v.tableName);
2357  ::avro::decode(d, v.filepaths);
2358  ::avro::decode(d, v.modifyColumns);
2359  ::avro::decode(d, v.createTableOptions);
2360  ::avro::decode(d, v.options);
2361  }
2362  }
2363  };
2364 } // end namespace avro
2365 
2366 namespace gpudb
2367 {
2374  {
2380  tableName(std::string()),
2381  typeId(std::string()),
2382  typeDefinition(std::string()),
2383  typeLabel(std::string()),
2384  typeProperties(std::map<std::string, std::vector<std::string> >()),
2385  countInserted(int64_t()),
2386  countSkipped(int64_t()),
2387  countUpdated(int64_t()),
2388  info(std::map<std::string, std::string>()),
2389  files(std::vector<std::string>())
2390  {
2391  }
2392 
2397  std::string tableName;
2398 
2404  std::string typeId;
2405 
2409  std::string typeDefinition;
2410 
2414  std::string typeLabel;
2415 
2420  std::map<std::string, std::vector<std::string> > typeProperties;
2421 
2425  int64_t countInserted;
2426 
2431  int64_t countSkipped;
2432 
2437  int64_t countUpdated;
2438 
2442  std::map<std::string, std::string> info;
2443 
2444  std::vector<std::string> files;
2445  };
2446 } // end namespace gpudb
2447 
2448 namespace avro
2449 {
2450  template<> struct codec_traits<gpudb::CreateTableExternalResponse>
2451  {
2452  static void encode(Encoder& e, const gpudb::CreateTableExternalResponse& v)
2453  {
2454  ::avro::encode(e, v.tableName);
2455  ::avro::encode(e, v.typeId);
2456  ::avro::encode(e, v.typeDefinition);
2457  ::avro::encode(e, v.typeLabel);
2458  ::avro::encode(e, v.typeProperties);
2459  ::avro::encode(e, v.countInserted);
2460  ::avro::encode(e, v.countSkipped);
2461  ::avro::encode(e, v.countUpdated);
2462  ::avro::encode(e, v.info);
2463  ::avro::encode(e, v.files);
2464  }
2465 
2466  static void decode(Decoder& d, gpudb::CreateTableExternalResponse& v)
2467  {
2468  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2469  {
2470  const std::vector<size_t> fo = rd->fieldOrder();
2471 
2472  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2473  {
2474  switch (*it)
2475  {
2476  case 0:
2477  ::avro::decode(d, v.tableName);
2478  break;
2479 
2480  case 1:
2481  ::avro::decode(d, v.typeId);
2482  break;
2483 
2484  case 2:
2485  ::avro::decode(d, v.typeDefinition);
2486  break;
2487 
2488  case 3:
2489  ::avro::decode(d, v.typeLabel);
2490  break;
2491 
2492  case 4:
2493  ::avro::decode(d, v.typeProperties);
2494  break;
2495 
2496  case 5:
2497  ::avro::decode(d, v.countInserted);
2498  break;
2499 
2500  case 6:
2501  ::avro::decode(d, v.countSkipped);
2502  break;
2503 
2504  case 7:
2505  ::avro::decode(d, v.countUpdated);
2506  break;
2507 
2508  case 8:
2509  ::avro::decode(d, v.info);
2510  break;
2511 
2512  case 9:
2513  ::avro::decode(d, v.files);
2514  break;
2515 
2516  default:
2517  break;
2518  }
2519  }
2520  }
2521  else
2522  {
2523  ::avro::decode(d, v.tableName);
2524  ::avro::decode(d, v.typeId);
2525  ::avro::decode(d, v.typeDefinition);
2526  ::avro::decode(d, v.typeLabel);
2527  ::avro::decode(d, v.typeProperties);
2528  ::avro::decode(d, v.countInserted);
2529  ::avro::decode(d, v.countSkipped);
2530  ::avro::decode(d, v.countUpdated);
2531  ::avro::decode(d, v.info);
2532  ::avro::decode(d, v.files);
2533  }
2534  }
2535  };
2536 } // end namespace avro
2537 
2538 #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.