Automating the export of Snowflake worksheet results to PDF involves running the query outside the UI, formatting the data, rendering a PDF with a library or service, and scheduling the process.
Snowflake’s web interface (Snowsight and the Classic Console) lets you run ad-hoc queries in worksheets, but it offers no built-in “Export to PDF” button. When teams need pixel-perfect, periodically refreshed PDFs—for board decks, executive reports, compliance archives, or client hand-offs—they must stitch together a workflow that:
This article shows multiple production-ready approaches, explains best practices, highlights common pitfalls, and demonstrates how a modern SQL editor like Galaxy fits into the picture.
Hand-rolling PDFs by clicking “Print > Save as PDF” works fine once—but reporting obligations rarely end after the first run. Automating PDF exports:
Open the worksheet in Snowsight, click “Print” in the browser, save as PDF. Fast but manual. Good for one-offs or debugging, not for scheduled pipelines.
Snowsight allows dashboards to be emailed as PDF or image on a schedule. If your worksheet can be converted into a dashboard tile (table or chart widget), this is the easiest native solution:
Limitations:
Control everything with code. Typical stack:
snowflake-connector-python
or snowflake-sdk
)pdfkit
(wkhtmltopdf), WeasyPrint
, or puppeteer
cron
, Airflow, dbt, or Snowflake Tasks that call an External FunctionThis approach offers full flexibility—charts, corporate fonts, cover pages—but requires infrastructure and maintenance.
If you want end-to-end automation inside Snowflake, combine:
All scheduling and orchestration lives within Snowflake’s ecosystem.
USAGE
and SELECT
on the target database/schemasnowflake-connector-python
, pandas
, jinja2
, pdfkit
, schedule
(for timing)pdfkit.from_string()
to generate a PDF.schedule
or cron
.Galaxy is a developer-centric SQL editor with AI copilot and query sharing. While Galaxy doesn’t render PDFs itself, it simplifies two critical pieces of the workflow:
{{ ds }}
or Snowflake session variables so the same SQL works daily.Why it’s wrong: Doesn’t scale, prone to human error.
Fix: Adopt programmatic or Snowsight scheduled approaches.
Why it’s wrong: Long tables overflow pages; unreadable reports.
Fix: Use CSS page-break rules, responsive fonts, and table stripes when rendering HTML.
Why it’s wrong: Security risk, painful rotations.
Fix: Store secrets in a vault; read them at runtime.
Snowflake doesn’t hand you a “Download PDF” button for worksheets, but combining native features (Snowsight scheduled dashboards) or code-based workflows (Python + PDF generator + task scheduler) yields reliable, production-grade exports. Tools like Galaxy ensure your SQL remains maintainable and discoverable as the backbone of the reporting pipeline.
Engineering and analytics teams often require fixed, point-in-time PDF reports for executives, auditors, or clients. Manual browser exports don’t scale and are error-prone. Automating the process saves time, guarantees consistency, meets compliance standards, and delivers data in a universally accepted, non-editable format.
Not directly. Snowflake’s Snowsight can email dashboards as PDFs, but worksheets in the SQL editor lack a “Download PDF” button. You need to convert the query into a dashboard tile or use external automation.
Create a Snowsight dashboard with your query, then schedule it to email a PDF. This requires zero external infrastructure but offers limited layout control.
Galaxy centralizes and versions your SQL. Your automation script can pull the latest endorsed query from Galaxy Collections, ensuring the PDF always reflects the current business logic without hard-coded SQL strings.
Storing in a cloud bucket (S3, GCS, Blob) is common because PDF generation often occurs outside Snowflake. You can still reference the object via an external stage if you need to keep metadata inside Snowflake.