company_users
In short
This table contains information about the users associated to a company. It allows to easily retrieve their ids, role and permissions in the data sharing.
In Pennylane, it is possible to give access to a company’s data to multiple users. Each user is associated to a role that gives them permissions to access and perform actions on the different modules and features of the application.
This table contains the list of users that have access to a company, as well as their role and their eligibility to use data sharing feature.
Filter key(s)
company_id
user_id
Sorting key
ClickHouse skips blocks only when the filter starts with this key, in this order. When the first column is `company_id`, put `company_id` in every query. Read a fleet one company at a time, or in batches of `company_id`. Do not run one query with no company filter. List only the columns you need. `SELECT *` reads columns you will not use.
company_id, id
Available columns
id
Int64
Identifier of this user on the company.
company_id
Int64
Unique ID of the company on Pennylane, referring to companies.id.
company_name
String
Company's display name on Pennylane. This name may differ from the legal registration name. This name is used for display and search in the application.
user_email
String
Email address of the user.
user_id
Int64
ID of the user in the Pennylane app. This ID is used to identify the user in the other data models.
user_first_name
String
First name of the user.
user_last_name
String
Last name of the user.
user_last_activity
Nullable(Date)
Last date of activity of the user on Pennylane. In case a user has never logged in, the value is NULL. In case a user belongs to several companies, the value is the last activity date related to any of the companies.
role
Nullable(String)
Role of the user when accessing a company. This role determines the permissions the user has in the data sharing.
Examples: "employee", "internal_accountant", "purchasing_manager"
firm_id
Nullable(Int64)
ID of the accounting firm the company belongs to. When the accounting is managed internally and not by an accounting firm, the value is NULL.
firm_name
Nullable(String)
Name of the accounting firm the company belongs to. When the accounting is managed internally and not by an accounting firm, the value is NULL.
eligible_to_datasharing
Bool
Whether this user can use Data Sharing on the company.
user_created_at
DateTime64(6, 'UTC')
Creation time of the Pennylane user.
user_updated_at
DateTime64(6, 'UTC')
Last update time of the Pennylane user.
user_invitation_sent_at
Nullable(DateTime64(6, 'UTC'))
Date and time when the invitation was sent to the user on Pennylane.
user_invitation_accepted_at
Nullable(DateTime64(6, 'UTC'))
Date and time when the user accepted the invitation on Pennylane.
synchronized_at
DateTime64(6, 'UTC')
Timestamp of the last time this row version was written in ClickHouse.