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


-- LOGIC
files_rename AS (

    SELECT
        files.id,
        files.document_id,
        files.file,
        files.file_type,
        files.deleted_at,
        files.created_at,
        files.updated_at,
        current_timestamp()                                                                          AS _dbt_ran_at

    FROM files

),


-- FINAL
final__base_exchange__files AS (

    SELECT
        id,
        document_id,
        file,
        file_type,
        deleted_at,
        created_at,
        updated_at,
        _dbt_ran_at

    FROM files_rename

) 

SELECT * FROM final__base_exchange__files