Export Stages
During an export, Qrvey performs the following tasks.
Step 1: Data Extraction
- Initializes an export context that uniquely identifies the request and validates that the underlying infrastructure can safely handle the workload.
- Loads configuration and metadata for the chart or report.
- Builds filters and query parameters.
- Retrieves data from the analytics service.
Step 2: Data Transformation
After data extraction, the process diverges depending on the export type (CSV, Excel, PDF/JPG, or ZIP):
-
Tabular exports (CSV/Excel):
- Transforms data into export‑ready formats.
- Splits data into manageable chunks when necessary.
- Performs incremental writes using streaming to minimize memory usage.
-
Visual exports (PDF/JPG) - HTML representations are generated and sent to an external rendering service, which produces pixel‑perfect outputs that are later collected and packaged.
Step 3: File Upload to Storage
- Uploads generated artifacts to internal and external storage.
- Merges chunk results if applicable.
- Updates export status to reflect completion or failure.
Note: Export status details have been enhanced when using APIs. The Get Export Status endpoint returns status details that include a description of the current export stage in the
statusDetailsobject.
Main Export Workflow
The following table describes the actions for each export stage in the main workflow. They apply to all export types unless described otherwise.
| Stage | Description |
|---|---|
| INIT_PROCESS | Initializing export context, identifiers, and runtime metadata. Entry point for any export request. |
| VALIDATE_ES_CAPACITY | Checking Elasticsearch cluster capacity before executing heavy queries. Prevents cluster overload. |
| LOAD_CHART_CONFIG | Fetching chart or report configuration and metadata to aid understanding of structure, fields, and visuals. |
| BUILD_FILTERS | Building filters and query parameters from user and report configuration before data extraction. |
| EXTRACT_DATA | Retrieving data from the analytics service. Used in CSV and Excel exports to feed chunked processing for large datasets. |
| TRANSFORM_DATA | Applying formatting, normalization, and column mapping to raw analytical data to convert into export schemas. |
| UPLOAD_INTERNAL_STORAGE | Uploading generated artifacts to internal storage as an intermediate persistence layer. |
| UPDATE_PROCESS_STATUS | Marking export process as successful or failed as the final lifecycle update. |
CSV Export Stages
The following table describes the actions for each export stage for CSV files.
| Stage | Description |
|---|---|
| INIT_CHUNK_ORCHESTRATION | Validating the export and creating logical data chunks for large datasets to enable parallel processing. |
| ORCHESTRATE_CHUNKS | Orchestrating chunk processing jobs by distributing data into chunks evenly (for example, rows per chunk) before processing. |
| TRANSFORM_CHUNK_DATA | Transforming chunk data into CSV‑ready columns and formats. Used at the chunk level. |
| GENERATE_CHUNK_CSV | Generating CSV file for each processed chunk using streams. Efficiently writes large files without high memory usage. |
| BUILD_FINAL_ZIP | Compressing all CSV chunks into a final ZIP file for delivery. Used when CSV exports result in multiple chunk files. |
Excel Export Stages
The following table describes the actions for each export stage for Excel files.
| Stage | Description |
|---|---|
| GENERATE_BASE_JSON | Generating base JSON data for use as the Excel data source. Used as an intermediate representation before file generation. |
| GENERATE_CHUNK_EXCEL | Generating partial Excel files per chunk. Used in large exports to avoid memory pressure. |
| GENERATE_EXCEL_FILE | Creating an Excel file with sheet formats and styles. Used in small or single‑chunk exports. |
| BUILD_FINAL_EXCEL | Combining chunked Excel files into the final Excel file. Used in large exports that require chunking. |
PDF / JPG Export Stages
The following table describes the actions for each export stage for PDF and JPG files.
| Stage | Description |
|---|---|
| GENERATE_HTML | Generating HTML representation of charts or report pages. Used as the rendering source. |
| UPLOAD_HTML_STORAGE | Uploading generated HTML to internal storage to enable renderers to access HTML. |
| SEND_RENDER_REQUEST | Sending HTML reference to external rendering service to trigger rendering. |
| RENDER_PDF | Rendering PDF or JPG from HTML. Used only in visual exports. |
| RENDER_COMPLETED | Receiving confirmation that PDF or JPG rendering is complete. Used as a synchronization point. |
| LOAD_PAGE_INFO | Fetching page definitions, layouts, and dependencies for multi‑page PDF exports. |
| REQUEST_PDF_CHUNKS | Sending chunk render requests to PDF renderer. Used in large PDF exports where pages are rendered in parallel. |
| UPDATE_CHUNK_STATUS | Updating chunk status after render completion. Used in chunked PDF exports for progress tracking. |
External Storage Upload
The following table describes the export action when the user selects delivery to an external storage option such as S3 or FTP.
| Stage | Description |
|---|---|
| UPLOAD_EXTERNAL_STORAGE | Validating the target and uploading the final artifact to external storage. |
Configure Records for Each PDF File
To configure the number of rows displayed in each PDF, use the Export Settings endpoint. Add the desired number of records to the recordsPerFilePDF property in the Export Settings endpoint. When a PDF file reaches a row limit, a new PDF file is created until all rows are exported. This only applies to a simple table (not grouped) PDF export.