Skip to content

Commit

Permalink
MINOR: Pydantic fixes for redshift & kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
ulixius9 committed Jun 12, 2024
1 parent b7ef13b commit d7695f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from metadata.generated.schema.metadataIngestion.workflow import (
Source as WorkflowSource,
)
from metadata.generated.schema.type.basic import EntityName
from metadata.generated.schema.type.basic import EntityName, FullyQualifiedEntityName
from metadata.generated.schema.type.schema import SchemaType, Topic
from metadata.ingestion.api.models import Either
from metadata.ingestion.models.ometa_topic_data import OMetaTopicSampleData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_connection(
schema_registry_client = None
consumer_client = None
if connection.schemaRegistryURL:
schema_registry_config["url"] = connection.schemaRegistryURL
schema_registry_config["url"] = str(connection.schemaRegistryURL)
schema_registry_client = SchemaRegistryClient(schema_registry_config)
consumer_config["bootstrap.servers"] = connection.bootstrapServers
if "group.id" not in consumer_config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def metadata_ingestion_workflow(workflow_config: OpenMetadataWorkflowConfig):

set_operator_logger(workflow_config)

config = json.loads(workflow_config.model_dump_json())
config = json.loads(workflow_config.model_dump_json(exclude_defaults=False))
workflow = MetadataWorkflow.create(config)

workflow.execute()
Expand Down Expand Up @@ -313,7 +313,8 @@ def send_failed_status_callback(workflow_config: OpenMetadataWorkflowConfig, *_,
)

pipeline_status = metadata.get_pipeline_status(
workflow_config.ingestionPipelineFQN, str(workflow_config.pipelineRunId)
workflow_config.ingestionPipelineFQN,
str(workflow_config.pipelineRunId.root),
)
pipeline_status.endDate = Timestamp(int(datetime.now().timestamp() * 1000))
pipeline_status.pipelineState = PipelineState.failed
Expand Down

0 comments on commit d7695f3

Please sign in to comment.