Skip to main content
Sisense Community logo
  • Community Feedback
  • Chapters
  • Events
  • Forums
    • Help and How To
    • Product Feedback Forum
    • Strategy & Use Cases
  • Blogs
  • KB Docs
    • KB Docs
    • Add-Ons & Plug-Ins
    • APIs
    • Best Practices
    • Blox
    • CDT
    • Cloud Managed Service
    • Data Models
    • Data Sources
    • Embedding Analytics
    • How-Tos & FAQs
    • Onboarding
    • PySisense
    • Security
    • Sisense Administration
    • Sisense Intelligence & AI
    • Troubleshooting
    • Widget & Dashboard Scripts
  • Support
  • Learning
    • Sisense Academy: Free Courses and Certifications
    • Official Developer Documentation
    • Official Product Documentation
    • Official Sisense Youtube Channel
    • Sisense Compose SDK Playground
  • Use Case Gallery
Loading…
   
All PostsDiscussionsBlogsIdeasQuestions
Leaderboards
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
Discussions
  • TagsChevronRightIcon
Best Practice
  • Discussion
    Eiji Ozawa
    • Knowledge Base Docs
             
    Eiji OzawaAdmin
    How to Fix Inconsistent Row-Level Data Security Rules on a Data Model in Sisense [Linux]
                     

    Introduction:  Sisense supports row-level security (RLS) rules on data models, allowing administrators to control data access at a granular level per user and user group. However, in some environments, RLS rules may be applied inconsistently — data that should be restricted is sometimes exposed, particularly when toggling field visibility in a widget. This behavior is not caused by rule conflicts, but by insufficient system resources — specifically, an undersized DataContextRulesCacheSize and limited memory allocation — which cause the security rule engine to behave unpredictably. This article explains how to resolve this issue by adjusting the relevant settings in the Configuration Manager. Step-by-Step Guide:   Check the number of existing data security rules. Self-hosted environment Run the following command: kubectl -n sisense exec -it `kubectl -n sisense get pods | grep sisense-mongodb | head -1 | awk '{print $1}' ` -- mongosh prismWebDB --eval 'db.dataContext.find().count()' Sisense Cloud environment Connect to Repository from ElastiCube data model using MongoDB connector and execute query. Use the following connection settings in the MongoDB connector. Location:  Single-Node: sisense-mongodb.sisense Multi-Node: sisense-mongodb-headless.sisense Port: 27017 Default Database: prismWebDB Authentication Mechanism: No Authentication Define the following table query: SELECT  Count(*) AS NumberOfDataSecurityRegistrations FROM   "prismWebDB"."dataContext" Preview data of the query and check the returned value Check the DataContextRulesCacheSize parameter value Log in to Sisense as a user with Admin privileges. Open Configuration Manager : Admin > Server & Hardware > System Management > Configuration Click the Logo in top left five times to open the left pane, and select Query in the left pane Check the DataContextRulesCacheSize.value parameter, the default value is 1000 Update the DataContextRulesCacheSize parameter value greater than the value obtained in Step 1 Update MemoryLimit parameter value (default: 1024m) to 2G or greater value  If you want to increase the MemoryLimit parameter more than 2G, you have to update the memory limit of the query deployment, which should be greater than Memory Limit + 1G. Save the changes and restart the relevant services. Verify that data security rules are now applied consistently across all widgets. Conclusion:  Once these configuration changes are applied, the RLS rules should be enforced reliably. Increasing the DataContextRulesCacheSize ensures the system can cache a sufficient number of data context rules without dropping or misapplying them under load. Add a disclaimer for custom solutions . Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.

    0
             
  • Blog banner
    • Embedding AnalyticsChevronRightIcon

    Styling Existing Sisense Widgets with ComposeSDK's WidgetById

                                                                             

    Styling Existing Sisense Widgets with ComposeSDK's WidgetById When embedding an existing Sisense dashboard widget in a ComposeSDK application, there are three general approaches, each with a different tradeoff between speed and how much of the widget can be changed afterward. WidgetById renders the widget directly by its dashboard and widget ID, and stays connected to the live Fusion widget definition. Building a native widget from scratch, optionally using an existing widget as a visual reference, produces a fully independent ComposeSDK widget with every data option editable, at the cost of doing that work by hand. Between those two, useGetWidgetModel paired with widgetModelTranslator pulls an existing widget's definition from Fusion and converts it into props for a native widget component, automating what would otherwise be manual recreation. This article covers the first approach, WidgetById , and specifically the large set of visual styling options it exposes through its styleOptions prop. The other two approaches are noted briefly near the end for context, not covered in depth here. WidgetById was previously named DashboardWidget . That name was deprecated in ComposeSDK 1.23.0 and removed entirely in 2.0.0, along with the matching DashboardWidgetProps and DashboardWidgetStyleOptions types, which became WidgetByIdProps and WidgetByIdStyleOptions . Anyone maintaining code or working from an older tutorial that still references DashboardWidget is working against a removed component, not a currently deprecated one, and needs to migrate. What WidgetById does and does not do WidgetById takes a dashboardOid and a widgetOid , both required, and renders that widget as it exists on the connected Fusion instance. It supports a handful of props for scoping the widget further, additional filters and highlights , a filtersMergeStrategy for how those combine with the dashboard's own filters, and callbacks like onDataPointClick for interaction, but it does not expose the widget's underlying data options. Its dimensions, measures, and chart type stay whatever they are on the Fusion dashboard. That tradeoff is what makes it fast to use and what makes the other two approaches worth knowing about for cases that need more control. Styling and visual configuration are handled through two separate props rather than one. styleOptions covers the visual styling this article focuses on, and a newer config prop covers widget behavior, such as which actions appear in the widget's header menu, described in its own section below. Styling with styleOptions The following example renders a widget and sets every field currently documented on WidgetByIdStyleOptions . import { WidgetById } from '@sisense/sdk-ui'; export function ComposeSDKWidget() { const styleOptions = { backgroundColor: 'lightblue', border: true, borderColor: 'green', cornerRadius: 'Large', shadow: 'Dark', spaceAround: 'Large', header: { hidden: false, titleAlignment: 'Center', backgroundColor: 'lightblue', titleTextColor: 'blue', }, height: 200, width: 200, }; return ( <WidgetById widgetOid="65ab8958857ff900335db870" dashboardOid="65ab8948857ff900335db86e" styleOptions={styleOptions} title="My Chart" /> ); } Each field, its type, and what it controls: backgroundColor (string, an HTML color) sets the background color of the widget itself. border (boolean) turns the widget container's border on or off. borderColor (string, an HTML color) sets that border's color, when enabled. cornerRadius ("Large", "Medium", "Small", or "None") sets the corner radius of the widget container, similar to the CSS property of the same name. shadow ("Dark", "Light", "Medium", or "None") sets the shadow level of the widget container. It only has a visible effect when spaceAround is also set to something other than "None". spaceAround ("Large", "Medium", "Small", or "None") sets the space between the widget container's edge and the chart inside it. height and width (number, in pixels) set the widget's fixed size. Left unset, the widget fills its container instead. header (object) groups the header and title styling below it. header.hidden (boolean) toggles the header and title's visibility entirely. header.titleAlignment ("Left", "Center", or "Right") sets where the title sits in the header. header.backgroundColor (string, an HTML color) sets the header's background color. header.titleTextColor (string, an HTML color) sets the title's text color. header.dividerLine (boolean) toggles a divider line between the header and the chart. header.dividerLineColor (string, an HTML color) sets that divider line's color, when visible. This is the same field set the older DashboardWidgetStyleOptions documented, with three additions since, a "None" option on cornerRadius , shadow , and spaceAround , and a "Right" option on header.titleAlignment . Nothing was removed from the older type. Beyond styling, the config prop WidgetById also accepts a config prop, of type WidgetConfig , which did not exist on the old DashboardWidget component. Where styleOptions controls appearance, config controls widget behavior, for a chart widget specifically that currently means: actions.downloadCsv.enabled and actions.downloadExcel.enabled toggle whether "Download as CSV" and "Download as Excel" appear in the widget's own header menu. header (a separate object from the one under styleOptions , this one typed as WidgetHeaderConfig ) controls which items are available in that header menu. narrative configures the widget's narrative text, where applicable. Setting id on the widget is worth doing alongside config , since the Excel download action specifically depends on it to identify the widget being exported. A note on a later change to WidgetById itself ComposeSDK 2.3.0 refactored WidgetById to apply the dashboard's own palette to it by default, and changed its return type from a plain React element to one that can also resolve asynchronously. There may be other slight changes to visual appearance by default between the new and old component. The other two approaches For a widget that needs its data options changed, not just its appearance, WidgetById is not the right tool. Two other approaches exist. Building the widget natively means constructing a ChartWidget , or the more general Widget facade component, directly, setting its chart type and data options in code, optionally using an existing Fusion widget as a visual reference while building it. The result has no ongoing connection to any Fusion widget or dashboard. useGetWidgetModel automates part of that process. It is a React hook that retrieves an existing widget's model from a connected Fusion instance, given the same dashboardOid and widgetOid used above. Its result can be converted into props for a native widget component with a function from the widgetModelTranslator namespace, such as widgetModelTranslator.toWidgetProps , then rendered with <Widget {...widgetProps} /> . This produces a fully native, editable widget without hand copying its data options, at the cost of needing that initial Fusion connection to retrieve them. Useful links WidgetById reference WidgetByIdProps reference WidgetByIdStyleOptions reference useGetWidgetModel reference ComposeSDK 2.0.0 migration guide ComposeSDK changelog

    Jeremy Friedel
    Jeremy Friedel
    0
             
  • Question
    • Help and How-ToChevronRightIcon
                     
    Create flawless pixel perfect reports on PDF, PPT and XLS directly within Sisense using Report Studio
    Ido Darnell
    Ido Darnell
    0
             
  • Blog banner
    • Embedding AnalyticsChevronRightIcon

    Debugging Web Access Token (WAT) Issues with ComposeSDK

                                                                                                                             

    Debugging Web Access Token (WAT) Issues with ComposeSDK In initial testing, developers embedding Sisense dashboards and widgets with ComposeSDK sometimes find that a Web Access Token (WAT) passed to the SisenseContextProvider component through the wat prop fails to authenticate, and dashboards or widgets do not load. This article describes the steps for isolating the cause, starting with confirming the Sisense license includes WAT at all, then working through the token's own configuration. Confirm the Sisense license includes WAT Before debugging the token itself, confirm that the WAT works directly against Fusion, outside of ComposeSDK. Some Sisense licenses do not include WAT as a feature, and a token generated on a server without WAT licensed will not work in ComposeSDK regardless of how it is configured. WAT is also incompatible with the Sisense Multitenancy feature. Test the token directly against Fusion using the following URL pattern, replacing the placeholders with the organization's Sisense URL, the generated token, and the target dashboard or widget ID: https://mysisense.com/wat/insert_your_generated_token/app/main#/dashboards/dashboard_id https://mysisense.com/wat/insert_your_generated_token/app/main#/dashboards/dashboard_id/widgets/widget_id If this URL returns an error with status code 403 and a message stating that the license is turned off, the Sisense license does not currently include WAT. The organization's Sisense account representative can discuss adding WAT to the agreement. Until WAT is added, see "Use alternative authentication when WAT is not available" below for other options to continue development and testing.

    Status Message Screenshot
    Full documentation on WAT is available on the Using Web Access Tokens page. Validate the WAT's own claims If the license includes WAT, confirm the token payload itself is correctly structured before testing in ComposeSDK. These checks apply whether the token is being tested in Fusion, other forms of embedding, or in ComposeSDK. Confirm the token is valid using the "Test Existing Token" function, described on the Using Web Access Tokens page, in the Sisense Admin panel. This runs structure, logic, and data validation together, so it can catch an invalid "sub" user, theme, or dashboard ID in a single check before working through the items below individually.
    Confirm the WAT works when tested directly against Fusion, using the URL pattern from the license section above, if this has not been tested yet. This confirms the token's claims work outside of ComposeSDK before assuming the problem is in the token itself. Confirm the "sub" claim in the token is a valid, existing user id on the server. The current logged in user's user ID can be retrieved from the browser developer console with: prism.user._id
    Prism User ID Console Command
    Confirm the user id in the "sub" claim has access to the relevant data sources. Confirm any theme id included in the token exists on the server. Theme ids can be checked with the List Themes endpoint in the REST API. As a test, try generating a token with no theme id set. Confirm the token's start and end unix timestamps are correct, and that the current unix time falls between them. The site unixtimestamp.com can be used to check this. If dashboard or widget ids are used, confirm those ids are included in the token. Remove any parameters from the WAT that are not strictly required. The number of required parameters is smaller than what default token generation includes. Confirm the secret (public key) used matches the token configuration referenced by the "kid" in the token's header. A secret from a different token configuration produces the error "Invalid public key." If the payload includes large "prm", "res", "flt", or "acl" claims, confirm their combined character count does not exceed 81,200 characters per token. This limit is rarely reached, but can occur with very large permission or filter lists. Isolate whether the failure is specific to ComposeSDK If the token work's in Fusion and other form's of Sisense embedding and passes all checks, but WAT still fails only when used through ComposeSDK, and not through Fusion, the cause is likely in the ComposeSDK application itself rather than the token. Test with a known good token, manually pasted in as a temporary replacement to any variable based structure, to confirm whether the issue is in this particular token or in the surrounding code. If testing with a dashboard id has not worked, try testing with a ComposeSDK widget defined directly in CSDK code, with no dashboard or widget ID server dependency, to rule out an ID mismatch. Test on a blank localhost page with a minimal ComposeSDK implementation, to rule out interference from other libraries in the application. Use alternative authentication when WAT is not available If the Sisense license does not include WAT, ComposeSDK development and testing can continue using other authentication methods. A viewer role user, or higher, is all that either option requires: A bearer token SSO Organizations interested in adding WAT to their license should contact their Sisense account representative.

    Jeremy Friedel
    Jeremy Friedel
    0
             
  • Blog banner
    • APIsChevronRightIcon

    Connection Tool - Programmatically Remove Unused Datasource Connections, and List All Connections

                                                                                                                                                                     

    Connection Tool - A Tool to Programmatically Remove Unused Datasource Connections, and List All Connections     Managing connections within your Sisense server can become complex over time, if there are a large number of connections, and connections are often added, and replace earlier datasource connections. In some scenarios unused connections can accumulate, potentially cluttering the Connection Manager UI with no longer relevant connections. Although unused connections typically represent minimal direct security risk, it's considered best practice to maintain a clean, organized list of connections, and in some scenarios it can be desired to remove all unused connections. Sisense prevents the deletion of connections actively used in datasources, safeguarding your dashboards and datasources from disruptions. However, inactive or "orphaned" connections remain after datasources are deleted or a connection is replaced, potentially contributing to unnecessary UI complexity in the connection manager UI. Connections can be of any type Sisense supports, common types include various SQL connections, Excel files, and CSV files, as well as many data providers, such as Big Panda. This tool can also be used to list all connections, with no automatic deletion of unused connections. Introducing the Sisense Connection Prune Tool The Sisense Connection Prune Tool is a Python-based Sisense API based tool designed to programmatically identify and delete unused connections. It generates a CSV report listing all connections and their associated datasources, streamlining your connection management process. If desired, it can automatically remove all unused connections automatically from a Sisense server.   Using the Tool, sourcing the Virtual Environment, generating the Connection CSV   CSV Output of Used Connections and Associated Datasources   CSV opened visually to view as Table, Excel and other programs and text editors can open CSV files   Sisense Connection Prune Tool README Here's the full README included with the tool: # Sisense Connection Prune Tool A command-line tool to list used data connections and prune unused Sisense connections via CSV. It allows you to generate a CSV file of all connections and their dependencies, then delete those connections if needed, after removing the connections to keep from the CSV. ## Features - **Dry Run Mode**: Simulate deletions without making any changes. - **CSV-Based Flow**: Easily inspect and list connections to remove before deletion. - **Logging**: Extensive logs if needed. - **Error Handling**: Clear and descriptive messages for issues encountered during execution. ## Usage 1. **Activate the Virtual Environment** After downloading this project folder, activate the Python virtual environment bundled with it that includes all Python dependencies. - **Windows**: `venv\Scripts\activate` - **macOS/Linux**: `source venv/bin/activate` 2. **Configure the Tool** Open the `config.yaml` file and set your Sisense server URL, bearer token, CSV file path, and log file path. For example: ```yaml server_url: "https://your.sisense.server" bearer_token: "your_bearer_token_here" dry_run: true csv_file_path: "connections.csv" log_file_path: "connection_tool.log" ``` - **server_url**: The URL of your Sisense instance. - **bearer_token**: Your Sisense API token for authentication. - **dry_run**: If set to `true`, deletions will be simulated (no real deletions). - **csv_file_path**: Where the CSV file should be created and read from. - **log_file_path**: Where log file will be stored. 3. **Run the Tool** ```bash python3 ConnectionPruneTool.py ``` You will be prompted to choose an option: 1. **Generate connection CSV** - Fetches all Sisense connections. - Immediately removes (or simulates removing, if `dry_run` is `true`) any connection with no dependencies. - Writes all remaining connections and their dependencies to the CSV file. - **Important**: Inspect the CSV file and remove lines for any connections you want to **keep**. 2. **Delete connections from CSV list** - Reads the CSV file. - Removes or simulates removing each connection still listed. - Provides a summary report of which connections were deleted or bypassed. 4. **Review the Logs** Check the file specified in `log_file_path` for a record of all actions taken or simulated if needed. This is helpful for understanding what happened during each run and diagnosing any issues. ## Example Workflow 1. **Generate CSV** ```bash python3 ConnectionPruneTool.py # Choose option 1 when prompted ``` After generation, open the CSV file and **delete rows** corresponding to any connections you want to **keep**. 2. **Delete Connections** ```bash python3 ConnectionPruneTool.py # Choose option 2 when prompted ``` The tool will read the CSV and delete the remaining listed connections (or simulate deletion, if `dry_run` is enabled). ## Notes - Unused connections are removed automatically in step 1, without a CSV step - To keep a connection, remove its line from the CSV before proceeding with deletion. - If `dry_run` is set to `true`, no actual deletions will occur, only simulated logs and printed messages. - The log file will be cleared at the start of each run, so be sure to review or archive logs (or change log file name in config), if needed. ​ This is a command-line tool to list used data connections and prune unused Sisense connections, in general and via a CSV list. It allows a user with a data admin or higher bearer token to generate a CSV file of all connections and their dependencies, then delete those connections if needed, from the remaining connections in the CSV. Example Output: Deleted unused connection: Old_DB_Connection (ID: 123abc) CSV file generated at connections.csv. It contains 25 row(s) of active connections. Please review and remove lines for connections you want to keep before running deletion step by running tool again. Remaining lines will be deleted in deletion mode. Summary Report: Total lines in CSV (active used connections): 25 Deleted Unused Connections: - Old_DB_Connection No connections were bypassed.   API Endpoints Used Retrieve connections: GET /api/v2/connections Retrieve dependencies: GET /api/v2/connections/{connection_id}/getAllDependencies Delete connection: DELETE /api/v2/connections/{connection_id} Full Code connections.py - Uses Sisense API endpoints to: Fetch all connections (GET /api/v2/connections). Retrieve datasource dependencies for a specific connection (GET /api/v2/connections/{connection_id}/getAllDependencies). Delete a specific connection (DELETE /api/v2/connections/{connection_id}).     from helperFunctions import load_config, api_get, api_delete config = load_config() headers = {"Authorization": f"Bearer {config['bearer_token']}"} base_url = config["server_url"] # Retrieve all connections from Sisense def get_all_connections(): endpoint = f"{base_url}/api/v2/connections" return api_get(endpoint, headers) # Retrieve dependencies of a specific connection def get_connection_dependencies(connection_id): endpoint = f"{base_url}/api/v2/connections/{connection_id}/getAllDependencies" return api_get(endpoint, headers) # Delete a specific connection def delete_connection(connection_id): endpoint = f"{base_url}/api/v2/connections/{connection_id}" return api_delete(endpoint, headers) helperFunctions.py - Uses the Requests library to handle API requests (GET/DELETE). Catches and logs API errors. Uses PyYAML to read the config.yaml file for configuration.     import yaml import requests import logging # Load configuration from YAML file def load_config(): with open("config.yaml", "r") as file: return yaml.safe_load(file) # Configure logging settings def setup_logging(log_file): logging.basicConfig( filename=log_file, level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s", ) # Perform a GET request with error handling def api_get(endpoint, headers): try: response = requests.get(endpoint, headers=headers, verify=False) response.raise_for_status() return response.json() except requests.RequestException as e: logging.error(f"GET request failed: {e}") print(f"Error during GET request: {e}") return None # Perform a DELETE request with error handling def api_delete(endpoint, headers): try: response = requests.delete(endpoint, headers=headers, verify=False) response.raise_for_status() return response except requests.RequestException as e: logging.error(f"DELETE request failed: {e}") print(f"Error during DELETE request: {e}") return None ConnectionPruneTool.py - Serves as the entry point for the entire tool. Implements a CLI for user interaction. Invokes connections.py and helperFunctions.py to retrieve, analyze, and optionally delete Sisense connections. Uses Pandas to build a DataFrame of connection details and writes the results to a CSV file. Reads back the CSV file to remove selected connections after manual edits. Manages logs and prints summary reports to the terminal. import pandas as pd import logging import os from connections import ( get_all_connections, get_connection_dependencies, delete_connection, ) from helperFunctions import load_config, setup_logging # Load config yaml config = load_config() setup_logging(config["log_file_path"]) # Clear log file at start open(config["log_file_path"], "w").close() dry_run = config["dry_run"] csv_path = config["csv_file_path"] def generate_connections_csv(): """ Retrieves all connections from Sisense, deletes any that have no dependencies (unless in dry_run mode), and writes the remaining used connections and their dependent data models to a CSV file. """ # Create or clear existing CSV open(csv_path, "w").close() connections = get_all_connections() if connections is None: logging.error("Failed to retrieve connections.") print("Failed to retrieve connections.") return data = [] deleted = [] bypassed = [] # Go through each connection returned from the API for conn in connections: dependencies = get_connection_dependencies(conn["oid"]) if dependencies is None: logging.warning( f"Failed to retrieve dependencies for: {conn['name']} ({conn['oid']})" ) print( f"Failed to retrieve dependencies for: {conn['name']} ({conn['oid']})" ) bypassed.append(conn["name"]) continue # If no dependencies, optionally delete the connection (not in dry-run) if not dependencies: action_msg = "[Dry Run] Would delete" if dry_run else "Deleted" log_str = ( f"{action_msg} unused connection: {conn['name']} (ID: {conn['oid']})" ) print(log_str) logging.info(log_str) if not dry_run: try: response = delete_connection(conn["oid"]) # If response is None, treat it as a failed deletion if response is None: logging.error( f"Failed to delete unused connection: {conn['name']} ({conn['oid']})." ) print( f"Error deleting unused connection: {conn['name']} ({conn['oid']})" ) bypassed.append(conn["name"]) else: deleted.append(conn["name"]) except Exception as e: logging.error( f"Exception while deleting unused connection: {conn['name']} ({conn['oid']}) - {e}" ) print( f"Error deleting unused connection: {conn['name']} ({conn['oid']})" ) bypassed.append(conn["name"]) else: # If the connection is used, add each dependency row to CSV. # Use a fallback value if 'title' or 'oid' is missing. for dep in dependencies: dep_title = dep.get( "title", "NULL TITLE Share Datasource with associated Bearer Token user to include in CSV", ) dep_oid = dep.get("oid", "NULL OID") data.append( { "Connection Name": conn["name"], "Connection ID": conn["oid"], "Elasticube/Data Model Name": dep_title, "Elasticube/Data Model ID": dep_oid, } ) # Create a DataFrame of only the used connections (with datasource dependencies) df = pd.DataFrame(data) df.to_csv(csv_path, index=False) row_count = len(df) logging.info(f"Generated CSV at {csv_path}") print( f"CSV file generated at {csv_path}. " f"It contains {row_count} row(s) of used connections.\n" "Please review and remove lines for connections you want to keep " "before running deletion step by running tool again. Remaining lines will be deleted in deletion mode." ) # Summaries for auto-deleted (unused) connections print("\nSummary Report:") print(f"Total lines in CSV (active used connections): {row_count}") if deleted: print("\nDeleted Unused Connections:") for d in deleted: print(f" - {d}") else: print("\nNo connections were deleted in this step.") if bypassed: print("\nBypassed Connections:") for b in bypassed: print(f" - {b}") else: print("\nNo connections were bypassed in this step.") def delete_connections_from_csv(): """ Reads the CSV (remaining lines after user review, removing lines for connections to keep), then deletes each connection listed. If a delete fails or returns None, the connection is logged and added to 'bypassed'. """ if not os.path.exists(csv_path): print( "CSV file does not exist. Please generate it first or fix the config path." ) return df = pd.read_csv(csv_path) deleted = [] bypassed = [] for _, row in df.iterrows(): conn_id = row["Connection ID"] conn_name = row["Connection Name"] action_msg = "[Dry Run] Would delete" if dry_run else "Deleted" log_str = f"{action_msg} connection: {conn_name} ({conn_id})" print(log_str) logging.info(log_str) if not dry_run: try: response = delete_connection(conn_id) if response is None: logging.error( f"Failed to delete connection: {conn_name} ({conn_id})" ) print(f"Error deleting connection: {conn_name} ({conn_id})") bypassed.append(conn_name) else: deleted.append(conn_name) except Exception as e: logging.error( f"Exception while deleting connection: {conn_name} ({conn_id}) - {e}" ) print(f"Error deleting connection: {conn_name} ({conn_id})") bypassed.append(conn_name) # Print summary report print("\nSummary Report:") if deleted: print("Deleted Connections:") for d in deleted: print(f" - {d}") else: print("No connections were deleted.") if bypassed: print("\nBypassed:") for b in bypassed: print(f" - {b}") else: print("No connections were bypassed.") if __name__ == "__main__": # If there is no CSV file found, select step 1 automatically if not os.path.exists(csv_path): print( "No CSV file found; defaulting to generating connections CSV. " "Correct config if CSV file name has changed." ) generate_connections_csv() else: choice = input( "Choose an option:\n" "1 - Generate connection CSV\n" "2 - Delete connections from CSV list\n" "Enter your choice (1 or 2): " ) if choice == "1": generate_connections_csv() elif choice == "2": delete_connections_from_csv() else: print("Invalid option. Please enter '1' or '2'.") Conclusion By automating the detection of inactive connections and simplifying their removal, the Sisense Connection Prune Tool reduces clutter in the Sisense server Connection Manager UI while minimizing the risk of unintentionally impacting active datasources. Whether you opt for a dry-run mode to review potential deletions in a generated CSV file, or to simply list connections, or proceed with the full removal of unused connections, this tool offers a clear, flexible, and reliable approach to keeping your connections organized. A full copy of the tool, is attached below.        

    Jeremy Friedel
    Jeremy Friedel
    4
             
    • TroubleshootingChevronRightIcon

    How to update style sheets in the branding folder for dashboards

                                                             

    How to update style sheets in the branding folder for dashboards Introduction In this article, we will address the issue of updates made to style sheets within a branding folder not reflecting on dashboards. Users often encounter this problem due to browser caching, which prevents the most updated CSS files from loading. This guide provides solutions to ensure your dashboard reflects the latest version of your style sheets. Step-by-Step Guide To resolve the issue of style changes not appearing on your dashboard, follow these steps: Clear Browser Cache: Sometimes, the browser might cache old versions of files, causing it to display outdated data. To fix this: Perform a hard refresh by pressing Ctrl + F5 (on Windows) or Cmd + Shift + R (on Mac). Additionally, manually clear your browser's cache through the browser settings to ensure that it loads the latest version of your CSS file. Rename the CSS File: If clearing the cache does not work, consider renaming your CSS file. By changing the file name (e.g., from base.css to base_v2.css ) and updating the reference in your dashboard, the browser will treat it as a new resource and fetch the latest version. Implement Cache-Busting Techniques: Another effective method is to append a query parameter to your CSS file URL. This technique forces the browser to load the latest version of the file. For instance, modify the link to: https://paragoninsgroup.sisense.com/branding/LossRuns/base.css?v=123456789 . Generate some random string each time to ensure the browser always fetches the latest file.  If you want to handle changes manually, you might want to modify the link to: https://paragoninsgroup.sisense.com/branding/LossRuns/base.css?v=2 . Increment the version number each time you make changes to ensure the browser fetches the updated file. Conclusion By following the above steps, you can ensure that changes made to style sheets in your branding folder are accurately reflected on your dashboards. Utilizing these techniques will help to overcome issues caused by browser caching and ensure your dashboard's appearance stays up-to-date. References/ Related Content How to Clear Browser Cache in Different Browsers For further assistance, please refer to the above resources or contact our support team for personalized help.

    Vicki786
    Vicki786
    0
             
    • How-Tos & FAQsChevronRightIcon

    How to create a list of users with a current role based on the usage analytics elasticube

                             

    How to create a list of users with a current role based on the usage analytics elasticube Step-by-step guide:  To get a list of the users with their roles, you can use table usage from the Usage analytics elasticube. We will need the next fields from it - email and userRole . Add these columns to your widget. In this table, you can find all the roles that these users had previously:   [ALT Text: A table displays two columns: email and userRole. User roles vary as Viewer, Data Designer, datadesigner, and Designer. Emails are redacted with red lines.] To minimize the response to the last userRole, let's go to the Data - elasticube Usage Analytics , open the table usage table, and create a Custom Column .   [ALT Text: Interface with a list of data fields on the left and a drop-down menu on the right. Arrows highlight "trackingId" and "Add Custom Column."]   Name it - rank_date_ids We will use the function RankCompetitionDesc ( https://docs.sisense.com/main/SisenseLinux/mathematical-functions.htm ) Our query for this column will look like this: RankCompetitionDesc( email, [timeStamp] ) Press the Save button and Build the Elasticube. [ALT Text: Screenshot showing a code editor with a function titled "RankCompetitionDesc" using parameters like email and timestamp. A blue "Save" button is highlighted.] Go to the dashboard and edit our widget. Add a filter for a column rank_date_ids = 1 [ALT Text:  "Screenshot of a filter menu in a usage analytics model interface. A drop-down list is open, displaying numbers 1 to 6. The number 1 is selected. Options to select all or clear all are visible. The interface displays 'Apply' and 'Cancel' buttons below."] As a result, we will get the current user roles for every user.   [ALT Text: A table with two columns, "email" and "userRole." Emails are redacted. Roles listed are "Viewer" and "Data Designer," alternating between rows.] Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.  

    OleksandrB
    OleksandrB
    0
             
    • Sisense AdministrationChevronRightIcon

    How to make a dashboard as the first page of the analytics tab

                                     

    Introduction:  How to add the dashboard/site as the first page of the Analytics tab with the help of the Branding. Step-by-step guide:  Create a dashboard based on the BLOX, for example Share this dashboard with the group Everyone Press 3 dots on the top right of the dashboard, select Embed code, and select the following checkboxes on the float window [ALT Text: The image shows the "Embed Dashboard" settings for a Sisense dashboard. It includes options to customize the embed settings, such as toggling the right panel, left panel, toolbar, and header. The URL code at the bottom updates based on the selected options. The unchecked options suggest that the embed link is being customized to hide specific UI elements in the embedded dashboard.] Copy the URL Code Paste it to the Admin - App configuration - White labeling - Analytics & Data Main pages  -  Analytics Home Page or  Admin - Server & Hardware - Management - Configuration - Branding - Home Page  (Be sure that toggle Enable Branding is enabled) Press the Save button to save the changes Check with a user who has Viewer permission To add the site, you should just paste the URL of the site into the Home Page field. Just remember that, based on the security, that site should allow use if with Iframe from other domains - X-Frame-Options: ALLOW-FROM origin ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Frame-Options ) Sisense Docs 

    OleksandrB
    OleksandrB
    0
             
    • TroubleshootingChevronRightIcon

    Resolving Build Failures Due to Memory Issues [Safe-Mode]

                             

    This is the guide of which settings should be checked and adjusted to resolve the problem and prevent future occurrences, in cases when cubes fail with the error ‘Safe-mode’. Please follow the steps below, and after that try to re-build the failed cubes. Steps to Address the Issue 1. Review the Failed Cube Check the Failed Elasticubes : Please review recently failed cubes to understand which build was affected by the safe mode. If you made any recent changes that might affect the RAM consumption, you can try to revert them and re-trigger the build. 2. Adjust Build Parameters To reduce memory usage during builds, consider modifying the following settings: a. Reduce Max Concurrent Builds Why? Lowering the number of builds that run simultaneously decreases the strain on server memory. How to Do It: Navigate to your Build Settings (Admin → Server&Hardware → Sytem Management → Configuration → 5 clicks on Sisense logo → Build) . Locate the MaxNumberOfConcurrentBuilds option. Decrease the number to a lower value (e.g., from 20 to 3). [ALT Text: The settings menu within the app is highlighted, drawing attention to the selected feature for easy access.] b. Decrease Base Table Max Threads Why? Using fewer threads reduces memory consumption per build, though builds may take longer. How to Do It: Go to the  Build Settings (Admin → Server&Hardware → Sytem Management → Configuration → Build ) Find the Base Table Max Threads setting. Adjust it to a lower number (e.g., from 4 to 1). [ALT Text:  Cloudflare dashboard settings page displaying various configuration options and features for user management and security.] c. Verify Max RAM Setting in the Data Group Why? Ensuring the Max RAM is set correctly prevents the server from overusing memory or entering Safe Mode by mistake. How to Do It: Go to Admin → Server&Hardware → Data Groups. Edit the Data Group settings that correspond to the problematic build. Check the Max RAM value under the  Build Node section. Adjust it if necessary to align with your server's capacity.   [ALT Text: Settings page displaying configuration options for the RAM module, including speed, capacity, and voltage settings.] d. Enable "Stop When Idle" in the Data Group Why? Automatically stopping unused cubes frees up memory for active processes. How to Do It: Go to Admin → Server&Hardware → Data Groups. In the Data Group settings, find the Stop When Idle option. Enable this feature to stop cubes when they're not in use. [ALT Text: Edit data group option displayed in the data group wizard interface, allowing users to modify existing data groups.] 3. Consider Scaling Server Resources If the above adjustments don't resolve the issue, it might be time to enhance your server resources. Next Steps: Reach out to your Customer Success Manager (CSM) to discuss options. Need Assistance? If you have questions or need help with any of these steps, please don't hesitate to contact our support team through the ticket. We're here to support you!  

    nataliia_kh
    nataliia_kh
    0
             
    • TroubleshootingChevronRightIcon

    Resolving Missing Parse Option in SQL DB Connection

                             

    Resolving Missing Parse Option in SQL DB Connection This article addresses the issue of the missing "Parse" option when connecting to an SQL database in Sisense. Users may encounter this problem when attempting to parse data from SQL DB connections. This guide will explain why the "Parse" option might be unavailable and provide steps to resolve the issue. Instructions The "Parse" option is unavailable when all selected tables in your SQL DB connection are base tables. This option becomes accessible only when custom import queries are used. 1. To enable the "Parse" option, ensure that you are using custom import queries rather than selecting only base tables. Review your SQL queries and modify them to include custom queries if necessary. 2. Ensure that your SQL user permissions are correctly configured to allow for custom queries 3. After making changes to your queries and permissions, test the connection again to verify that the "Parse" option is now available. Conclusion The "Parse" option in Sisense is only available when custom import queries are used. By ensuring that your SQL connection utilizes custom queries and that your user permissions are correctly configured, you can resolve the issue the missing "Parse" option.

    nataliia_kh
    nataliia_kh
    0