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

Documentation Updated for cQube-ingestion #136

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
image: timescale/timescaledb:2.0.0-pg12
restart: always
ports:
- "5432:5432"
- "8001:5432"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Revert back to original ports

volumes:
- ./pgdata:/var/lib/postgresql/data
environment:
Expand All @@ -17,7 +17,7 @@ services:
graphql-engine:
image: hasura/graphql-engine:latest
ports:
- "8080:8080"
- "8081:8080"
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert back to original port mapping.

volumes:
- ./data/migrations:/hasura-migrations
- ./data/metadata:/hasura-metadata
Expand All @@ -39,7 +39,7 @@ services:
pgpool-serv:
image: bitnami/pgpool
ports:
- 5433:5432
- 8002:5432
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert this to original port mapping.

volumes:
- ./configs/pgpool-extra.conf:/config/myconf.conf
environment:
Expand Down
26 changes: 22 additions & 4 deletions docs/01-code-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
Clone the Github repository to your local filesystem

```bash
git clone https://github.com/ChakshuGautam/cQube-POCs.git
git clone https://github.com/ChakshuGautam/cQube-ingestion.git
```

## Start Docker Instances

Change your current directory to the cloned repository

```bash
cd cQube-POCs
cd cQube-ingestion
```

Start the Docker Network and the Instances
Expand All @@ -36,7 +36,7 @@ Create the environment (`.env`) file for connecting to the `timescaledb` docker

```bash
touch .env
echo "DATABASE_URL="postgres://timescaledb:postgrespassword@localhost:5432/postgres?sslmode=disable"" > .env
echo "DATABASE_URL="postgres://timescaledb:postgrespassword@localhost:8001/postgres?sslmode=disable"" > .env
Copy link
Contributor

Choose a reason for hiding this comment

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

small suggestion, here, this should be

// incorrect wrapping of strings
"DATABASE_URL="postgres://timescaledb:postgrespassword@localhost:8001/postgres?sslmode=disable"" 

// correct command
"DATABASE_URL"="postgres://timescaledb:postgrespassword@localhost:8001/postgres?sslmode=disable" 

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix the port here as well

```

Install all the necessary `yarn` dependencies (while staying within the `impl/c-qube` folder)
Expand All @@ -50,15 +50,33 @@ You can use the build command in case you would like to build the Nest project.
```bash
yarn build
```
You can use the command cli to run the ingestion process

```bash
yarn cli ingest
```
After the process have been completed, you should have completed all the following steps \

✅ 1. The Data has been Nuked

✅ 2. Config parsing completed

✅ 3. Dimensions have been ingested

✅ 4. Event Grammars have been ingested

✅ 5. Dataset Grammars have been ingested
## Run Migrations and Set Up Database Schemas

Now that we have our yarn dependencies installed we can go ahead and run migrations to migrate our schemas to our locally running docker database instance (while staying within the `impl/c-qube` folder).

```bash
npx prisma migrate dev
```

and to generate Prisma Client, you can run the following command:
```bash
npx prisma generate
```
## Testing and Coverage

Tests can be run in order to check for breaking or unintentional changes in the code by running the following command.
Expand Down
Loading