Unlock the Power of Personalized Analytics with User Attribute Functions
As companies increasingly rely on data analytics to make informed decisions and gain a competitive edge, the challenge of presenting relevant and secure data to end users has become even more critical. This is where Tableau Embedded Analytics comes into play, enabling businesses to seamlessly integrate data visualizations into their applications, products, or services. However, ensuring that the right data is presented to the right users is a complex task.
Tableau is introducing two new user functions that allow developers and admins to pass any user attributes at runtime within the embedding authentication flow, providing end-users with a personalized and secure analytical experience.
What are user attribute functions?
User attribute functions are user functions that return values based on information about users passed by the JSON Web Token (JWT) of a connected app. You can define user attributes as custom claims in the token to identify any facet of a user that is relevant for determining the context of the embedded analytics. Typical string claims could include device type, login location, time zone, and claims in arrays like group memberships or countries—which are accessible with USERATTRIBUTE and USERATTRIBUTEINCLUDES, respectively.
What problem do UAFs solve?
User attribute functions enable you to provide data security and personalized user experiences at scale.
Row Level Security allows you to limit access to specific rows of data, which allows you to deploy a single dashboard that can be used by each of your customers. Before UAFs, you had to set up entitlement tables, which elevate the risk of exposing too much data, as entitlement tables are kept outside of your system and can degrade dashboard performance. Now, you can achieve the same level of data security without the entitlement table, by determining what the user can see through user attributes in the JWT.
Imagine you build a web application for a hospital that shows patient data using embedded Tableau visualizations. Not every hospital employee should have access to the data of every patient across all departments. A nurse should only be allowed to see their patients, while the CEO of the hospital only needs to see the aggregated data from all locations.
You can utilize user attributes functions to pass attributes from your application or identity provider to Tableau to manage which patients' records are accessible by different hospital staff members.
Personalized user experiences
Companies that offer a personalized and intuitive user experience can increase end-user adoption of analytics in their apps— leading to higher engagement, customer satisfaction, and revenue. User attributes are a game-changer for personalizing embedded Tableau experiences and maximizing the value of your data analytics.
Let’s take a look at the hospital web application scenario again. The CEO and the nurse may want to work with the same data (e.g. room capacity), but you want to give them different analytical experiences. With user attribute functions, you can create personalized experiences without creating multiple workbooks. Let’s dig into some examples.
You’ve created a beautiful dashboard showing the capacity of hospital beds at different levels: location, department, and room. The CEO wants a high-level overview at the location level with the ability to drill down to data at the department level. Meanwhile, the nurse only wants to see the data at the department and room levels. To achieve this flow for the CEO, you will need to hide the zone in the dashboard that shows the worksheet at the room level, based on the value of a calculated field to retrieve the user attribute. With UAF if you pass the “role”, (e.g. CEO or nurse) of the current user as a JWT User Attribute, you can create a calculated field that hides the location/department level zone when the current user’s role is “nurse”.
Showing or hiding dashboard zones isn’t the only personalization that you can deliver with user attribute functions. You can also localize and globalize your visualizations to appeal to a worldwide audience. For example, you can translate the labels on the axis with a simple translation table containing the different labels in the languages that you want to support. In this example, use English, Spanish, and Dutch. You can then use a calculation to find the correct translation for your label.
The last use case demonstrates how you can change the measures in your visualization dynamically based on the value of a User Attribute. For example, in your hospital web application, you could provide the end-user with the option to show the data in numbers or percentages.
Try User Attribute Functions
Ready to start working with User Attribute Functions to see what they can accomplish for you? Check out the tutorial.
You can also sign up for the Developer Program to get access to additional tutorials, webinars, and your own sandbox.