View the latest documentation 5.5
The CLI allows you to browse and subscribe to topic data with SQL. Please refer to the Lenses SQL documentation for more details.
Use these flags to control the data that’s returned:
Browse data via the query command, optionally validate and output stats:
lenses-cli query \ --keys \ --meta "SELECT score, author FROM reddit_posts LIMIT 50"
lenses-cli query \ --stats "SELECT score, author FROM reddit_posts LIMIT 50"
Live continuous queries update according to the query and never stop until terminated:
lenses-cli \ query \ --live-stream "SELECT score, author FROM reddit_posts WHERE _sample=2 AND _sampleWindow=200"
The interactive shell allows you to have an interactive experience and issue Lenses SQL queries from the command line.
To start the interactive shell, issue the following command:
lenses-cli shell
The available options are the following:
Multiline queries are possible but not available in the history inside the shell. After a restart, the multiline queries are concatenated into one line and can be selected.
Query history is stored in .lenes/history in the home directory of the user.
__ ________ ____ / / ___ ____ ________ _____ / ____/ / / _/ / / / _ \/ __ \/ ___/ _ \/ ___/ / / / / / / / /___/ __/ / / (__ ) __(__ ) / /___/ /____/ / /_____/\___/_/ /_/____/\___/____/ \____/_____/___/ Docs at https://docs.lenses.io Connected to [https://master.lenses.io:443] as [andrew], context [master] Use "!" to set output options [!keys|!keysOnly|!stats|!meta|!pretty] Crtl+D to exit lenses-sql>
On this page