Skip to content

DBT: Brazil Bol 2025 Gold

File location: s3://trase-storage/brazil/trade/bol/2025/gold/brazil_bol_2025_gold.parquet

DBT model name: brazil_bol_2025_gold

Explore on Metabase: Full table; summary statistics

Explore dependencies/lineage: link

Heads up — this asset has failing data tests

1 error, 1 fail. See the Data Tests tab below.


Description

Based on the cleaned version of Brazil BOL 2025 (brazil_bol_2025_silver), only including curated fields. Find where the fields come from and how they were cleaned in the fields documentation, and all the available source fields in silver version, and the vendor field glossary in google spreadsheets.


Details

Column Type Description
commodity VARCHAR
country_of_destination_economic_bloc VARCHAR
country_of_destination_label VARCHAR
country_of_destination_name VARCHAR
country_of_destination_trase_id VARCHAR
date DATE
year INTEGER
month INTEGER
exporter_cnpj VARCHAR
exporter_country_label VARCHAR
exporter_group VARCHAR
exporter_label VARCHAR
exporter_municipality_label VARCHAR
exporter_municipality_name VARCHAR
exporter_municipality_trase_id VARCHAR
exporter_name VARCHAR
exporter_node_id BIGINT
exporter_state_label VARCHAR
exporter_state_name VARCHAR
exporter_state_trase_id VARCHAR
exporter_trase_id VARCHAR
exporter_type VARCHAR
fob DOUBLE
fob_adjustment_type VARCHAR
fob_original DOUBLE
hs4 VARCHAR
hs5 VARCHAR
hs6 VARCHAR
hs6_description VARCHAR
hs8 VARCHAR
importer_group VARCHAR
importer_label VARCHAR
importer_name VARCHAR
importer_node_id BIGINT
net_weight_kg DOUBLE
net_weight_tonnes DOUBLE
port_of_export_label VARCHAR
port_of_export_name VARCHAR
port_of_import_country_label VARCHAR
port_of_import_country_name VARCHAR
port_of_import_label VARCHAR
port_of_import_name VARCHAR
mdic_bol_region_of_destination `` Destination country (country_of_destination_trase_id) mapped to a broad world region, used only to join the BOL dataset with MDIC/SECEX exports. ERROR - UNMAPPED would indicate a country missing from the shared crosswalk.
mdic_bol_port_group `` Export port (port_of_export_name) mapped to a named port group/complex, used only to join the BOL dataset with MDIC/SECEX exports. ERROR - UNMAPPED would indicate a port missing from the shared crosswalk.

Review full report including sample errors records if they exist (link)

Test column Test name Failing rows Last test run Last status Query in Metabase
Whole table test brazil_bol_2025_gold_exporter_cnpjs_exist_in_receita_federal — 2026-10-19 06:26 error 🔍 run query
importer_group brazil_bol_2025_gold_importer_group_matches_postgres_traders 1 2026-10-19 06:14 fail 🔍 run query
Whole table test brazil_bol_2025_gold_exporters_exist_in_postgres_traders — 2026-10-19 06:14 pass 🔍 run query
Whole table test brazil_bol_2025_gold_has_gavilon_before_2025_07_02_records — 2026-10-19 06:14 pass 🔍 run query
Whole table test brazil_bol_2025_gold_has_gavilon_from_2025_07_02_records — 2026-10-19 06:14 pass 🔍 run query
Whole table test brazil_bol_2025_gold_has_glencore_importadora_before_2025_07_02_records — 2026-10-19 06:14 pass 🔍 run query
Whole table test brazil_bol_2025_gold_has_glencore_importadora_from_2025_07_02_records — 2026-10-19 06:14 pass 🔍 run query
Whole table test brazil_bol_2025_gold_has_novaagri_records — 2026-10-19 06:14 pass 🔍 run query
Whole table test brazil_bol_2025_gold_importers_exist_in_postgres_traders — 2026-10-19 06:14 pass 🔍 run query
country_of_destination_economic_bloc brazil_bol_2025_gold_economic_bloc_matches_main_economic_blocs — 2026-10-19 06:14 pass 🔍 run query
exporter_group brazil_bol_2025_gold_exporter_group_matches_postgres_traders — 2026-10-19 06:14 pass 🔍 run query
exporter_group brazil_bol_2025_gold_exporters_not_in_former_groups — 2026-10-19 06:14 pass 🔍 run query
exporter_group brazil_bol_2025_gold_novaagri_exporters_are_toyota_tsusho — 2026-10-19 06:14 pass 🔍 run query
exporter_group brazil_bol_2025_gold_viterra_family_exporters_are_bunge_from_2025_07_02 — 2026-10-19 06:14 pass 🔍 run query
exporter_group brazil_bol_2025_gold_viterra_family_exporters_are_glencore_before_2025_07_02 — 2026-10-19 06:14 pass 🔍 run query
exporter_name brazil_bol_2025_gold_glencore_agriculture_exporter_is_viterra — 2026-10-19 06:14 pass 🔍 run query
exporter_name brazil_bol_2025_gold_glencore_do_brasil_exporter_name — 2026-10-19 06:14 pass 🔍 run query
exporter_name brazil_bol_2025_gold_glencore_importadora_exporter_name — 2026-10-19 06:14 pass 🔍 run query
importer_group brazil_bol_2025_gold_importers_not_in_former_groups — 2026-10-19 06:14 pass 🔍 run query
importer_group brazil_bol_2025_gold_novaagri_importers_are_toyota_tsusho — 2026-10-19 06:14 pass 🔍 run query
importer_group brazil_bol_2025_gold_viterra_family_importers_are_bunge_from_2025_07_02 — 2026-10-19 06:14 pass 🔍 run query
importer_group brazil_bol_2025_gold_viterra_family_importers_are_glencore_before_2025_07_02 — 2026-10-19 06:14 pass 🔍 run query
importer_name brazil_bol_2025_gold_glencore_agriculture_importer_is_viterra — 2026-10-19 06:14 pass 🔍 run query
mdic_bol_port_group dbt_expectations_expect_column_unique_value_count_to_be_between_brazil_bol_2025_gold_mdic_bol_port_group__40__1 — 2026-10-19 06:17 pass 🔍 run query
mdic_bol_port_group dbt_utils_expression_is_true_brazil_bol_2025_gold_mdic_bol_port_group___ERROR_UNMAPPED_ — 2026-10-19 06:19 pass 🔍 run query
mdic_bol_port_group not_null_brazil_bol_2025_gold_mdic_bol_port_group — 2026-10-19 06:22 pass 🔍 run query
mdic_bol_region_of_destination dbt_expectations_expect_column_unique_value_count_to_be_between_brazil_bol_2025_gold_mdic_bol_region_of_destination__10__1 — 2026-10-19 06:17 pass 🔍 run query
mdic_bol_region_of_destination dbt_utils_expression_is_true_brazil_bol_2025_gold_mdic_bol_region_of_destination___ERROR_UNMAPPED_ — 2026-10-19 06:19 pass 🔍 run query
mdic_bol_region_of_destination not_null_brazil_bol_2025_gold_mdic_bol_region_of_destination — 2026-10-19 06:22 pass 🔍 run query

Models

No called script or script source not found.

"""Brazil BOL 2025 Gold

Curated subset of `brazil_bol_2025_silver`, with the economic bloc of the destination resolved
against `main_economic_blocs`, plus the two MDIC-matching columns. The column list
and mapping logic are shared across years in `trase/data/brazil/trade/bol/bol_gold.py`.
"""

from trase.data.brazil.trade.bol.bol_gold import build_gold


def model(dbt, cursor):
    dbt.config(materialized="external")
    return build_gold(
        dbt.ref("brazil_bol_2025_silver").pl().lazy(),
        dbt.ref("main_economic_blocs").pl().lazy(),
    )