Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
pixuimpou committed Jan 5, 2024
2 parents 16735db + ba5bec0 commit 6cf1668
Show file tree
Hide file tree
Showing 145 changed files with 23 additions and 9,563 deletions.
11 changes: 5 additions & 6 deletions pipelines/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ class constants(Enum): # pylint: disable=c0103
"""
Constant values for the rj_smtr projects
"""

# CONFIGS #
DOCKER_TAG = "AUTO_REPLACE_DOCKER_TAG"
DOCKER_IMAGE_NAME = "AUTO_REPLACE_DOCKER_IMAGE"
DOCKER_IMAGE = f"{DOCKER_IMAGE_NAME}:{DOCKER_TAG}"
GCS_FLOWS_BUCKET = "datario-public"

# AGENT LABELS #
RJ_SMTR_AGENT_LABEL = 'rj-smtr'
RJ_SMTR_DEV_AGENT_LABEL = 'rj-smtr-dev'
RJ_SMTR_AGENT_LABEL = "rj-smtr"
RJ_SMTR_DEV_AGENT_LABEL = "rj-smtr-dev"

# DEFAULT TIMEZONE #
TIMEZONE = "America/Sao_Paulo"

Expand All @@ -44,9 +45,7 @@ class constants(Enum): # pylint: disable=c0103
GPS_SPPO_API_BASE_URL = (
"http://ccomobility.com.br/WebServices/Binder/WSConecta/EnvioInformacoesIplan?"
)
GPS_SPPO_API_BASE_URL_V2 = (
"http://ccomobility.com.br/WebServices/Binder/wsconecta/EnvioIplan?"
)
GPS_SPPO_API_BASE_URL_V2 = "http://ccomobility.com.br/WebServices/Binder/wsconecta/EnvioIplan?"
GPS_SPPO_API_SECRET_PATH = "sppo_api"
GPS_SPPO_API_SECRET_PATH_V2 = "sppo_api_v2"

Expand Down
1 change: 1 addition & 0 deletions pipelines/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"""
Imports all flows for every project so we can register all of them.
"""
# from pipelines.br_rj_riodejaneiro_brt_gps.flows import *
from pipelines.exemplo import * # noqa
4 changes: 3 additions & 1 deletion queries/dev/run.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
# import os

from utils import run_dbt_model
import os

# Veja os parâmetros disponíveis da função run_dbt_model em util.py

Expand Down
10 changes: 6 additions & 4 deletions queries/dev/utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
import os
from datetime import datetime as dt
from datetime import timedelta
import pandas as pd

from typing import Any, Dict, List, Union
# from datetime import datetime as dt
# from datetime import timedelta
from typing import Dict, List, Union

# import pandas as pd


def run_dbt_model(
Expand Down
2 changes: 1 addition & 1 deletion queries/macros/many_to_one.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ LEFT JOIN (
ON m.{{column_name}} = n.{{column_name}}
)

SELECT
SELECT
*
FROM t
WHERE to_col is null
Expand Down
4 changes: 2 additions & 2 deletions queries/macros/one_to_one.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ ON m.{{column_name}} = n.{{column_name}}
)
SELECT *
FROM (
SELECT
SELECT
from_col,
count(to_col) ct
FROM t
GROUP BY from_col
)
)
where ct != 1
{% endtest %}
2 changes: 1 addition & 1 deletion queries/macros/unique_key.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% test unique_key(model, column_name, partition_column, combined_keys) %}
SELECT
SELECT
*
FROM (
SELECT
Expand Down
13 changes: 0 additions & 13 deletions queries/models/br_rj_riodejaneiro_bilhetagem/dicionario.sql

This file was deleted.

129 changes: 0 additions & 129 deletions queries/models/br_rj_riodejaneiro_bilhetagem/ordem_pagamento.sql

This file was deleted.

125 changes: 0 additions & 125 deletions queries/models/br_rj_riodejaneiro_bilhetagem/schema.yml

This file was deleted.

Loading

0 comments on commit 6cf1668

Please sign in to comment.