select
    'DRIVER_CARD' as entity_type,
    cast(d.id as varchar(128)) as source_entity_id,
    concat('YELLOWFOX:', left(trim(d.drivers_card), 14)) as source_external_key,
    left(trim(d.drivers_card), 14) as display_name,
    true as active,
    null::timestamptz as valid_from,
    null::timestamptz as valid_to,
    null::timestamptz as source_updated_at,
    d.id as driver_id,
    left(trim(d.drivers_card), 14) as card_number,
    'UNKNOWN' as card_nation,
    d.fleet_id as fleet_id
from data.driver d
where nullif(trim(d.drivers_card), '') is not null;
