{{ config(materialized='view') }}

-- Mapeia prefixo do código da instalação (ex.: BRRC01 -> "BR") para SITE_ID
with map as (
  select 'AR' as country_prefix, 'MLA' as site_id union all
  select 'BR' as country_prefix, 'MLB' as site_id union all
  select 'CL' as country_prefix, 'MLC' as site_id union all
  select 'CO' as country_prefix, 'MCO' as site_id union all
  select 'MX' as country_prefix, 'MLM' as site_id union all
  select 'PE' as country_prefix, 'MPE' as site_id union all
  select 'US' as country_prefix, 'UNKNOWN' as site_id
)
select country_prefix, site_id
from map
