Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation #4

Merged
merged 8 commits into from
Jan 24, 2025
Merged

Conversation

chathushkaayash
Copy link
Contributor

@chathushkaayash chathushkaayash commented Jan 21, 2025

Purpose

Part of: #7446

Add documentation related to redshift data API connector with examples

@@ -0,0 +1,14 @@
[package]
org = "sample"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
org = "sample"
org = "wso2"

Comment on lines +10 to +14
[[dependency]]
org="ballerinax"
name="aws.redshiftdata"
version="0.1.0"
repository="local"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove this.

Comment on lines +14 to +19
### Usage Options

The Redshift Data Ballerina Connector can be used in two ways:

1. **Redshift Cluster**: Connect directly to a provisioned Amazon Redshift cluster.
2. **Serverless Mode**: Leverage the serverless capabilities of the Redshift Data API, which is particularly suited for applications that need to scale dynamically without managing infrastructure.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not this be included as a subsection in the setup guide on how to retrieve connection configs for cluster or a serverless workgroup ?

1. **Redshift Cluster**: Connect directly to a provisioned Amazon Redshift cluster.
2. **Serverless Mode**: Leverage the serverless capabilities of the Redshift Data API, which is particularly suited for applications that need to scale dynamically without managing infrastructure.

## Setup guide: Cluster
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be Setup guide, there can be subsection like Cluster configurations. Please sync all the documentation.

Suggested change
## Setup guide: Cluster
## Setup guide
### Option 1: Cluster based setup


1. In the AWS Management Console, search for Redshift in the services search bar.
1. Click on Amazon Redshift.
![create-cluster-1.png](/docs/setup/resources/create-cluster-1.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather doing this lets add the complete URL for the image. Please check the other places as well.

Suggested change
![create-cluster-1.png](/docs/setup/resources/create-cluster-1.png)
![create-cluster-1.png](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-aws.redshiftdata/main/docs/setup/resources/create-cluster-1.png)

configurable string secretAccessKey = ?;
configurable redshiftdata:Cluster dbAccessConfig = ?;

redshiftdata:Client redshift = check new (region = "us-east-2",
Copy link

@Nuvindu Nuvindu Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for other places as well.

Suggested change
redshiftdata:Client redshift = check new (region = "us-east-2",
redshiftdata:Client redshiftdata = check new (region = redshiftdata:US_EAST_2,

README.md Outdated Show resolved Hide resolved

## Examples

The `aws.redshiftdata` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](/examples).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `aws.redshiftdata` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](/examples).
The `aws.redshiftdata` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-aws.redshiftdata/tree/main/examples).


```bash
bal run
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add examples to Package.md and Module.md files

Comment on lines +10 to +14
[[dependency]]
org="ballerinax"
name="aws.redshiftdata"
version="0.1.0"
repository="local"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[[dependency]]
org="ballerinax"
name="aws.redshiftdata"
version="0.1.0"
repository="local"

while (i < 10) {
redshiftdata:DescriptionResponse|redshiftdata:Error describeStatementResponse =
redshift->describeStatement(statementId);
if (describeStatementResponse is redshiftdata:Error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (describeStatementResponse is redshiftdata:Error) {
if describeStatementResponse is redshiftdata:Error {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for other places

isolated function waitForDescribeStatementCompletion(redshiftdata:Client redshift, string statementId)
returns redshiftdata:DescriptionResponse|redshiftdata:Error {
int i = 0;
while (i < 10) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while (i < 10) {
while i < 10 {

@ayeshLK
Copy link
Member

ayeshLK commented Jan 24, 2025

We will merge this PR for the time-being and will address the review comments along with the feedback received during the connector review.

@ayeshLK ayeshLK merged commit 2983fe3 into ballerina-platform:main Jan 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants