Skip to content

Guide

Scheduled SQL exports for private databases

scheduled SQL exports / private databases / agent

Schedule CSV or Excel exports from private databases without opening database access to the internet. Taavik runs exports through an on-premise agent.

Scheduled exports are easy when the database is public. They are harder when the database sits behind a firewall, inside a customer network, or inside a regulated environment.

Taavik keeps the database private by running SQL through an on-premise agent. The cloud coordinates the schedule, but the database connection stays inside your network.

For the full product view, see scheduled SQL exports and the security model.

The private database problem

Most teams do not want a hosted reporting tool to connect directly to production databases. Even when firewall rules can be opened, the risk profile is uncomfortable.

Private databases usually need a different model:

  • credentials stay local.
  • the database is not exposed to the public internet.
  • execution happens from inside the network.
  • the result crosses the boundary only when the user runs or schedules it.

That is the model Taavik uses.

What runs in the agent

The agent is the execution point. It connects to the database, receives the scheduled query job, runs it with the configured role, and streams the result back for export generation.

The agent is also where statement timeouts are enforced. This is important for recurring jobs because a schedule should not become an unbounded production query.

Use a read-only database role for the connection. Taavik rejects DML and DDL before the job is dispatched.

What the cloud coordinates

The cloud control plane stores the schedule definition and run history. It knows the cadence, destination, output format, and status of previous runs.

It does not need direct database access. The schedule asks the agent to run work at the right time.

That split keeps the workflow operational without turning the cloud into a database client sitting on your network edge.

Email and Slack delivery

Taavik supports email and Slack delivery for scheduled exports.

Email sends a message with a secure download link. Slack posts to a channel through an incoming webhook and includes a secure download link. In both cases, the generated file is made available through the link.

For channel setup, see the Slack integration and email delivery pages.

Audit and run history

A scheduled export needs visible history. If a recipient asks whether Monday's export ran, the answer should be in the workspace.

Taavik records the run status, duration, row count, delivery outcome, and failure reason when available. This matters more than a success email because operations teams need to investigate skipped and failed runs quickly.

When this pattern fits

This pattern fits recurring operational extracts:

  • finance reconciliation.
  • customer records needing review.
  • stuck orders.
  • data quality checks.
  • support lists.

It is not a BI dashboard replacement. It is a safer home for the SQL exports your team already runs.

Read how the agent works if you want the end-to-end flow.