Found several ideas for Scala but unable to implement in Java with success, hence posting as a new question.
I need to format input JSON in "value" column streaming from Kafka topic
Dataset<Row> output = df.select(functions.from_json(df.col("value"), schema));
StructType schema = new StructType();
schema.add("Id", DataTypes.StringType);
schema.add("Type", DataTypes.StringType);
schema.add("KEY", DataTypes.StringType);
schema.add("condition", DataTypes.IntegerType);
schema.add("seller_Id", DataTypes.IntegerType);
schema.add("seller_Name", DataTypes.StringType);
schema.add("isActive", DataTypes.BooleanType);
Reached up to the point to see below being printed on console sink -
StreamingQuery query = output.writeStream().format("console").start();
+-------------------------+
| jsontostructs(value)|
+-------------------------+
| [] |
+-------------------------+
Please advise how to get individual columns from this Structure.