info
database.info
                                                                                
 Documentation                                                                  
                          Extract extended metadata (like tables, schemas)      
                          from a database object.                               
                                                                                
 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      no         
                                                for this module.                
                          defaults     object   Value defaults for   no         
                                                this module.                    
                          value_type   string   The data type this   yes        
                                                module will be                  
                                                used for.                       
                                                                                
 Module config          -- no config --                                         
 Python class                                                                   
                          class_name    DatabaseInfoMetadataModule              
                          module_name   kiara_modules.core.database             
                          full_name     kiara_modules.core.database.Database…   
                                                                                
 Processing source code  ─────────────────────────────────────────────────────  
                          def process(self, inputs: ValueSet, outputs: Value…   
                                                                                
                              input_name = self.value_type                      
                              if input_name == "any":                           
                                  input_name = "value_item"                     
                                                                                
                              value = inputs.get_value_obj(input_name)          
                              if self.value_type != "any" and value.type_nam…   
                                  raise KiaraProcessingException(               
                                      f"Can't extract metadata for value of …   
                                  )                                             
                                                                                
                              # TODO: if type 'any', validate that the data …   
                                                                                
                              outputs.set_value("metadata_item_schema", self…   
                              metadata = self.extract_metadata(value)           
                              if isinstance(metadata, BaseModel):               
                                  metadata = metadata.dict(exclude_none=True)   
                                                                                
                              # TODO: validate metadata?                        
                              outputs.set_value("metadata_item", metadata)      
                                                                                
                         ─────────────────────────────────────────────────────