<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I am trying to write a data frame to Kafka topic with Avro schema for key and value using a schema registry URL. The to_avro function is not writing t... in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12439#M7239</link>
    <description>&lt;P&gt;This does not help solve the problem. I have the schema registered but somehow databricks's implementation of to_avro is not able to pick the correct one. I had to define my own Producer and Generic Avro records to send to the Kafka. to_avro utility method is not able to accomplish that.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2023 20:30:44 GMT</pubDate>
    <dc:creator>dheeraj2444</dc:creator>
    <dc:date>2023-01-13T20:30:44Z</dc:date>
    <item>
      <title>I am trying to write a data frame to Kafka topic with Avro schema for key and value using a schema registry URL. The to_avro function is not writing t...</title>
      <link>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12437#M7237</link>
      <description>&lt;P&gt;I am trying to write a data frame to Kafka topic with Avro schema for key and value using a schema registry URL. The to_avro function is not writing to the topic and throwing an exception with code 40403 something. Is there an alternate way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error message:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Caused by: RestClientException: Schema not found; error code: 40403&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is how I am using to_avro:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;val kafkaDf= df.select(to_avro($"value", lit("topicName-value"), schemaRegistry).as("value"))
kafkaDf
  .write
  .format("kafka")
  .option("kafka.bootstrap.servers", bootstrapServer)
  .option("topic", topicName)
  .option("schema.registry.url", schemaRegistry)
  .option(AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, schemaRegistry)
  .save()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 03:53:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12437#M7237</guid>
      <dc:creator>dheeraj2444</dc:creator>
      <dc:date>2023-01-12T03:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a data frame to Kafka topic with Avro schema for key and value using a schema registry URL. The to_avro function is not writing t...</title>
      <link>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12439#M7239</link>
      <description>&lt;P&gt;This does not help solve the problem. I have the schema registered but somehow databricks's implementation of to_avro is not able to pick the correct one. I had to define my own Producer and Generic Avro records to send to the Kafka. to_avro utility method is not able to accomplish that.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 20:30:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12439#M7239</guid>
      <dc:creator>dheeraj2444</dc:creator>
      <dc:date>2023-01-13T20:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a data frame to Kafka topic with Avro schema for key and value using a schema registry URL. The to_avro function is not writing t...</title>
      <link>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12438#M7238</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Could you please refer to &lt;A href="https://github.com/confluentinc/kafka-connect-elasticsearch/issues/59" target="test_blank"&gt;https://github.com/confluentinc/kafka-connect-elasticsearch/issues/59&lt;/A&gt; and let us know if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 22:16:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12438#M7238</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-01-12T22:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a data frame to Kafka topic with Avro schema for key and value using a schema registry URL. The to_avro function is not writing t...</title>
      <link>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12440#M7240</link>
      <description>&lt;P&gt;@Dheeraj Singh​&amp;nbsp;, Did it solve the issue? If yes, could you please log a case with Databricks to look into the implementation?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 04:42:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-am-trying-to-write-a-data-frame-to-kafka-topic-with-avro/m-p/12440#M7240</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-01-16T04:42:50Z</dc:date>
    </item>
  </channel>
</rss>

