mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-26 00:04:52 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			2.5 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.5 KiB
		
	
	
	
	
	
	
	
| title | slug | 
|---|---|
| Service Mixin | /sdk/python/api-reference/service-mixin | 
module service_mixin
Helper mixin to handle services
class OMetaServiceMixin
OpenMetadata API methods related to service.
To be inherited by OpenMetadata
method create_service_from_source
create_service_from_source(entity: Type[~T], config: Source) → ~T
Create a service of type T.
We need to extract from the WorkflowSource:
- name: serviceName
- serviceType: Type Enum
- connection: (DatabaseConnection, DashboardConnection...)
:param entity: Service Type :param config: WorkflowSource :return: Created Service
method get_create_service_from_source
get_create_service_from_source(entity: Type[~T], config: Source) → ~C
Prepare a CreateService request from source config :param entity: Service Type :param config: WorkflowSource :return: CreateService request
If the OpenMetadata Connection has storeServiceConnection set to false, we won't pass the connection details when creating the service.
method get_service_or_create
get_service_or_create(entity: Type[~T], config: Source) → ~T
Fetches a service by name, or creates it using the WorkflowSource config :param entity: Entity Type to get or create :param config: WorkflowSource :return: Entity Service of T
