Skip to main content
Skip table of contents

SQL Request

Overview

The Workflow feature simplifies the process of requesting authorization for running queries, whether they are unathorized or require approval. Upon approval by the designated approver, the executor is granted permission to execute the approved query once and view the results.

SQL Request

Workflow > Submit Request

  1. Navigate to the Workflow tab in the top menu of the web page.

  2. Click on the Submit Request button located in the top left corner, and then select the SQL Request type.

  3. The Create SQL Request page will be displayed.

Select Approval Rule

Workflow > Submit Request > SQL Request > Approval Rule

  1. At the top of the SQL Request page, select an Approval Rule to govern the approval process.

    1. If you select Default (No Rule), users can choose their own approvers.

    2. Approvers can be automatically added to the Approvers field when an admin selects a preset approval rule..

Add approvers

Approvers can be added directly by the requester based on the approval rules set up by the admin. Click the + button in the box, and a popup will appear allowing you to add an approver.

If you've selected a approval rule that doesn't allow the requester to select an approver themselves, then the + button won't appear, and the box will be grayed out, indicating it cannot be clicked. In this case, the name of the approver set by the admin is automatically displayed.

Workflow > Submit Request > SQL Request > Assignee for Approval

  1. Condition of Approval : Select an approval condition.

    1. A single Assignee can complete the approval request : The workflow ends when one of the selected approvers approves.

    2. All Assignees must approve this request : All selected approvers must approve the request to end the workflow. (All approvals are required regardless of the order of approval.)

  2. Assignees : Select the approvers for the request.

  3. Once all approvers are selected, click the Save button in the bottom right corner of the popup to save the selections.

  4. Urgent Mode : If post-approval is allowed according to the approval rule, you can register requests with the post-approval option.

Write an SQL Execution Request

Workflow > Submit Request > SQL Request > Request Summary

  1. Title : Provide a subject for the request.

  2. Connection : Select the target database to request SQL execution.

    1. Users can only select databases they have access to at the time of the request.

  3. Database : Select the logical schema within the selected database where you want the SQL execution to occur.

  4. Content Type : Choose the content type for entering the SQL syntax.

    1. Text : Write your own queries in the Queries section within the request page.

    2. File : Upload your query as a file.

  5. Target Date : Set the date for when you want this query to run. The default selection is the day of the request.

  6. Due Date : Set the date for when the approval or execution expires. The default selection is one year from now.

  7. Comments : Provide a reason or justification for requesting to run the SQL in the designated database.

  8. Click Save to submit your SQL request.

Once your request is successfully saved and submitted, you can track your request history and approval status in the Workflow > Sent Request > In Progress section.

Run the Approved SQL Request

Workflow > Executions > To Do

Once approved, the SQL request is in a state where it can be executed.

  1. Navigate to the Workflow > Executions > To Do menu.

  2. Locate the SQL request pending execution and click on it to view its detail page.

  3. After reviewing the details of the SQL request, click the Execute button on the top right to execute it. Alternatively, you can click the Cancel button to cancel the request.

  4. After the execution is complete, you can view the success or failure status on the Results tab within the details page.

You can access the history of requests for which you are the executor in the Workflow > Received Requests > Done menu.

Notes on Running Large Queries

If you are running a large query using an SQL Request, it will continue to run in the background on the QueryPie server even if you close your web browser. To check the progress of queries running in the background:

  1. Reconnect to QueryPie after closing your web browser.

  2. Navigate to the SQL Request detail page again.

  3. You will be able to view the progress of the background query execution on the detail page. (Supported in QueryPie versions 9.15.0 and later)

Related Topics

 

Back to Workflow

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.