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

with base as (
  select
    lower(trim(shp_facility_id))  as facility_id,
    lower(trim(shp_facility_type)) as facility_type,
    upper(trim(shp_site_id))       as site_id
  from {{ source('meli_case_raw','raw_shp_facilities_ext') }}
)
select *
from base
where facility_type in ('warehouse','receiving_center')
