- Prerequisites
 - Installation
 - Configuration
 - Integrations
 - Lenses SQL
 - Tools
 - Release notes
 
4.0
- Prerequisites
 - Installation
 - Configuration
 - Integrations
 - Lenses SQL
 - Tools
 - Release notes
 
You are viewing documentation for an older version of Lenses.io View latest documentation here
Querying topic data
Create a Topic via SQL
query = (
    "CREATE TABLE greetings(_key string, _value string) 
    FORMAT (string, string)"
)
result = lenses_lib.ExecSQL(query)
Insert records into a topic
query = (
    "INSERT INTO greetings(_key, _value)
     VALUES('Hello', 'World')"
)
result = lenses_lib.ExecSQL(query)
Query a topic
query = (
    "SELECT * FROM greetings limit 1"
)
result = lenses_lib.ExecSQL(query)
