Skip to content

Commit

Permalink
add: how to add datasources on project in creating new repo
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag629 committed Oct 17, 2024
1 parent 2fda4f2 commit fb47d9e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
38 changes: 37 additions & 1 deletion new-authors-training/github/create-new-repo.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
visibility: hidden
icon: code-square
order: B
---

Expand Down Expand Up @@ -40,3 +40,39 @@ Format of the repository name: `lab-{random ID}-{project_name}`
For your SQL projects, you have to setup the `docker-compose.yml` file. You can refer to the [Available Databases](https://github.com/datawars-io-content/reference-databases-available-sql-tracks) for the list of databases available.

Check the `.yml` file in the repository and change the `docker-compose.yml` file according to the database you want to use.

> Check this document on how to find dataset from datasources playground: [Finding Datasets from Datasources Playground](http://localhost:5000/new-authors-training/your-first-project/choosing-a-dataset/)
When you select the dataset from the datasources playground, you can get the name of the database and ip address of the database from the `docker-compose.yml` file and you can include the same in the `english.md` file.

* **Data path**: Mention the path of the dataset. This is important as it helps in locating the dataset easily.

- For data files with CSV file format, the path can be mentioned as follows: **{{datasource.filesystem_path}}/"filename"**
- For databases, the ip address path can be written as follows: **{{devices_copy."Data Source".ip_address}}**
![Dataset path](/static/creating-datasets-img/image-2.png)

> Thing to consider while writing data sources path:
Here is the path to get `ip address` of devices rendered in description.
```markdown
{{devices."{Device Name}".ip_address}}
```

For Example:

1. In case device name is `Postgres Airlines demo database`, the path will be:
```markdown
{{devices."Postgres Airlines demo database".ip_address}}
```
![Data Source Path](/static/creating-datasets-img/image-10.png)

2. In case device name is `Data Source`, the path will be:
```markdown
{{devices."Data Source".ip_address}}
```
![Data Source Path](/static/creating-datasets-img/image-9.png)

Here is the explample:

- Example of `english.md`: [Querying Logical Operator with Airlines using Python](https://github.com/datawars-io-content/lab-87dg27-advance-sql-logical-operator-airlines/blob/master/english.md?plain=1#L10)
- Example of `docker-compose.yml`: [Querying Logical Operator with Airlines using Python](https://github.com/datawars-io-content/lab-87dg27-advance-sql-logical-operator-airlines/blob/master/docker-compose.yml)
2 changes: 1 addition & 1 deletion new-authors-training/github/creating-github-account.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
visibility: hidden
icon: mark-github
order: A
---
# Getting started with Github
Expand Down
2 changes: 1 addition & 1 deletion new-authors-training/github/github-actions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
icon: git-pull-request
order: 800
order: D
---

[!embed](https://www.loom.com/embed/93cb59410d554bb5acaed0582b3ef181?sid=9f35a102-5c8d-4b67-91ae-93d605180361)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
icon: project-roadmap
expanded: false
order: C
---

# Reference of Repo most important components
Expand Down
2 changes: 1 addition & 1 deletion new-authors-training/github/transforming-project.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
icon: code-square
order: 850
order: E
---


Expand Down

0 comments on commit fb47d9e

Please sign in to comment.