In the Kafka Connect Ingestion its not clear to me...
# troubleshoot
n
In the Kafka Connect Ingestion its not clear to me what
provided_configs
property for? https://datahubproject.io/docs/metadata-ingestion/source_docs/kafka-connect I am having an issue where the kafka connect ingestion also ingests the destination topics but it ingests with
PROD
as env instead of the provided
env
value in the recipe such as
STG
just wondering if the provided_configs could be a solution here.
h
Hey, @nutritious-bird-77396, you can set env field in recipe for datahub 0.8.25 onwards to STG
Copy code
source:
  type: "kafka-connect"
  config:
    #other configs
    env : STG
provided_configs is for resolving kafka connect sources and sink configurations which use config providers, in order to resolve lineage.
n
Thanks @hundreds-photographer-13496 for your response! I already have the
env
config specified in my recipe. Even then when connecting the lineage to the kafka topic it connects to the
PROD
env one that it created. Is there another parameter to specify the env for the topic that's created?
Copy code
source:
  type: "kafka-connect"
  config:
    env: "STG"
    connect_uri: "<http://kafka-connect.svc.cluster.local:8083>"
    cluster_name: "connect-cluster"

sink:
  type: "datahub-rest"
  config:
    server: "<http://datahub-gms-service.svc.cluster.local:8080>"
h
oh, yes, I was just going through the code for kafka connect connector and seems like self.config.env is not passed when creating lineage dataset urns, hence default PROD is being used. https://github.com/linkedin/datahub/blob/master/metadata-ingestion/src/datahub/ingestion/source/kafka_connect.py#L888-L905
This seems to be a bug. Will you be willing to check if this gets fixed by passing
self.config.env
to
builder.make_dataset_urn_with_platform_instance
? Feel free to create PR if that works as expected.
thankyou 1
n
Perfect this is exactly what i was looking for. Thanks! I will test and create a PR.