|
1 |
| -<p align="center"> |
2 |
| - <h1 align="center">Steampipe SQLite Extension</h1> |
3 |
| -</p> |
| 1 | +# Steampipe SQLite |
4 | 2 |
|
5 |
| -<p align="center"> |
6 |
| - <a aria-label="Steampipe logo" href="https://steampipe.io"> |
7 |
| - <img src="https://steampipe.io/images/steampipe_logo_wordmark_padding.svg" height="28"> |
8 |
| - </a> |
9 |
| -</p> |
| 3 | +A family of SQLite extensions, each derived from a [Steampipe plugin](https://hub.steampipe.io/plugins), that fetch data from cloud services and APIs. |
10 | 4 |
|
11 |
| -## Overview |
| 5 | +## Getting Started |
12 | 6 |
|
13 |
| -The `Steampipe SQLite Extension library` is a `SQLite3` extension that wraps [Steampipe](https://steampipe.io) plugins to interface with SQLite. |
| 7 | +You can use an installer that enables you to choose a plugin and download the SQLite extension for that plugin. |
14 | 8 |
|
15 |
| -See the [Writing Plugins](https://steampipe.io/docs/develop/writing-plugins) guide to get started writing Steampipe plugins. |
| 9 | +[Installation guide →](https://steampipe.io/docs/steampipe_sqlite/install) |
16 | 10 |
|
17 |
| -## Building an extension |
| 11 | +## Examples |
18 | 12 |
|
19 |
| -If you want to build the extension for a single plugin, follow these steps. This process allows you to build the SQLite extension specifically for one particular plugin, rather than for Steampipe. |
| 13 | +### Select EC2 instances |
20 | 14 |
|
21 |
| -Make sure that you have the following installed in your system: |
22 |
| -1. `go` |
23 |
| -1. `make` (you will also need to ensure `CGO` is enabled) |
24 |
| - |
25 |
| -Steps: |
26 |
| -1. Clone this repository onto your system |
27 |
| -1. Change to the cloned directory |
28 |
| -1. Run the following commands: |
29 |
| -```shell |
30 |
| -make build plugin="<plugin short name>" plugin_github_url="<plugin repo github URL>" |
| 15 | +```sql |
| 16 | +select * from aws_ec2_instance; |
31 | 17 | ```
|
32 |
| -Replace <plugin short name> with the alias or short name of your plugin and <plugin repo GitHub URL> with the GitHub URL of the plugin's repository, for example: github.com/turbot/steampipe-plugin-csv. |
33 | 18 |
|
34 |
| -This command will compile an extension specifically for the chosen plugin generating a binary `steampipe-sqlite-extension-<plugin short name>.so`. |
| 19 | +### Filter to running instances |
35 | 20 |
|
36 |
| -This can be loaded into your `sqlite` instance using a command similar to: |
37 |
| -```shell |
38 |
| -.load /path/to/steampipe-sqlite-extension-<plugin short name>.so |
| 21 | +```sql |
| 22 | +select * from aws_ec2_instance |
| 23 | +where instance_state='running'; |
39 | 24 | ```
|
40 | 25 |
|
41 |
| -### Example: |
| 26 | +### Select a subset of columns |
42 | 27 |
|
43 |
| -In order to build an extension wrapping the `AWS` [plugin](https://github.com/turbot/steampipe-plugin-aws). You would run the following command: |
44 |
| -```shell |
45 |
| -make build plugin_alias="aws" plugin_github_url="github.com/turbot/steampipe-plugin-aws" |
| 28 | +```sql |
| 29 | +select arn, instance_state from aws_ec2_instance |
| 30 | +where instance_state='running'; |
46 | 31 | ```
|
47 | 32 |
|
48 |
| -## Get involved |
| 33 | +### Limit results |
| 34 | + |
| 35 | +```sql |
| 36 | +select arn, instance_state from aws_ec2_instance |
| 37 | +where instance_state='running' |
| 38 | +limit 10; |
| 39 | +``` |
| 40 | +## Developing |
49 | 41 |
|
50 |
| -### Community |
| 42 | +To build an extension, use the provided `Makefile`. For example, to build the AWS extension, run the following command. The built extension lands in your current directory. |
51 | 43 |
|
52 |
| -The Steampipe community can be found on [Slack](https://turbot.com/community/join), where you can ask questions, voice ideas, and share your projects. |
| 44 | +```bash |
| 45 | +make build plugin=aws |
| 46 | +``` |
53 | 47 |
|
54 |
| -Our [Code of Conduct](https://github.com/turbot/steampipe/blob/main/CODE_OF_CONDUCT.md) applies to all Steampipe community channels. |
| 48 | +## Open Source & Contributing |
55 | 49 |
|
56 |
| -### Contributing |
| 50 | +This repository is published under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license. Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you! |
57 | 51 |
|
58 |
| -Please see [CONTRIBUTING.md](https://github.com/turbot/steampipe/blob/main/CONTRIBUTING.md). |
| 52 | +[Steampipe](https://steampipe.io) is a product produced exclusively by [Turbot HQ, Inc](https://turbot.com). It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source). |
59 | 53 |
|
0 commit comments