Ledger Table Policy
Overview
Administrators can configure ledger settings for individual tables within a database using the Ledger Table Policy menu, applying specific rules when users interact with these ledger tables.
The Ledger Table Policy is available only when the relevant license is activated. For assistance in enabling this feature, please contact QueryPie's customer support team.
Mapping Approval Rules to Ledger Tables
Supported vendors for ledger table management include MySQL, MongoDB, Oracle, and MariaDB.
You can create policies on a per-DB connection basis and map approval rules to tables that you want to manage as a ledger within the connection. After configuring this, when a user attempts to execute modification queries (such as UPDATE) or export data on those tables, the SQL request can be processed through the corresponding approval rules.

Administrator > Databases > Ledger Management > Ledger Table Policy
Navigate to the Administrator > Databases > Ledger Management > Ledger Table Policy menu.
Click the
Create Policy
button in the upper right corner.Enter the following information:
Target Connection: Select the connection containing the table to which the policy will apply.
Target Databases: Choose the database(s) containing the table(s) to be managed. Multiple databases can be selected simultaneously.
Click the
Save
button to save the policy.
Once saved, the policy will appear in the Ledger Table Policy list at the connection level.

Administrator > Databases > Ledger Management > Ledger Table Policy > Details
Admins can navigate to the details page of the created policy to configure ledger table approval rules.
Click the
Add Rule
button located in the center-right of the page.Select the ledger table from the list.
Choose the workflow approval rule to be applied when executing DML queries on the selected ledger table.
Approval rules can be configured separately in the Ledger Approval Rules menu.
To enforce the input of a reason for data retrieval, set the SELECT Purpose field to Required (the default value is Required).
To enforce the input of a reason for data export, set the Export Purpose field to Required (the default value is Not Required).
Click
Ok
to finalize and add the rule.