mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-13 19:11:00 +00:00
Fix#7532: Allow overriding service connection config when ingesting from CLI (#8091)
* Allow overriding service connection config when ingesting from CLI * Rename field in JSON schema * Address comment
This commit is contained in:
parent
56d555eb58
commit
48905a7f6e
@ -198,7 +198,7 @@ class TopologyRunnerMixin(Generic[C]):
|
||||
)
|
||||
|
||||
# we get entity from OM if we do not want to overwrite existing data in OM
|
||||
if not stage.overwrite:
|
||||
if not stage.overwrite and not self._is_force_overwrite_enabled():
|
||||
entity = self.metadata.get_by_name(
|
||||
entity=stage.type_,
|
||||
fqn=entity_fqn,
|
||||
@ -234,3 +234,6 @@ class TopologyRunnerMixin(Generic[C]):
|
||||
if stage.context and stage.cache_all:
|
||||
self.append_context(key=stage.context, value=entity)
|
||||
logger.debug(self.context)
|
||||
|
||||
def _is_force_overwrite_enabled(self) -> bool:
|
||||
return self.metadata.config and self.metadata.config.forceEntityOverwriting
|
||||
|
@ -158,6 +158,7 @@ class OpenMetadata(
|
||||
|
||||
client: REST
|
||||
_auth_provider: AuthenticationProvider
|
||||
config: OpenMetadataConnection
|
||||
|
||||
class_root = ".".join(["metadata", "generated", "schema"])
|
||||
entity_path = "entity"
|
||||
|
@ -176,6 +176,11 @@
|
||||
"type": "integer",
|
||||
"default": "1000"
|
||||
},
|
||||
"forceEntityOverwriting": {
|
||||
"description": "Force the overwriting of any entity during the ingestion.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"supportsMetadataExtraction": {
|
||||
"$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user