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


-- LOGIC
states_rename AS (

    SELECT
        states.id,
        states.country_id,
        states.name,
        states.status,
        states.deleted_at,
        states.created_at,
        states.updated_at,
        current_timestamp()                                                                              AS _dbt_ran_at

    FROM states
),


-- FINAL
final__base_exchange__states AS (

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

    FROM states_rename

) 

SELECT * FROM final__base_exchange__states