How to auto create nested structured stream or table from a topic

how to auto create nested structured stream or table from a topic ? instead of manually creating like below
{
“fullName”: “Holly Waters”,
“contractId”: “1234567”,
“modemMACId”: “00-12-ab-34-cd-5e”,
“deviceData”: “{"lastIpVisited": "8.8.8.8", "mbpsDown": "8.74", "mbpsUp": "1.01", "beam": 127}”,
“serviceAddress”: {
“street”: “11906 Albion St”,
“city”: “Denver”,
“country”: “USA”
}.
}

CREATE STREAM subscriber_traffic(
fullName VARCHAR,
contractId VARCHAR,
modemMACId VARCHAR,
deviceData VARCHAR,
serviceAddress STRUCT <street VARCHAR, city VARCHAR, country VARCHAR >)
WITH (KAFKA_TOPIC=‘subscriber_traffic’,
VALUE_FORMAT=‘json’);

This topic was automatically closed after 30 days. New replies are no longer allowed.