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 
1313  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_):
1314  tableName( tableName_ ),
1315  filepaths( filepaths_ ),
1316  modifyColumns( modifyColumns_ ),
1317  createTableOptions( createTableOptions_ ),
1318  options( options_ )
1319  {
1320  }
1321 
1330  std::string tableName;
1331 
1362  std::vector<std::string> filepaths;
1363 
1367  std::map<std::string, std::map<std::string, std::string> > modifyColumns;
1368 
1540  std::map<std::string, std::string> createTableOptions;
1541 
2188  std::map<std::string, std::string> options;
2189  };
2190 } // end namespace gpudb
2191 
2192 namespace avro
2193 {
2194  template<> struct codec_traits<gpudb::CreateTableExternalRequest>
2195  {
2196  static void encode(Encoder& e, const gpudb::CreateTableExternalRequest& v)
2197  {
2198  ::avro::encode(e, v.tableName);
2199  ::avro::encode(e, v.filepaths);
2200  ::avro::encode(e, v.modifyColumns);
2201  ::avro::encode(e, v.createTableOptions);
2202  ::avro::encode(e, v.options);
2203  }
2204 
2205  static void decode(Decoder& d, gpudb::CreateTableExternalRequest& v)
2206  {
2207  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2208  {
2209  const std::vector<size_t> fo = rd->fieldOrder();
2210 
2211  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2212  {
2213  switch (*it)
2214  {
2215  case 0:
2216  ::avro::decode(d, v.tableName);
2217  break;
2218 
2219  case 1:
2220  ::avro::decode(d, v.filepaths);
2221  break;
2222 
2223  case 2:
2224  ::avro::decode(d, v.modifyColumns);
2225  break;
2226 
2227  case 3:
2228  ::avro::decode(d, v.createTableOptions);
2229  break;
2230 
2231  case 4:
2232  ::avro::decode(d, v.options);
2233  break;
2234 
2235  default:
2236  break;
2237  }
2238  }
2239  }
2240  else
2241  {
2242  ::avro::decode(d, v.tableName);
2243  ::avro::decode(d, v.filepaths);
2244  ::avro::decode(d, v.modifyColumns);
2245  ::avro::decode(d, v.createTableOptions);
2246  ::avro::decode(d, v.options);
2247  }
2248  }
2249  };
2250 } // end namespace avro
2251 
2252 namespace gpudb
2253 {
2260  {
2266  tableName(std::string()),
2267  typeId(std::string()),
2268  typeDefinition(std::string()),
2269  typeLabel(std::string()),
2270  typeProperties(std::map<std::string, std::vector<std::string> >()),
2271  countInserted(int64_t()),
2272  countSkipped(int64_t()),
2273  countUpdated(int64_t()),
2274  info(std::map<std::string, std::string>()),
2275  files(std::vector<std::string>())
2276  {
2277  }
2278 
2283  std::string tableName;
2284 
2290  std::string typeId;
2291 
2295  std::string typeDefinition;
2296 
2300  std::string typeLabel;
2301 
2306  std::map<std::string, std::vector<std::string> > typeProperties;
2307 
2311  int64_t countInserted;
2312 
2317  int64_t countSkipped;
2318 
2323  int64_t countUpdated;
2324 
2328  std::map<std::string, std::string> info;
2329 
2330  std::vector<std::string> files;
2331  };
2332 } // end namespace gpudb
2333 
2334 namespace avro
2335 {
2336  template<> struct codec_traits<gpudb::CreateTableExternalResponse>
2337  {
2338  static void encode(Encoder& e, const gpudb::CreateTableExternalResponse& v)
2339  {
2340  ::avro::encode(e, v.tableName);
2341  ::avro::encode(e, v.typeId);
2342  ::avro::encode(e, v.typeDefinition);
2343  ::avro::encode(e, v.typeLabel);
2344  ::avro::encode(e, v.typeProperties);
2345  ::avro::encode(e, v.countInserted);
2346  ::avro::encode(e, v.countSkipped);
2347  ::avro::encode(e, v.countUpdated);
2348  ::avro::encode(e, v.info);
2349  ::avro::encode(e, v.files);
2350  }
2351 
2352  static void decode(Decoder& d, gpudb::CreateTableExternalResponse& v)
2353  {
2354  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
2355  {
2356  const std::vector<size_t> fo = rd->fieldOrder();
2357 
2358  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
2359  {
2360  switch (*it)
2361  {
2362  case 0:
2363  ::avro::decode(d, v.tableName);
2364  break;
2365 
2366  case 1:
2367  ::avro::decode(d, v.typeId);
2368  break;
2369 
2370  case 2:
2371  ::avro::decode(d, v.typeDefinition);
2372  break;
2373 
2374  case 3:
2375  ::avro::decode(d, v.typeLabel);
2376  break;
2377 
2378  case 4:
2379  ::avro::decode(d, v.typeProperties);
2380  break;
2381 
2382  case 5:
2383  ::avro::decode(d, v.countInserted);
2384  break;
2385 
2386  case 6:
2387  ::avro::decode(d, v.countSkipped);
2388  break;
2389 
2390  case 7:
2391  ::avro::decode(d, v.countUpdated);
2392  break;
2393 
2394  case 8:
2395  ::avro::decode(d, v.info);
2396  break;
2397 
2398  case 9:
2399  ::avro::decode(d, v.files);
2400  break;
2401 
2402  default:
2403  break;
2404  }
2405  }
2406  }
2407  else
2408  {
2409  ::avro::decode(d, v.tableName);
2410  ::avro::decode(d, v.typeId);
2411  ::avro::decode(d, v.typeDefinition);
2412  ::avro::decode(d, v.typeLabel);
2413  ::avro::decode(d, v.typeProperties);
2414  ::avro::decode(d, v.countInserted);
2415  ::avro::decode(d, v.countSkipped);
2416  ::avro::decode(d, v.countUpdated);
2417  ::avro::decode(d, v.info);
2418  ::avro::decode(d, v.files);
2419  }
2420  }
2421  };
2422 } // end namespace avro
2423 
2424 #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.