Skip to content

Commit

Permalink
proofread fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsmyth committed Oct 22, 2024
1 parent e04d241 commit f0140e3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/build/mod-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ variable "mandatory_tag_keys" {
}
```

If a variable does not define a `default`, the user will be prompted for its value when flowpipe starts. If a variable defines a `default`, the user is not prompted and the default value is used if the variable is not explicitly set.
If a variable does not define a `default`, the user will be prompted for its value when Flowpipe starts. If a variable defines a `default`, the user is not prompted and the default value is used if the variable is not explicitly set.

You may also provide a `description` of the variable. The description helps to provide information about the intent and format of the variable to the user of the mod. The description is included when the user is prompted for a variable's value.

Expand Down
2 changes: 1 addition & 1 deletion docs/flowpipe-hcl/pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ step "http" "whos_in_space" {
| `description` | String | A description of the parameter.
| `enum` | Set | A set of allowed values for the param; no other values are allowed.
| `tags` | Map | A map of key:value metadata for the benchmark, used to categorize, search, and filter. The structure is up to the mod author and varies by benchmark and provider.
| `type` | String | The data type of the parameter: a primitive type `string`, `number`, `bool`, `connection`, `connection.{type}`, `notifier`, or a collection type `list()`, `map()`, or `any` (default `any`).
| `type` | String | The data type of the parameter. This may be a primitive type (`string`, `number`, `bool`, `connection`, `connection.{type}`, `notifier`), or a collection type (`list()`, `map()`) or `any` (default `any`).

----

Expand Down
30 changes: 15 additions & 15 deletions docs/flowpipe-hcl/step/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pipeline "enabled_regions" {
| -----------| ------ | --------- | ----------------------------------------------------
| `sql` | String | Required | A SQL query string.
| `args` | List | Optional | A list of arguments to pass to the query.
| `database` | String | Optional | A connection string used to connect to the database. If not set, the default set in the [mod `database`](/docs/flowpipe-hcl/mod) will be used. The `database` may be a connection reference (`connection.steampipe.default`), a connection string (`postgres://[email protected]:9193/steampipe`), or a Pipes workspace (`acme/anvils`).
| `database` | String | Optional | The database to query. This may be a connection reference (`connection.steampipe.default`), a connection string (`postgres://[email protected]:9193/steampipe`), or a Pipes workspace (`acme/anvils`). If not set, the default set in the [mod `database`](/docs/flowpipe-hcl/mod) will be used.

This step also supports the [common step arguments](/docs/flowpipe-hcl/step#common-step-arguments) and [attributes](/docs/flowpipe-hcl/step#common-step-attributes-read-only).

Expand Down Expand Up @@ -255,29 +255,29 @@ database = "duckdb://my_ducks.db"

### MySQL Query

The MySQL connection string supports the syntax of the [GO SQL driver for MySQL](https://github.com/go-sql-driver/mysql?tab=readme-ov-file#examples):

You can use a [MySQL connection](/docs/reference/config-files/connection/mysql) to connect to a MySQL database:

```hcl
pipeline "mysql_query" {
step "query" "step_1" {
database = connection.mysql.default
sql = "select host, user from user;"
}
}
```

Or pass a connection string directly. The MySQL connection string supports the syntax of the [GO SQL driver for MySQL](https://github.com/go-sql-driver/mysql?tab=readme-ov-file#examples):

```bash
mysql://[user[:password]@]network-location[:port][/dbname][?param1=value1&...]
```

```hcl
pipeline "mysql_query" {
step "query" "step_1" {
database = "mysql://root:my_pass@tcp(localhost)/mysql"
sql = <<EOQ
select
host,
user
from
user;
EOQ
}
output "results" {
value = step.query.step_1.rows
sql = "select host, user from user;"
}
}
```
2 changes: 1 addition & 1 deletion docs/reference/config-files/connection/duckdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ connection "duckdb" "duckdb_connection" {
| `filename` | String | Optional | Path to a DuckDB database file to open. The filename is relative to the [mod location](/docs/run#mod-location)


All arguments are optional, and a `postgres` connection with no arguments will behave the same as the [default connection](#default-connection).
All arguments are optional, and a `duckdb` connection with no arguments will behave the same as the [default connection](#default-connection).

## Attributes (Read-Only)

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/config-files/connection/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ connection "sqlite" "sqlite_connection" {
|------------|---------|----------|-------------------
| `filename` | String | Optional | Path to a SQLite database file to open. The filename is relative to the [mod location](/docs/run#mod-location)

All arguments are optional, and a `postgres` connection with no arguments will behave the same as the [default connection](#default-connection).
All arguments are optional, and a `sqlite` connection with no arguments will behave the same as the [default connection](#default-connection).


## Attributes (Read-Only)
Expand Down
3 changes: 1 addition & 2 deletions docs/run/connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ sidebar_label: Connections

# Managing Connections

Flowpipe **Connections** provide a mechanism for defining and sharing secrets in your Flowpipe environment.

Flowpipe **Connections** provide a mechanism for defining credentials and options for interacting with external systems.

## Defining / Declaring Connections
`connection` is a top-level resource in a config file (.fpc). Connections are defined in configuration files (`.fpc`), NOT mod files (`.fp`). Like `workspace`, a `connection` can be defined in any .fpc file in the config directory (`~/.flowpipe/config/*.fpc`) or in the root of the `mod-location` (usually `$PWD/*.fpc`).
Expand Down

0 comments on commit f0140e3

Please sign in to comment.