Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 4, 2024
2 parents 93c3cc4 + f3367cc commit 5155296
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pipelines/taxirio/races/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ def generate_pipeline(start: datetime, end: datetime) -> list[dict[str, Any]]:
"billing_associatedCorporative_externalPropertyPassenger": {
"$toString": "$billing.associatedCorporative.externalPropertyPassenger",
},
"billing_finalPrice_totalToPay": "$billing.finalPrice.totalToPay",
"billing_finalPrice_totalPriceToll": "$billing.finalPrice.totalPriceToll",
"billing_finalPrice_totalWithDiscount": "$billing.finalPrice.totalWithDiscount",
"billing_finalPrice_totalDiscount": "$billing.finalPrice.totalDiscount",
"billing_finalPrice_totalWithoutDiscount": "$billing.finalPrice.totalWithoutDiscount",
"billing_finalPrice_totalByTaximeter": "$billing.finalPrice.totalByTaximeter",
"billing_finalPrice_totalByStoppedTime": "$billing.finalPrice.totalByStoppedTime",
"billing_finalPrice_totalByKm": "$billing.finalPrice.totalByKm",
"billing_finalPrice_minPrice": "$billing.finalPrice.minPrice",
"status": 1,
"routeOriginDestination_distance_text": "$routeOriginDestination.distance.text",
"routeOriginDestination_distance_value": {"$toString": "$routeOriginDestination.distance.value"},
Expand Down Expand Up @@ -74,5 +83,14 @@ def generate_pipeline(start: datetime, end: datetime) -> list[dict[str, Any]]:
"billing_associatedMinimumFare": string(),
"billing_associatedDiscount": string(),
"billing_associatedCorporative_externalPropertyPassenger": string(),
"billing_finalPrice_totalToPay": string(),
"billing_finalPrice_totalPriceToll": string(),
"billing_finalPrice_totalWithDiscount": string(),
"billing_finalPrice_totalDiscount": string(),
"billing_finalPrice_totalWithoutDiscount": string(),
"billing_finalPrice_totalByTaximeter": string(),
"billing_finalPrice_totalByStoppedTime": string(),
"billing_finalPrice_totalByKm": string(),
"billing_finalPrice_minPrice": string(),
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,33 @@ SELECT
SAFE_CAST (billing_associatedTaximeter as STRING) as id_taximetro_associado,
SAFE_CAST (billing_associatedMinimumFare as STRING) as id_tarifa_minima_associada,
SAFE_CAST (billing_associatedDiscount as STRING) as id_desconto_associado,
SAFE_CAST (
REPLACE (billing_finalPrice_totalToPay, ',', '.') as FLOAT64
) as valor_total_a_pagar,
SAFE_CAST (
REPLACE (billing_finalPrice_totalPriceToll, ',', '.') as FLOAT64
) as valor_total_pedagio,
SAFE_CAST (
REPLACE (billing_finalPrice_totalWithDiscount, ',', '.') as FLOAT64
) as valor_total_com_desconto,
SAFE_CAST (
REPLACE (billing_finalPrice_totalDiscount, ',', '.') as FLOAT64
) as valor_total_desconto,
SAFE_CAST (
REPLACE (billing_finalPrice_totalWithoutDiscount, ',', '.') as FLOAT64
) as valor_total_sem_desconto,
SAFE_CAST (
REPLACE (billing_finalPrice_totalByTaximeter, ',', '.') as FLOAT64
) as valor_total_por_taximetro,
SAFE_CAST (
REPLACE (billing_finalPrice_totalByStoppedTime, ',', '.') as FLOAT64
) as valor_total_por_tempo_parado,
SAFE_CAST (
REPLACE (billing_finalPrice_totalByKm, ',', '.') as FLOAT64
) as valor_total_por_km,
SAFE_CAST (
REPLACE (billing_finalPrice_minPrice, ',', '.') as FLOAT64
) as valor_minimo,
SAFE_CAST (
billing_associatedCorporative_externalPropertyPassenger as BOOL
) as propriedade_corporativa,
Expand Down

0 comments on commit 5155296

Please sign in to comment.