select
    'VEHICLE' as entity_type,
    cast(vi.ID as varchar(128)) as source_entity_id,
    vi.VIN as source_external_key,
    vi.VIN as display_name,
    cast(case when vi.IsActive = 1 then 1 else 0 end as bit) as active,
    cast(null as datetime) as valid_from,
    cast(null as datetime) as valid_to,
    cast(null as datetime) as source_updated_at,
    vi.ID as vehicle_identification_id,
    vi.VIN as vin,
    vi.CostCenter as cost_center,
    vi.ID_FileLog as file_log_id,
    vi.BillingDate as billing_date,
    vi.Mobile as mobile,
    vi.Email as email,
    vi.GrossVehicleMass as gross_vehicle_mass,
    vi.VehicleType_ID as vehicle_type_id,
    vi.FirstDrivingTime as first_driving_time,
    vi.LastDrivingTime as last_driving_time,
    vi.LastOdoEnd as last_odo_end,
    vi.LastOdoEndTime as last_odo_end_time,
    vi.LastDriver_ID as last_driver_id,
    vi.LastDriverTime as last_driver_time,
    vi.LastFileLog_ID as last_file_log_id,
    vi.IsDigital as is_digital,
    vi.IsAnalog as is_analog
from dbo.VehicleIdentification vi
