-- IMPORTS
WITH districts AS (
    SELECT * FROM {{ source('src_exchange_mysql', 'districts') }}
),


-- LOGIC
districts_rename AS (

    SELECT
        districts.id,
        districts.country_id,
        districts.state_id,
        districts.name,
        districts.postcode,
        districts.status,
        districts.deleted_at,
        districts.created_at,
        districts.updated_at,
        current_timestamp()                                                                              AS _dbt_ran_at

    FROM districts
),


-- FINAL
final__base_exchange__districts AS (

    SELECT
        id,
        country_id,
        state_id,
        name,
        postcode,
        status,
        deleted_at,
        created_at,
        updated_at,
        _dbt_ran_at

    FROM districts_rename
) 

SELECT * FROM final__base_exchange__districts