Managing Live Dynamic Connections
  • 23 Jun 2022
  • 4 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Managing Live Dynamic Connections

  • Dark
    Light
  • PDF

Sisense supports dynamic parameters, enabling Admins and Data Admins to manage a single Live data source where the parameter values for the connection depend on the user. Dynamic parameters are resolved when the query runs. For example, you can create one Live data model with a single dashboard, but different users - with their own parameter definitions - see only the results they have permission to view. This is useful when you have row-level or column-level security on a Live data source, and for those who want to create one Live data model and share it with customers so that each customer has access to the data they need.

Note:

User parameters is only supported for Live data models.

Example Use Cases

  • You manage your customers’ data on different Snowflake or Redshift databases or schemas.
  • You're controlling your data source workload management, such as Snowflake warehouse, to define different workloads and compute resources for your users and groups.

To create user parameters and assign values:

  1. From the Admin tab, select User Parameters.

  2. Click + Add Parameter.

    image.png

    In this view you can also edit and delete User Parameters.

  3. Enter the required information:
    User_AddParam.png

    • Parameter Name: The system name or unique identifier.

      Note:

      It isn’t recommended to rename an existing parameter because it could break existing connections and you’ll need to manually update all connections.

    • Parameter Display Name: A user-friendly name to be displayed in Sisense.

      Note:

      For connections, you'll see the parameter name, not the display name.

    • Field Type: Select either “string” or “number”.

      Note:

      If the assigned value doesn’t match the selected field type, it can still be saved. A notification appears informing you of the field type mismatch.

    • Hide Values: To hide the parameter value you want to protect, select Yes. This is useful for sensitive data, like passwords. Hidden values are masked so users don’t see the actual value. The hidden value is encrypted.

      Note:

      Once you select Yes for a parameter value, it can’t be changed.

    • Applicable Areas: Currently, “Connections” is the only supported area.

    • Description: Describe what the parameter is for.

  4. Click Next.

  5. Assign the values to be used for the connection:

    • Default Value: Use if user or group values weren’t defined

      Note:

      Sisense recommends that you always set a default value.

    • Group Values: Assign the values to a group.

    • User Values: Assign the values to a Sisense user.

    Individual user values always override group-level and default values. Group-level values override the default value. On the group level, if a user belongs to multiple groups, the group’s value with higher priority applies, as follows:

    • In Sisense: The priority is defined by the position of the group in the list of groups.
    • In the API: The priority is set by the “priority” field. If there is a conflict (that is, a user belongs to two or more groups with the same priority), the value of the user parameter for the group whose name comes first alphabetically is used.

    In this view, you can also edit and delete assigned values.

  6. Click Save and Close to save the parameter.

To apply User Parameters in a Live connection:

  1. Create a connection to a Live data source.

    • Select the Live data source with the user parameters showing. The user parameters are automatically entered into the connection field.
    • Select the Live data source without the user parameters showing. You can then select the user parameters manually for each connection field.
      image.png
  2. On each field, click to view available parameters and their values. Select the appropriate one.
    image.png

    You can also manually add parameters using special syntax:

    • Delimiters: { { } }
    • Identifier: Parameter name

    You can combine multiple parameters in one string, and you can combine a parameter with plain text. You can also add a parameter as part of a string. For example:
    jdbc:snowflake://<connection string>/?warehouse={{warehouse}}

    image.png

  3. In the Default Database field, if you have a dynamic database, add it here. For more information about dynamic databases, see below.

  4. Click Next and connect to the data source.

The data that you see in the dashboard depends on your permissions and connection settings.

All management for functionality for parameters is available in the API api/v1/user-parameters. For more information about this API, see sisense.dev.

Optional Dynamic Settings

The following are the optional dynamic settings per Live provider:

  • Redshift: Location (using full string, endpoint, port, and database), user name, password, and default database
  • Snowflake: Connection string (using full JDBC string, Snowflake domain, warehouse and database), user name, and password
  • BigQuery: Project ID, and Service Account
  • MemSQL: Location, user name, and password
  • MySQL: Location, user name, and password
  • PostgreSQL: Location, user name, password, and default database
  • MS SQL/Synapse: Location, user name, password, and default database
  • Oracle: Location, user name, password, and by type (including: service ID, port, service name, TNS_ADMIN path, network alias, and URL connection string)

Dynamic Database

Dynamic databases enable the user to be taken directly to the database defined. This means that the user doesn’t have to select a database when creating a connection.

You can assign different values to users so that one Live model serves many customers who have databases with the same logical schema.

You can apply a dynamic database via the “Default Database” field for:

  • Redshift
  • MS SQL
  • Azure Synapse
  • PostgreSQL
  • Snowflake

Once the database is defined, the user is limited to a single database and cannot change databases.


Was this article helpful?