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
base: main
Are you sure you want to change the base?
Conversation
Data Integration
tutorialData Integration
tutorial
Data Integration
tutorialData Integration
tutorial
6833d34
to
8d0b8ad
Compare
There was a problem hiding this 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.
|
||
## 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ 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.
Purpose
This PR contains the implementation of the Data Integration tutorial