Connect to Turbot Pipes from DuckDB
DuckDB is a free open-source, analytical SQL database system.
Steampipe provides a single interface to all your cloud, code, logs and more. Because it's built on Postgres, Steampipe provides an endpoint that any Postgres-compatible client -- including DuckDB -- can connect to.
The Connect tab for your workspace provides the details you need to connect DuckDB to Turbot Pipes.
Once Turbot Pipes is successfully connected, you can explore the tables provided by the Steampipe plugins, run queries and build reports.
Connect to Steampipe CLI from DuckDB
You can also connect DuckDB to Steampipe CLI. To do that, run
steampipe service start --show-password and use the displayed connection details.
Steampipe service is running:Database:Host(s): localhost, 127.0.0.1, 192.168.29.204Port: 9193Database: steampipeUser: steampipePassword: 99**_****_**8cConnection string: postgres://steampipe:99**_****_**8c@localhost:9193/steampipe
To get started, install DuckDB. DuckDB provides the capability to execute queries directly on a running PostgreSQL database by utilizing the
postgres extension that can be installed by running this in the DuckDB CLI.
Paste this to Load the postgres extension
Once the Postgres extension is installed and loaded, tables can be queried using the
postgres_scan function. The first parameter to the function is the
postgres connection string followed by
table name. Here we will execute a query with this command to list the top news using the hackernews plugin.
SELECT * FROM postgres_scan('postgresql://rahulsrivastav14:firstname.lastname@example.org:9193/dea4px', 'hackernews', 'hackernews_top');