Skip to content

Commit

Permalink
Merge branch '360-build-connections-jsonschema-and-use-it-in-schemast…
Browse files Browse the repository at this point in the history
…ore-catalog' of https://github.com/datayoga-io/datayoga into 360-build-connections-jsonschema-and-use-it-in-schemastore-catalog
  • Loading branch information
spicy-sauce committed Mar 13, 2024
2 parents ec80231 + c48839e commit 9bba89b
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/reference/blocks/cassandra_write.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Write into a Cassandra data store

|Name|Type|Description|Required|
|----|----|-----------|--------|
|**connection**<br/>(The connection to use for loading)|`string`|Logical connection name as defined in the connections.yaml<br/>|yes|
|**connection**<br/>(The connection to use for loading)|`string`|Logical connection name as defined in the connections.dy.yaml<br/>|yes|
|**keyspace**|`string`|Keyspace<br/>|yes|
|**table**<br/>(The target table name)|`string`|Target table name<br/>|yes|
|[**keys**](#keys)<br/>(Business keys)|`array`||yes|
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/blocks/http_write.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Write data using an HTTP request

|Name|Type|Description|Required|
|----|----|-----------|--------|
|**connection**<br/>(The connection to use for the HTTP request)|`string`|Logical connection name as defined in the connections.yaml<br/>|yes|
|**connection**<br/>(The connection to use for the HTTP request)|`string`|Logical connection name as defined in the connections.dy.yaml<br/>|yes|
|**endpoint**|||yes|
|**method**<br/>(HTTP Method)|`string`|HTTP method to be used for the request<br/>Enum: `"GET"`, `"PUT"`, `"POST"`, `"DELETE"`<br/>|yes|
|[**payload**](#payload)<br/>(Request Payload)|`object`|Data to be sent in the request body<br/>|no|
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/blocks/relational_read.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Read a table from an SQL-compatible data store

|Name|Type|Description|Required|
|----|----|-----------|--------|
|**connection**<br/>(The connection to use for loading)|`string`|Logical connection name as defined in the connections.yaml<br/>|yes|
|**schema**<br/>(The table schema of the table)|`string`|If left blank, the default schema of this connection will be used as defined in the connections.yaml<br/>|no|
|**connection**<br/>(The connection to use for loading)|`string`|Logical connection name as defined in the connections.dy.yaml<br/>|yes|
|**schema**<br/>(The table schema of the table)|`string`|If left blank, the default schema of this connection will be used as defined in the connections.dy.yaml<br/>|no|
|**table**<br/>(The table name)|`string`|Table name<br/>|yes|
|[**columns**](#columns)<br/>(Optional subset of columns to load)|`array`||no|

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/blocks/relational_write.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Write into a SQL-compatible data store

|Name|Type|Description|Required|
|----|----|-----------|--------|
|**connection**<br/>(The connection to use for loading)|`string`|Logical connection name as defined in the connections.yaml<br/>|yes|
|**connection**<br/>(The connection to use for loading)|`string`|Logical connection name as defined in the connections.dy.yaml<br/>|yes|
|**schema**<br/>(The table schema of the target table)|`string`|If not specified, no specific schema will be used when connecting to the database.<br/>|no|
|**table**<br/>(The target table name)|`string`|Target table name<br/>|yes|
|[**keys**](#keys)<br/>(Business keys to use in case of \`load\_strategy\` is UPSERT or working with \`opcode\_field\`)|`array`||no|
Expand Down
48 changes: 45 additions & 3 deletions docs/reference/connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,54 @@ Connection catalog
<a name=""></a>
### \.: object

**Required Properties:**

* type

**IF** object

* has properties, where<br/>property **type**
* is `cassandra` or
* is `mysql` or
* is `postgresql` or
* is `sqlserver`

**THEN**


**Properties**

|Name|Type|Description|Required|
|----|----|-----------|--------|
|**type**|`string`|Connection type<br/>Enum: `"cassandra"`, `"db2"`, `"http"`, `"mysql"`, `"postgresql"`, `"redis"`, `"sqlserver"`<br/>|yes|
|**if**|||no|
|**then**|||no|
|**driver**|`string`|Explicit driver to use, if not using default<br/>||
|[**connect\_args**](#thenconnect_args)|`object`|Additional arguments to use when connecting to the DB<br/>||
|[**query\_args**](#thenquery_args)|`object`|Additional query string arguments to use when connecting to the DB<br/>||
|**debug**<br/>(Debug mode)|`boolean`|Echo all SQL commands to stdout<br/>Default: `false`<br/>||

**Example**

```yaml
connect_args: {}
query_args: {}
debug: false

```
<a name="thenconnect_args"></a>
##### \.\.then\.connect\_args: object
Additional arguments to use when connecting to the DB
**No properties.**
<a name="thenquery_args"></a>
##### \.\.then\.query\_args: object
Additional query string arguments to use when connecting to the DB
**No properties.**
10 changes: 5 additions & 5 deletions schemas/job.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"connection": {
"type": "string",
"title": "The connection to use for the HTTP request",
"description": "Logical connection name as defined in the connections.yaml",
"description": "Logical connection name as defined in the connections.dy.yaml",
"examples": ["api_connection", "external_service"]
},
"endpoint": {
Expand Down Expand Up @@ -750,7 +750,7 @@
"connection": {
"type": "string",
"title": "The connection to use for loading",
"description": "Logical connection name as defined in the connections.yaml",
"description": "Logical connection name as defined in the connections.dy.yaml",
"examples": ["europe_db", "target", "eu_dwh"]
},
"schema": {
Expand Down Expand Up @@ -861,13 +861,13 @@
"connection": {
"type": "string",
"title": "The connection to use for loading",
"description": "Logical connection name as defined in the connections.yaml",
"description": "Logical connection name as defined in the connections.dy.yaml",
"examples": ["europe_db", "target", "eu_dwh"]
},
"schema": {
"type": "string",
"title": "The table schema of the table",
"description": "If left blank, the default schema of this connection will be used as defined in the connections.yaml",
"description": "If left blank, the default schema of this connection will be used as defined in the connections.dy.yaml",
"examples": ["dbo"]
},
"table": {
Expand Down Expand Up @@ -1279,7 +1279,7 @@
"connection": {
"type": "string",
"title": "The connection to use for loading",
"description": "Logical connection name as defined in the connections.yaml",
"description": "Logical connection name as defined in the connections.dy.yaml",
"examples": ["europe_db", "target", "eu_dwh"]
},
"keyspace": {
Expand Down

0 comments on commit 9bba89b

Please sign in to comment.