MCPcopy Create free account
hub / github.com/apache/cloudberry / map_stuff

Method map_stuff

gpMgmt/bin/gpload.py:2620–2642  ·  view source on GitHub ↗

get the config and find it in into_columns_dict, report error if no column finded in into_columns_dict or no mapping for it. Return list: [ configFormat(into_clomuns[0], into_clomuns[index]) ]

(self,config,configFormat,index)

Source from the content-addressed store, hash-verified

2618 self.do_insert(self.get_qualified_tablename())
2619
2620 def map_stuff(self,config,configFormat,index):
2621 '''
2622 get the config and find it in into_columns_dict,
2623 report error if no column finded in into_columns_dict or no mapping for it.
2624
2625 Return
2626 list: [ configFormat(into_clomuns[0], into_clomuns[index]) ]
2627 '''
2628 lis = []
2629 theList = self.getconfig(config,list)
2630 theList = convertListToDelimited(theList)
2631 for i in theList:
2632 if type(i) != str and type(i) != str:
2633 self.control_file_error("%s must be a YAML sequence of strings"%config)
2634 j = self.into_columns_dict.get(i)
2635 if not j:
2636 self.log(self.ERROR,'column %s in %s does not exist'%(i,config))
2637 if not j[index]:
2638 self.log(self.ERROR,'there is no mapping from the column %s in %s'%(i,config))
2639 # append ( j[0] = from_table.j[index])
2640 # column_name = from_table.column_name
2641 lis.append(configFormat(j[0],j[index]))
2642 return lis
2643
2644 def fix_update_cond(self, match):
2645 self.log(self.DEBUG, match.group(0))

Callers 2

do_updateMethod · 0.95
do_method_mergeMethod · 0.95

Calls 6

getconfigMethod · 0.95
control_file_errorMethod · 0.95
logMethod · 0.95
convertListToDelimitedFunction · 0.85
appendMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected