Skip to main content

Using secrets

Secrets are key/value pairs that are stored in a secure storage. Secrets can be used to store sensitive information, which can then be used in RQL code.

The key of a secret is of type string. The value of a secret is also of type string.

Creating secrets

Secrets are created in the Adminstration Console. Like all credentials, they are associated with a single repository. Refer to the Administration Console Reference Guide for more information.

Accessing secrets

Secrets can be accessed using the built-in function SECRET.

For example, let's assumed we want to read a CSV file, but we do not want its location visible in the RAW SQL source code.

In this case, we can create a secret with the following values:

  • Key: CSV_URL
  • Value: https://top-secret-location/file.csv

We could then use it from RAW SQL code as: