How do I pull user data from Salesforce?
This transform represents an individual user, which is anyone who logs into Salesforce (most likely a fellow employee)
with user as (
select
_fivetran_deleted,
_fivetran_synced,
account_id,
alias,
city,
company_name,
contact_id,
country,
department,
email,
first_name,
id as user_id,
individual_id,
is_active,
last_login_date,
last_name,
last_referenced_date,
last_viewed_date,
manager_id,
name as user_name,
postal_code,
profile_id,
state,
street,
title,
user_role_id,
user_type,
username
from salesforce.user
)
select *
from user
where not coalesce(_fivetran_deleted, false)
LIMIT 100