LookML Development Practices
This document outlines the best practices for developing LookML models in the Data Team. #TODO review the practices with team
Naming Conventions
Measures:
- Use
number_prefix for count measures- Example:
number_of_users,number_of_transactions
- Example:
- Use
total_prefix for sum measures- Example:
total_amount,total_revenue
- Example:
Template Code for Common Links
User ID Link
Attempt ID Link
link: {
label: "Open in Hydra - KYC Attempt"
url: "https://hydra.majority.com/kyc/{{ view_name.user_id._value | url_encode }}/{{ value | url_encode }}"
}
Entity Token - Documents Tab Link
link: {
label: "Open in Alloy - Document"
url: "https://app.alloy.co/entities/{{ value }}/?tab=documents"
}
Adding a New Model
When adding a new model to Looker, complete these two configuration steps:
1. Configure Project Connection
- Go to Develop > Projects
- You'll see the new project is not configured
- Click Configure
- Save the
bq_majorityconnection
2. Update User Roles
- Go to Admin > Users > Roles
- Add the new model to the appropriate roles
- Typically add to
majority_userrole for standard users - Admins automatically have access to all models