Skip to content

Commit

Permalink
Add configuration for addressing Redshift servers
Browse files Browse the repository at this point in the history
Adds clusterIdentifier, host, port and endpoint to give more options for
addressing a Redshift output port.

Add documentation and examples to README.
  • Loading branch information
jon-ruckwood committed Oct 3, 2024
1 parent ef41312 commit 98e7099
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The public API SHOULD NOT be considered stable.
- Trino support
- Field `type: map` support with properties `keys` and `values`
- Definitions: `fields`, for type `object`, `record`, and `struct`
- Add Redshift server properties `clusterIdentifier`, `endpoint`, `host` and `port`.

## [0.9.3] - 2024-03-06

Expand Down
51 changes: 45 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,51 @@ servers:
#### Redshift Server Object
| Field | Type | Description |
|----------|----------|-------------|
| type | `string` | `redshift` |
| account | `string` | |
| database | `string` | |
| schema | `string` | |
| Field | Type | Description |
|-------------------|----------|---------------------------------------------------------------------------------------------------------------------|
| type | `string` | `redshift` |
| account | `string` | |
| database | `string` | |
| schema | `string` | |
| clusterIdentifier | `string` | Identifier of the cluster. <br /> Example: `analytics-cluster` |
| host | `string` | Host of the cluster. <br /> Example: `analytics-cluster.example.eu-west-1.redshift.amazonaws.com` |
| port | `number` | Port of the cluster. <br /> Example: `5439` |
| endpoint | `string` | Endpoint of the cluster <br /> Example: `analytics-cluster.example.eu-west-1.redshift.amazonaws.com:5439/analytics` |

Example, specifying an endpoint:

```yaml
servers:
analytics:
type: redshift
schema: analytics
endpoint: analytics-cluster.example.eu-west-1.redshift.amazonaws.com:5439/analytics
```

Example, specifying the cluster identifier:

```yaml
servers:
analytics:
type: redshift
account: '123456789012'
clusterIdentifier: analytics-cluster
database: analytics
port: 5439
schema: analytics
```

Example, specifying the cluster host:

```yaml
servers:
analytics:
type: redshift
host: analytics-cluster.example.eu-west-1.redshift.amazonaws.com
database: analytics
port: 5439
schema: analytics
```

#### Azure Server Object

Expand Down
32 changes: 31 additions & 1 deletion datacontract.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,21 +272,51 @@
"type": "string",
"description": "An optional string describing the server."
},
"host": {
"type": "string",
"description": "An optional string describing the host name."
},
"database": {
"type": "string",
"description": "An optional string describing the server."
},
"schema": {
"type": "string",
"description": "An optional string describing the server."
},
"clusterIdentifier": {
"type": "string",
"description": "An optional string describing the cluster's identifier.",
"examples": [
"redshift-prod-eu",
"analytics-cluster"
]
},
"port": {
"type": "integer",
"description": "An optional string describing the cluster's port.",
"examples": [
5439
]
},
"endpoint": {
"type": "string",
"description": "An optional string describing the cluster's endpoint.",
"examples": [
"analytics-cluster.example.eu-west-1.redshift.amazonaws.com:5439/analytics"
]
}
},
"additionalProperties": true,
"required": [
"type",
"account",
"host",
"database",
"schema"
"schema",
"clusterIdentifier",
"port",
"endpoint"
]
},
{
Expand Down

0 comments on commit 98e7099

Please sign in to comment.