How to apply Row-Level Security with multiple CSV files in Bold BI?
This article explains how to combine multiple CSV files into a single data source using "Append Data" and apply Row Level Security to view the restricted data on the generic dashboard based on the logged-in users.
How to Append Data
The "Append Data" feature allows users to append selected files to an existing data source table. Currently, this functionality supports file type datasources such as Excel, JSON, CSV, and XML.
Steps to Append Data into Single Datasource
Access the Append Data IconConnect any Excel file in Bold BI. From the data preparation layer, click on the "Append data" icon.
Select the Target Table
From the dropdown menu, choose the table name where the data should be appended.File Selection:
Click the “Browse File” button to select the files you wish to append.Schema Validation:
After uploading the selected files, a schema comparison will be performed. The validation status will be updated accordingly:Single File Upload: Displays “Ready to append” status.
Multiple Files Upload: Displays “Multiple file status”.
If schema validation fails, you can delete the invalid file by clicking the Delete icon and re-upload a valid file.
Ready to Append:
Once the status shows “Ready to append”, the options to “Append” and “Save As” will be enabled.
Save As Option
- The “Save As” option allows the creation of a new data source that includes the selected files along with the existing data source data.
Click the “Save As” button, provide a new data source name, and click the “Save” button
Append Option
- To move the selected files’ data to the existing data source table, click the “Append” button
- Once the files are appended successfully, a notification will be displayed upon the completion of the append process and click the close icon to close the notification pop-up
Configuring the User-Based Filter
In Some cases, we may want to restrict certain values or provide specific values in the datasource based on the user accessing the dashboard. This can be achieved by applying a user-based filter to the datasource column that needs to be restricted
Steps to Apply the User-Based Filter
Access the User-Based Filter Icon:
To begin, click on the User-Based Filter icon. This will open a dialog for further actionsApply the User-Based Filter:
Apply a user-based filter to the same datasource column (e.g., Product) by assigning one user (e.g., User1) the product value "Nike" and another user (e.g., User2) the product value "Coca-Cola." After setting the user filters and saving the datasource, publish the dashboard
3. Different Dashboard Views Based on Logged-in User:
If User1 with product value "Nike" sees the dashboard, Dashboard will have a view like this with only Nike product values.
If User2 with product value "Coca-Cola" sees the dashboard, Dashboard will have a view like this with only Coca-Cola Product values
Using Datasource or Query Type User-Based Filter
To make the process smoother, you can use a Data Source or Query type user-based filter instead of a Manual type user-based filter
Conclusion
Combining multiple CSV files into a single datasource and applying user-based filters in Bold BI enables a tailored dashboard experience. This approach ensures that users receive relevant insights based on their specific needs. Ultimately, it enhances data management and supports informed decision-making.