Skip to content

Commit

Permalink
Add cassandra to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
seddonm1 committed Jul 17, 2019
1 parent 012b0cc commit 0bc1f52
Show file tree
Hide file tree
Showing 17 changed files with 5,399 additions and 5,380 deletions.
29 changes: 29 additions & 0 deletions docs-src/content/execute/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ type: blog

`*Execute` stages are used to execute arbitrary commands against external systems such as Databases and APIs.

## CassandraExecute
##### Since: 2.0.0 - Supports Streaming: False
{{< note title="Plugin" >}}
The `CassandraExecute` is provided by the https://github.com/tripl-ai/arc-cassandra-pipeline-plugin package.
{{</note>}}

The `CassandraExecute` executes a CQL statement against an external [Cassandra](https://cassandra.apache.org/) cluster.

### Parameters

| Attribute | Type | Required | Description |
|-----------|------|----------|-------------|
|name|String|true|{{< readfile file="/content/partials/fields/stageName.md" markdown="true" >}}|
|environments|Array[String]|true|{{< readfile file="/content/partials/fields/environments.md" markdown="true" >}}|
|inputURI|URI|true|URI of the input file containing the CQL statement.|
|authentication|Map[String, String]|false|{{< readfile file="/content/partials/fields/authentication.md" markdown="true" >}}|
|description|String|false|{{< readfile file="/content/partials/fields/description.md" markdown="true" >}}|
|params|Map[String, String]|false|{{< readfile file="/content/partials/fields/params.md" markdown="true" >}}. Any parameters provided will be added to the Cassandra connection object.|
|sqlParams|Map[String, String]|false|{{< readfile file="/content/partials/fields/sqlParams.md" markdown="true" >}}|

### Examples

#### Minimal
{{< readfile file="/resources/docs_resources_plugins/CassandraExecuteMin" highlight="json" >}}

#### Complete
{{< readfile file="/resources/docs_resources_plugins/CassandraExecuteComplete" highlight="json" >}}


## HTTPExecute
##### Since: 1.0.0 - Supports Streaming: False

Expand Down
32 changes: 32 additions & 0 deletions docs-src/content/extract/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,38 @@ The `BytesExtract` stage reads one or more binary files and returns a `DataFrame
{{< readfile file="/resources/docs_resources/BytesExtractComplete" highlight="json" >}}


## CassandraExtract
##### Since: 2.0.0 - Supports Streaming: False
{{< note title="Plugin" >}}
The `CassandraExtract` is provided by the https://github.com/tripl-ai/arc-cassandra-pipeline-plugin package.
{{</note>}}

The `CassandraExtract` reads directly from a [Cassandra](https://cassandra.apache.org/) cluster and returns a `DataFrame`.

### Parameters

| Attribute | Type | Required | Description |
|-----------|------|----------|-------------|
|name|String|true|{{< readfile file="/content/partials/fields/stageName.md" markdown="true" >}}|
|environments|Array[String]|true|{{< readfile file="/content/partials/fields/environments.md" markdown="true" >}}|
|keyspace|String|true|The name of the Cassandra keyspace to extract from.|
|table|String|true|The name of the Cassandra table to extract from.|
|outputView|String|true|{{< readfile file="/content/partials/fields/outputView.md" markdown="true" >}}|
|description|String|false|{{< readfile file="/content/partials/fields/description.md" markdown="true" >}}|
|numPartitions|Integer|false|{{< readfile file="/content/partials/fields/numPartitions.md" markdown="true" >}} This also determines the maximum number of concurrent JDBC connections.|
|params|Map[String, String]|false|{{< readfile file="/content/partials/fields/params.md" markdown="true" >}}. Any parameters provided will be added to the Cassandra connection object.|
|partitionBy|Array[String]|false|{{< readfile file="/content/partials/fields/partitionBy.md" markdown="true" >}}|
|persist|Boolean|false|{{< readfile file="/content/partials/fields/persist.md" markdown="true" >}}|

### Examples

#### Minimal
{{< readfile file="/resources/docs_resources_plugins/CassandraExtractMin" highlight="json" >}}

#### Complete
{{< readfile file="/resources/docs_resources_plugins/CassandraExtractComplete" highlight="json" >}}


## DeltaLakeExtract
##### Since: 2.0.0 - Supports Streaming: True
{{< note title="Plugin" >}}
Expand Down
32 changes: 32 additions & 0 deletions docs-src/content/load/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,38 @@ The `AvroLoad` writes an input `DataFrame` to a target [Apache Avro](https://avr
{{< readfile file="/resources/docs_resources/AvroLoadComplete" highlight="json" >}}


## CassandraLoad
##### Since: 2.0.0 - Supports Streaming: False
{{< note title="Plugin" >}}
The `CassandraLoad` is provided by the https://github.com/tripl-ai/arc-cassandra-pipeline-plugin package.
{{</note>}}

The `CassandraLoad` writes an input `DataFrame` to a target [Cassandra](https://cassandra.apache.org/) cluster.

### Parameters

| Attribute | Type | Required | Description |
|-----------|------|----------|-------------|
|name|String|true|{{< readfile file="/content/partials/fields/stageName.md" markdown="true" >}}|
|environments|Array[String]|true|{{< readfile file="/content/partials/fields/environments.md" markdown="true" >}}|
|inputView|String|true|{{< readfile file="/content/partials/fields/inputView.md" markdown="true" >}}|
|keyspace|String|true|The name of the Cassandra keyspace to write to.|
|table|String|true|The name of the Cassandra table to write to.|
|description|String|false|{{< readfile file="/content/partials/fields/description.md" markdown="true" >}}|
|numPartitions|Integer|false|{{< readfile file="/content/partials/fields/numPartitions.md" markdown="true" >}} This also determines the maximum number of concurrent JDBC connections.|
|params|Map[String, String]|false|{{< readfile file="/content/partials/fields/params.md" markdown="true" >}}. Any parameters provided will be added to the Cassandra connection object.|
|partitionBy|Array[String]|false|{{< readfile file="/content/partials/fields/partitionBy.md" markdown="true" >}}|
|saveMode|String|false|{{< readfile file="/content/partials/fields/saveMode.md" markdown="true" >}}|

### Examples

#### Minimal
{{< readfile file="/resources/docs_resources_plugins/CassandraLoadMin" highlight="json" >}}

#### Complete
{{< readfile file="/resources/docs_resources_plugins/CassandraLoadComplete" highlight="json" >}}


## ConsoleLoad
##### Since: 1.2.0 - Supports Streaming: True

Expand Down
15 changes: 15 additions & 0 deletions docs-src/resources/docs_resources_plugins/CassandraExecuteComplete
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "CassandraExecute",
"name": "create table",
"environments": [
"production",
"test"
],
"inputURI": "hdfs://datalake/sql/create_table.cql",
"params": {
"spark.cassandra.connection.host": "cassandra"
},
"sqlParams": {
"keyspace": ${ETL_CONF_ENVIRONMENT}
}
}
15 changes: 15 additions & 0 deletions docs-src/resources/docs_resources_plugins/CassandraExecuteMin
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": ".=CassandraExecute",
"name": "create table",
"environments": [
"production",
"test"
],
"inputURI": "hdfs://datalake/sql/create_table.cql",
"params": {
"spark.cassandra.connection.host": "cassandra"
},
"sqlParams": {
"keyspace": ${ETL_CONF_ENVIRONMENT}
}
}
19 changes: 19 additions & 0 deletions docs-src/resources/docs_resources_plugins/CassandraExtractComplete
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "CassandraExtract",
"name": "read",
"environments": [
"production",
"test"
],
"keyspace": "default",
"table": "customer",
"outputView": "customer",
"params": {
"spark.cassandra.connection.host": "cassandra"
},
"numPartitions": 10,
"partitionBy": [
"country"
],
"persist": true
}
11 changes: 11 additions & 0 deletions docs-src/resources/docs_resources_plugins/CassandraExtractMin
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "CassandraExtract",
"name": "read",
"environments": [
"production",
"test"
],
"keyspace": "default",
"table": "customer",
"outputView": "customer"
}
21 changes: 21 additions & 0 deletions docs-src/resources/docs_resources_plugins/CassandraLoadComplete
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "CassandraLoad",
"name": "write",
"environments": [
"production",
"test"
],
"inputView": "customer",
"keyspace": "default",
"table": "customer"
"saveMode": "Overwrite",
"params": {
"confirm.truncate": "true",
"spark.cassandra.connection.host": "cassandra"
},
"numPartitions": 10,
"partitionBy": [
"country"
],
"saveMode": "Overwrite"
}
11 changes: 11 additions & 0 deletions docs-src/resources/docs_resources_plugins/CassandraLoadMin
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "CassandraLoad",
"name": "write",
"environments": [
"production",
"test"
],
"inputView": "customer",
"keyspace": "default",
"table": "customer"
}
Loading

0 comments on commit 0bc1f52

Please sign in to comment.