# User access

The Best Day application has specific user access requirements to ensure data integrity.

# Data sets

The data integrity setup is based on data sets (opens new window). To this end, each user needs their own data set. This data set is named with an opaque ID, and mapped to a user through a table in raw (opens new window).

A user will be unable to use the application if the following requirements are not satisfied:

  • There exists a database in raw named BEST_DAY
  • There exists a table in the BEST_DAY database named userDataSets
  • There is a row keyed by that user's email address
  • This row contains a column named dataSetExternalIdPrefix
  • There exists exactly one data set matching that external ID prefix
  • This data set is write-protected

If any of these things are false, then the user will be shown an error and they will be unable to use the application.

# Unit conversions

There must be a table defined in raw (opens new window) in order to perform unit conversions. This table must be named unitConversions and be in the BEST_DAY database. Rows in this table are expected to have the following structure:

Key unitA unitB unitC unitD
unitA ({{ value }}) ({{ value }}) * 0.123
unitB ({{ value }}) / 0.123 ({{ value }})
unitC ({{ value }}) 234 * (({{ value }}) + 123)
unitD (({{ value }}) - 123) / 234 ({{ value }})

More specifically:

  • Each row is keyed by the source unit
  • Each column is keyed by the destination unit
  • The {{ value }} placeholder will be filled in by a source unit
  • The equation should result in the correct destination unit
  • If a conversion is not applicable (eg: meters to celsius), then omit that column entirely
  • A unit being converted to itself should simply contain ({{ value }})
  • There must be at least one conversion specified
  • The {{ value }} should be wrapped in parentheses (( .. )) to guarantee order of operations

# Capabilities

It is possible to restrict access for users. However, there is a minimal set of capabilities necessary to use the application.

# Assets

  • READ - The user must be able to read assets from the asset hierarchy

# Events

  • READ - The user must be able to read event data
  • WRITE - The user must be able to write events into their specific data set

# Raw

  • READ - The user must be able to read from the following raw database / tables:
    • BEST_DAY / userDataSets
    • BEST_DAY / unitConversions

# Relationships

  • READ - The user must be able to read from relationships
  • WRITE - The user must be able to write relationships into their specific data set

# Time series

  • READ - The user must be able to read time series information
Last Updated: 2/10/2021, 4:24:42 PM