SlicingDice Documentation

SlicingDice - The All-in-One Solution Documentation

Welcome to the SlicingDice documentation. You'll find comprehensive guides and documentation to help you start working with SlicingDice as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

10. Custom Database Keys

Custom Database Keys Overview

A Custom Database Key is a key that can be configured to only execute operations in allowed columns, accessible from certain IPs/domains, and more.

Control Panel guide

This guide will follow the Control Panel approach. If you want to know more about managing Custom Database Keys via API, please check the Custom Database Key via API documentation.

Custom database key explained by video

Watch this quick video below to learn how to create a custom database key, or go to the text explanation right below.

Custom Database Key Explained by text

Besides the read, write and master Database keys, SlicingDice allows the creation of custom database keys, which can be configured to allow inserting and querying only over specific columns from a database.
For example, you can create a custom database key allowed to work with the columns visited-pages, age and gender, but forbidden to query username and address. You can create as many custom database keys as you need.

A custom database key can be one of three levels, described in the table below.

Type of custom database key
What the custom database key allows

Read-Write

Allows to insert and query data, as well as create, execute, update and delete saved queries that use allowed columns only.

Write-Only

Allows inserting data only to the allowed columns.

Read-Only

Allows querying and editing saved queries that use only the allowed columns.

The table below explains what are the fields that you'll need to fullfill on control panel:

Field
Requirements of the field

Database Key Name

The name of the custom key that you'll create. Up to 1000 characters. required.

Database Key Permission Level

The type of custom database key. Can be 'read', 'write' or 'Read & Write'.
Details about each one in the previous table. required

Database Key Description

The description of the custom key that you'll create. Up to 1,000 characters.

Columns Whitelist

Restrict any operation done with this key to selected columns. If this field is left empty, any column of the database will be accessible to the custom database key.

IP Addresses Whitelist

Restricts any operation done with this key to defined IPs. If this field is left empty, any IP addresses will be able to make operations with this custom database key.

Filter

Force every query done with this custom database key to put a condition, configured by the creator of the custom database key.

Filter compatibility

The filter only works with queries, because it establishes conditions. The filter will not be applied in insertion commands.


Filter

A "filter" will define a condition to be applied in all queries that use a given custom key. It can be configured by the user and only restricts queries, not inserts.

For example, if your dataset has stores in several countries and you want to show for a specific manager only the data from users from United States, you can define a simple query that will be applied in all queries using this custom database key.
So all queries will be automatically filtered in every query they'll be made with this custom key.
If you think the filter like SQL, the filter will be included in the WHERE clause.

For the filter parameter, only some queries are supported, and you can see all of them in the table below.

Type of Query
Supported

Equals
Not Equals
Between
Range
Greater than
Greater than or equal
Less than
Less than or equal
Starts with
Ends with

Minfreq