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 
1344  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_):
1345  tableName( tableName_ ),
1346  filepaths( filepaths_ ),
1347  modifyColumns( modifyColumns_ ),
1348  createTableOptions( createTableOptions_ ),
1349  options( options_ )
1350  {
1351  }
1352 
1361  std::string tableName;
1362 
1393  std::vector<std::string> filepaths;
1394 
1398  std::map<std::string, std::map<std::string, std::string> > modifyColumns;
1399 
1576  std::map<std::string, std::string> createTableOptions;
1577 
2245  std::map<std::string, std::string> options;
2246  };
2247 } // end namespace gpudb
2248 
2249 namespace avro
2250 {
2251  template<> struct codec_traits<gpudb::CreateTableExternalRequest>
2252  {
2253  static void encode(Encoder& e, const gpudb::CreateTableExternalRequest& v)
2254  {
2255  ::avro::encode(e, v.tableName);
2256  ::avro::encode(e, v.filepaths);
2257  ::avro::encode(e, v.modifyColumns);
2258  ::avro::encode(e, v.createTableOptions);
2259  ::avro::encode(e, v.options);
2260  }
2261 
2262  static void decode(Decoder& d, gpudb::CreateTableExternalRequest& v)
2263  {
2264  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2265  {
2266  const std::vector<size_t> fo = rd->fieldOrder();
2267 
2268  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2269  {
2270  switch (*it)
2271  {
2272  case 0:
2273  ::avro::decode(d, v.tableName);
2274  break;
2275 
2276  case 1:
2277  ::avro::decode(d, v.filepaths);
2278  break;
2279 
2280  case 2:
2281  ::avro::decode(d, v.modifyColumns);
2282  break;
2283 
2284  case 3:
2285  ::avro::decode(d, v.createTableOptions);
2286  break;
2287 
2288  case 4:
2289  ::avro::decode(d, v.options);
2290  break;
2291 
2292  default:
2293  break;
2294  }
2295  }
2296  }
2297  else
2298  {
2299  ::avro::decode(d, v.tableName);
2300  ::avro::decode(d, v.filepaths);
2301  ::avro::decode(d, v.modifyColumns);
2302  ::avro::decode(d, v.createTableOptions);
2303  ::avro::decode(d, v.options);
2304  }
2305  }
2306  };
2307 } // end namespace avro
2308 
2309 namespace gpudb
2310 {
2317  {
2323  tableName(std::string()),
2324  typeId(std::string()),
2325  typeDefinition(std::string()),
2326  typeLabel(std::string()),
2327  typeProperties(std::map<std::string, std::vector<std::string> >()),
2328  countInserted(int64_t()),
2329  countSkipped(int64_t()),
2330  countUpdated(int64_t()),
2331  info(std::map<std::string, std::string>()),
2332  files(std::vector<std::string>())
2333  {
2334  }
2335 
2340  std::string tableName;
2341 
2347  std::string typeId;
2348 
2352  std::string typeDefinition;
2353 
2357  std::string typeLabel;
2358 
2363  std::map<std::string, std::vector<std::string> > typeProperties;
2364 
2368  int64_t countInserted;
2369 
2374  int64_t countSkipped;
2375 
2380  int64_t countUpdated;
2381 
2385  std::map<std::string, std::string> info;
2386 
2387  std::vector<std::string> files;
2388  };
2389 } // end namespace gpudb
2390 
2391 namespace avro
2392 {
2393  template<> struct codec_traits<gpudb::CreateTableExternalResponse>
2394  {
2395  static void encode(Encoder& e, const gpudb::CreateTableExternalResponse& v)
2396  {
2397  ::avro::encode(e, v.tableName);
2398  ::avro::encode(e, v.typeId);
2399  ::avro::encode(e, v.typeDefinition);
2400  ::avro::encode(e, v.typeLabel);
2401  ::avro::encode(e, v.typeProperties);
2402  ::avro::encode(e, v.countInserted);
2403  ::avro::encode(e, v.countSkipped);
2404  ::avro::encode(e, v.countUpdated);
2405  ::avro::encode(e, v.info);
2406  ::avro::encode(e, v.files);
2407  }
2408 
2409  static void decode(Decoder& d, gpudb::CreateTableExternalResponse& v)
2410  {
2411  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2412  {
2413  const std::vector<size_t> fo = rd->fieldOrder();
2414 
2415  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2416  {
2417  switch (*it)
2418  {
2419  case 0:
2420  ::avro::decode(d, v.tableName);
2421  break;
2422 
2423  case 1:
2424  ::avro::decode(d, v.typeId);
2425  break;
2426 
2427  case 2:
2428  ::avro::decode(d, v.typeDefinition);
2429  break;
2430 
2431  case 3:
2432  ::avro::decode(d, v.typeLabel);
2433  break;
2434 
2435  case 4:
2436  ::avro::decode(d, v.typeProperties);
2437  break;
2438 
2439  case 5:
2440  ::avro::decode(d, v.countInserted);
2441  break;
2442 
2443  case 6:
2444  ::avro::decode(d, v.countSkipped);
2445  break;
2446 
2447  case 7:
2448  ::avro::decode(d, v.countUpdated);
2449  break;
2450 
2451  case 8:
2452  ::avro::decode(d, v.info);
2453  break;
2454 
2455  case 9:
2456  ::avro::decode(d, v.files);
2457  break;
2458 
2459  default:
2460  break;
2461  }
2462  }
2463  }
2464  else
2465  {
2466  ::avro::decode(d, v.tableName);
2467  ::avro::decode(d, v.typeId);
2468  ::avro::decode(d, v.typeDefinition);
2469  ::avro::decode(d, v.typeLabel);
2470  ::avro::decode(d, v.typeProperties);
2471  ::avro::decode(d, v.countInserted);
2472  ::avro::decode(d, v.countSkipped);
2473  ::avro::decode(d, v.countUpdated);
2474  ::avro::decode(d, v.info);
2475  ::avro::decode(d, v.files);
2476  }
2477  }
2478  };
2479 } // end namespace avro
2480 
2481 #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.