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

WITH src_hosts AS(
    SELECT *
    FROM {{ ref('src_hosts') }}
)
SELECT
    host_id,
    COALESCE(
        host_name,
        'Anonymous'
    ) AS host_name,
    CASE
        WHEN flag_is_superhost = 't' THEN true
        WHEN flag_is_superhost = 'f' THEN false
    END::bool AS flag_is_superhost,
    created_at,
    updated_at
FROM
    src_hosts