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 the Data Integration tutorial #25

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

mindula
Copy link
Contributor

@mindula mindula commented Oct 12, 2023

Purpose

This PR contains the implementation of the Data Integration tutorial

@mindula mindula marked this pull request as draft October 12, 2023 15:06
@mindula mindula changed the title Add the Data Integration tutorial [Draft] Add the Data Integration tutorial Oct 12, 2023
@mindula mindula marked this pull request as ready for review October 14, 2023 05:12
@mindula mindula changed the title [Draft] Add the Data Integration tutorial Add the Data Integration tutorial Oct 16, 2023
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/persist/model.bal Outdated Show resolved Hide resolved
data-integration/persist/model.bal Show resolved Hide resolved
data-integration/tests/dockerup.sh Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/tests/dockerup.sh Outdated Show resolved Hide resolved
data-integration/docker-compose.yaml Outdated Show resolved Hide resolved
data-integration/docker-compose.yaml Outdated Show resolved Hide resolved
data-integration/employees_openapi.yaml Outdated Show resolved Hide resolved
data-integration/.gitignore Outdated Show resolved Hide resolved
data-integration/Ballerina.toml Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/persist/model.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/main.bal Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/main.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Show resolved Hide resolved
Copy link
Contributor

@MaryamZi MaryamZi left a comment

Choose a reason for hiding this comment

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

The rest looks OK to me. We can proceed with creating the README/content file.

data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Outdated Show resolved Hide resolved
data-integration/tests/test.bal Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Outdated Show resolved Hide resolved
data-integration/README.md Show resolved Hide resolved
data-integration/README.md Show resolved Hide resolved
data-integration/README.md Show resolved Hide resolved

## Overview

In this tutorial, you will develop a service that accepts requests to create an employee and a task, update task status, and delete a completed task. Ballerina persistence layer is used to manage data stored in a database. The service will be used to create, retrieve, update, and delete data from the database.
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we have one sentence to introduce what we're working with? E.g., manage employees and tasks assigned to them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ballerina persistence layer -> The Ballerina persistence layer


## Overview

In this tutorial, you will develop a service that accepts requests to create an employee and a task, update task status, and delete a completed task. Ballerina persistence layer is used to manage data stored in a database. The service will be used to create, retrieve, update, and delete data from the database.
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than saying just "used to manage data stored in a database", may add value if we can frame it in terms of value it adds. e.g., convenience, abstracting out the underlying db layer


To implement this use case, you will develop a REST service with multiple resources using Visual Studio Code with the Ballerina Swan Lake extension.

Define the data model using the `bal persist` feature and generate the client objects, types, and scripts for the model. Then, define the service and implement the logic to interact with the database.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we rethink this in terms of the flow. Feels disconnected after the preceding sentence.

4. Generate the client objects, types, and scripts for the model using the following command. This will use the model defined in the `persist/model.bal` file to generate the persistence constructs in a module named `store` in a directory named `generated`.

```bash
$ bal persist generate --module store

Choose a reason for hiding this comment

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

Suggested change
$ bal persist generate --module store
$ bal persist generate

We can avoid the --module store part in this command as it is already executed in the init command above.

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.

None yet

5 participants