diff --git a/docs/query/batch-query.md b/docs/query/batch-query.md index ee4cafe..8f30dfe 100644 --- a/docs/query/batch-query.md +++ b/docs/query/batch-query.md @@ -93,47 +93,3 @@ vpc-0bf2ca1f6a9319eea|172.16.0.0/16|available vpc-9d7ae1e7|172.31.0.0/16|available vpc-0de60777fdfd2ebc7|10.66.8.0/22|available ``` - - -## Named Queries -Steampipe also allows you to run **named queries** defined in [mods](mods/overview). - -Creating your own named queries is simple. First, you need to create a mod for your queries: - -```bash -mkdir my-queries -``` - -By default, Steampipe looks for mods in the current directory, though you can specify a different directory with the `-mod-location` argument. Lets change to that directory and initialize the mod: - -```bash -cd my-queries -steampipe mod init -``` - -Steampipe will create a **query** object for every `.sql` file in your mod directory, though you can also define [query](reference/mod-resources/query) resources using HCL in `.sp` files if you prefer. - -If you have not done so already, create the `s3_versioning_disabled.sql` file from the previous example in your mod folder. - -You can now run your query by name in an interactive session or from from command line. - - Start the interactive query shell: -```bash -steampipe query -``` - -You can run your query by name: -```sql -query.s3_versioning_disabled -``` - -Your saved queries even show up in the auto-complete list, making them easier to find and recall! - -You can even run the named query in batch mode: -```bash -steampipe query "query.s3_versioning_disabled" -``` - -Steampipe makes it easy to build a library of custom queries that you can effortlessly recall and re-use! - -