Algolia + Steampipe
Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.
Algolia provides search as a service, offering web search across a client's website using an externally hosted search engine.
For example:
select rank, hitfrom algolia_searchwhere index = 'offices' and query = 'usa'order by rank;
+------+---------------------------------------------------------+| rank | hit |+------+---------------------------------------------------------+| 1 | { "name": "Scranton", "state": "PA", "country": "USA" } || 2 | { "name": "Stamford", "state": "CT", "country": "USA" } |+------+---------------------------------------------------------+
Documentation
Get started
Install
Download and install the latest Algolia plugin:
steampipe plugin install algolia
Configuration
Installing the latest algolia plugin will create a config file (~/.steampipe/config/algolia.spc
) with a single connection named algolia
:
connection "algolia" { plugin = "algolia" app_id = "D902ND8AK3" api_key = "dba7ac3a72a41306c5b34207b9fd9d95"}
app_id
- Unique application ID, available in your Algolia settings.api_key
- API key, available in your Algolia settings.
Postgres FDW
This plugin is available as a native Postgres FDW. Unlike Steampipe CLI, which ships with an embedded Postgres server instance, the Postgres FDW can be installed in any supported Postgres database version.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_postgres_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/postgres.sh)" -- algolia
The installer will prompt you for the plugin name and version, download and install the appropriate files for your OS, system architecture, and Postgres version.
To configure the Postgres FDW, you will create an extension, foreign server, and schema and import the foreign schema.
CREATE EXTENSION IF NOT EXISTS steampipe_postgres_algolia;CREATE SERVER steampipe_algolia FOREIGN DATA WRAPPER steampipe_postgres_algolia OPTIONS (config '<your_config>');CREATE SCHEMA algolia;IMPORT FOREIGN SCHEMA algolia FROM SERVER steampipe_algolia INTO algolia;
SQLite Extension
This plugin is available as a SQLite Extension, making the tables available as SQLite virtual tables.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_sqlite_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/sqlite.sh)" -- algolia
The installer will prompt you for the plugin name, version, and destination directory. It will then determine the OS and system architecture, and it will download and install the appropriate package.
To configure the SQLite extension, load the extension module and then run the steampipe_configure_algolia
function to configure it with plugin-specific options.
$ sqlite3sqlite> .load ./steampipe_sqlite_extension_algolia.sosqlite> select steampipe_configure_algolia('<your_config>');
Export
This plugin is available as a standalone Export CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- algolia
You can pass the configuration to the command with the --config
argument:
steampipe_export_algolia --config '<your_config>' <table_name>