Skip to content

load

table.load

                                                                                
 Documentation                                                                  
                          Load a table object from disk.                        
                                                                                
 Origin                                                                         
                          Authors   Markus Binsteiner (markus@frkl.io)          
                                                                                
 Context                                                                        
                          Tags         core                                     
                          Labels       package: kiara_modules.core              
                          References   source_repo:                             
                                       https://github.com/DHARPA-Project/kia…   
                                       documentation:                           
                                       https://dharpa.org/kiara_modules.core/   
                                       module_doc:                              
                                       https://dharpa.org/kiara_modules.core…   
                                       source_url:                              
                                       https://github.com/DHARPA-Project/kia…   
                                                                                
 Module config                                                                  
                          Field       Type     Description           Required   
                         ─────────────────────────────────────────────────────  
                          constants   object   Value constants for   no         
                                               this module.                     
                          defaults    object   Value defaults for    no         
                                               this module.                     
                                                                                
 Module config          -- no config --                                         
 Python class                                                                   
                          class_name    LoadArrowTable                          
                          module_name   kiara_modules.core.table                
                          full_name     kiara_modules.core.table.LoadArrowTa…   
                                                                                
 Processing source code  ─────────────────────────────────────────────────────  
                          def process(self, inputs: ValueSet, outputs: Value…   
                                                                                
                              from pyarrow import feather                       
                                                                                
                              base_path = inputs.get_value_data("base_path")    
                              rel_path = inputs.get_value_data("rel_path")      
                              format = inputs.get_value_data("format")          
                                                                                
                              if format != "feather":                           
                                  raise NotImplementedError()                   
                                                                                
                              path = os.path.join(base_path, rel_path)          
                                                                                
                              table = feather.read_table(path)                  
                              outputs.set_value("table", table)                 
                                                                                
                         ─────────────────────────────────────────────────────