You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-5Lines changed: 42 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,26 @@
4
4
5
5
This package allows you to easily monitor and manage your BigQuery query costs, identifying costly queries in order to enhance optimizing and resource saving.
6
6
7
+
# Table of Contents
8
+
9
+
-[Before creating a branch](#Before-creating-a-branch)
-[Testing modifications in the project](#Testing-modifications-in-the-project)
19
+
7
20
## Before creating a branch
8
21
9
22
Pay attention, it is very important to know if your modification to this repository is a release (breaking changes), a feature (functionalities) or a patch(to fix bugs). With that information, create your branch name like this:
10
23
11
24
-`release/<branch-name>` or `major/<branch-name>` or `Release/<branch-name>` or `Major/<branch-name>`
12
25
-`feature/<branch-name>` or `minor/<branch-name>` with capitalised letters work as well
13
-
-`patch/<branch-name>` or `fix/<branch-name>` or `hotfix/<branch-name>` with capitalised letters work as well
26
+
-`patch/<branch-name>` or `fix/<branch-name>` or `hotfix/<branch-name>`or `bugfix/<branch-name>`with capitalised letters work as well
14
27
15
28
If branch is already made, just rename it _before passing the pull request_.
16
29
@@ -37,7 +50,7 @@ packages:
37
50
38
51
39
52
40
-
## Configuring models package
53
+
## Configuring package
41
54
42
55
The package's models can be configured in your `dbt_project.yml` by specifying the package under `models` node.
43
56
@@ -81,12 +94,10 @@ vars:
81
94
dbt_prod_monitoring_dataset: 'public_monitoring' # if you have one, add the destination dataset of your monitoring transformed data
82
95
```
83
96
84
-
## Configuring project sources
97
+
### Source
85
98
86
99
The project's sources can be configured in your `source.yml`, normally on your staging folder. Attention is needed while naming the source' schema and tables names to ensure you are matching the name BigQuery sets on the and schema and table with your source. If the names match, your package will work as expected.
87
100
88
-
### Source configuration
89
-
90
101
```yaml
91
102
version: 2
92
103
@@ -102,3 +113,29 @@ sources:
102
113
## Running the models
103
114
104
115
After setting up the package in `dbt_project.yml` and `source.yml` as the previous steps, you can now run the package with the following command line: `dbt run -s bigquery_analytics`. After running it, the 5 models of the package will materialize in your target schema as they have been configured.
116
+
117
+
## Testing modifications in the project
118
+
119
+
Inside the integration_tests folder, you can use the setup.sh to auxiliate the creation of an env and installation of requirements.txt for you.
120
+
121
+
The only commands that you need to do is:
122
+
123
+
```chmod +x setup.sh```
124
+
and
125
+
```source setup.sh```
126
+
127
+
Inside the integration_tests folder, you have the dbt_project already configured, you have profiles.yml already set to BigQuery.
128
+
To make a connection to BigQuery, so you can start testing, you should have credentials in indicium-sandbox project.
129
+
130
+
To set your credentials in your environment, you should rename the example.env:
131
+
```example.env```--> ```.env```.
132
+
133
+
You should put the name of your dataset
134
+
135
+
```dev_firstName_lastName```
136
+
137
+
and then do the command
138
+
139
+
```source .env```
140
+
141
+
Now you can use your credentials in your environment. Dbt debug it!
0 commit comments