'How we can Dump kafka topic into presto

I need to pushing a JSON file into a Kafka topic, connecting the topic in presto and structuring the JSON data into a queryable table.

I am following this tutorial https://prestodb.io/docs/current/connector/kafka-tutorial.html#step-2-load-data

I am not able to understand how this command will work.

$ ./kafka-tpch load --brokers localhost:9092 --prefix tpch. --tpch-type tiny

Suppose I have created test topic in kafka using producer. How will tpch file will generate of this topic?



Solution 1:[1]

Above command creates a tpch schema and loads various tables under it. This can be used for testing purpose. If you want to work with your actual kafka topics, you need to enlist them in /catalog/kafka.properties against kafka.tables-names. If you simply provide a topic name without prefix (such as test_topic), it would land into "default" schema. However, if you specify a topic name with prefix (such as test_schema.test_topic), then the topic would appear under test_schema. While querying using presto, you can provide this schema name.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Praful Khandelwal