GPUdb C++ API  Version 7.2.2.4
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 
1336  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_):
1337  tableName( tableName_ ),
1338  filepaths( filepaths_ ),
1339  modifyColumns( modifyColumns_ ),
1340  createTableOptions( createTableOptions_ ),
1341  options( options_ )
1342  {
1343  }
1344 
1353  std::string tableName;
1354 
1385  std::vector<std::string> filepaths;
1386 
1390  std::map<std::string, std::map<std::string, std::string> > modifyColumns;
1391 
1563  std::map<std::string, std::string> createTableOptions;
1564 
2232  std::map<std::string, std::string> options;
2233  };
2234 } // end namespace gpudb
2235 
2236 namespace avro
2237 {
2238  template<> struct codec_traits<gpudb::CreateTableExternalRequest>
2239  {
2240  static void encode(Encoder& e, const gpudb::CreateTableExternalRequest& v)
2241  {
2242  ::avro::encode(e, v.tableName);
2243  ::avro::encode(e, v.filepaths);
2244  ::avro::encode(e, v.modifyColumns);
2245  ::avro::encode(e, v.createTableOptions);
2246  ::avro::encode(e, v.options);
2247  }
2248 
2249  static void decode(Decoder& d, gpudb::CreateTableExternalRequest& v)
2250  {
2251  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2252  {
2253  const std::vector<size_t> fo = rd->fieldOrder();
2254 
2255  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2256  {
2257  switch (*it)
2258  {
2259  case 0:
2260  ::avro::decode(d, v.tableName);
2261  break;
2262 
2263  case 1:
2264  ::avro::decode(d, v.filepaths);
2265  break;
2266 
2267  case 2:
2268  ::avro::decode(d, v.modifyColumns);
2269  break;
2270 
2271  case 3:
2272  ::avro::decode(d, v.createTableOptions);
2273  break;
2274 
2275  case 4:
2276  ::avro::decode(d, v.options);
2277  break;
2278 
2279  default:
2280  break;
2281  }
2282  }
2283  }
2284  else
2285  {
2286  ::avro::decode(d, v.tableName);
2287  ::avro::decode(d, v.filepaths);
2288  ::avro::decode(d, v.modifyColumns);
2289  ::avro::decode(d, v.createTableOptions);
2290  ::avro::decode(d, v.options);
2291  }
2292  }
2293  };
2294 } // end namespace avro
2295 
2296 namespace gpudb
2297 {
2304  {
2310  tableName(std::string()),
2311  typeId(std::string()),
2312  typeDefinition(std::string()),
2313  typeLabel(std::string()),
2314  typeProperties(std::map<std::string, std::vector<std::string> >()),
2315  countInserted(int64_t()),
2316  countSkipped(int64_t()),
2317  countUpdated(int64_t()),
2318  info(std::map<std::string, std::string>()),
2319  files(std::vector<std::string>())
2320  {
2321  }
2322 
2327  std::string tableName;
2328 
2334  std::string typeId;
2335 
2339  std::string typeDefinition;
2340 
2344  std::string typeLabel;
2345 
2350  std::map<std::string, std::vector<std::string> > typeProperties;
2351 
2355  int64_t countInserted;
2356 
2361  int64_t countSkipped;
2362 
2367  int64_t countUpdated;
2368 
2372  std::map<std::string, std::string> info;
2373 
2374  std::vector<std::string> files;
2375  };
2376 } // end namespace gpudb
2377 
2378 namespace avro
2379 {
2380  template<> struct codec_traits<gpudb::CreateTableExternalResponse>
2381  {
2382  static void encode(Encoder& e, const gpudb::CreateTableExternalResponse& v)
2383  {
2384  ::avro::encode(e, v.tableName);
2385  ::avro::encode(e, v.typeId);
2386  ::avro::encode(e, v.typeDefinition);
2387  ::avro::encode(e, v.typeLabel);
2388  ::avro::encode(e, v.typeProperties);
2389  ::avro::encode(e, v.countInserted);
2390  ::avro::encode(e, v.countSkipped);
2391  ::avro::encode(e, v.countUpdated);
2392  ::avro::encode(e, v.info);
2393  ::avro::encode(e, v.files);
2394  }
2395 
2396  static void decode(Decoder& d, gpudb::CreateTableExternalResponse& v)
2397  {
2398  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2399  {
2400  const std::vector<size_t> fo = rd->fieldOrder();
2401 
2402  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2403  {
2404  switch (*it)
2405  {
2406  case 0:
2407  ::avro::decode(d, v.tableName);
2408  break;
2409 
2410  case 1:
2411  ::avro::decode(d, v.typeId);
2412  break;
2413 
2414  case 2:
2415  ::avro::decode(d, v.typeDefinition);
2416  break;
2417 
2418  case 3:
2419  ::avro::decode(d, v.typeLabel);
2420  break;
2421 
2422  case 4:
2423  ::avro::decode(d, v.typeProperties);
2424  break;
2425 
2426  case 5:
2427  ::avro::decode(d, v.countInserted);
2428  break;
2429 
2430  case 6:
2431  ::avro::decode(d, v.countSkipped);
2432  break;
2433 
2434  case 7:
2435  ::avro::decode(d, v.countUpdated);
2436  break;
2437 
2438  case 8:
2439  ::avro::decode(d, v.info);
2440  break;
2441 
2442  case 9:
2443  ::avro::decode(d, v.files);
2444  break;
2445 
2446  default:
2447  break;
2448  }
2449  }
2450  }
2451  else
2452  {
2453  ::avro::decode(d, v.tableName);
2454  ::avro::decode(d, v.typeId);
2455  ::avro::decode(d, v.typeDefinition);
2456  ::avro::decode(d, v.typeLabel);
2457  ::avro::decode(d, v.typeProperties);
2458  ::avro::decode(d, v.countInserted);
2459  ::avro::decode(d, v.countSkipped);
2460  ::avro::decode(d, v.countUpdated);
2461  ::avro::decode(d, v.info);
2462  ::avro::decode(d, v.files);
2463  }
2464  }
2465  };
2466 } // end namespace avro
2467 
2468 #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.