Skip to main content
Version: 9.2

Export Stages

During an export, Qrvey performs the following tasks.

Step 1: Data Extraction

  1. Initializes an export context that uniquely identifies the request and validates that the underlying infrastructure can safely handle the workload.
  2. Loads configuration and metadata for the chart or report.
  3. Builds filters and query parameters.
  4. 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

  1. Uploads generated artifacts to internal and external storage.
  2. Merges chunk results if applicable.
  3. 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 statusDetails object.

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.

StageDescription
INIT_PROCESSInitializing export context, identifiers, and runtime metadata. Entry point for any export request.
VALIDATE_ES_CAPACITYChecking Elasticsearch cluster capacity before executing heavy queries. Prevents cluster overload.
LOAD_CHART_CONFIGFetching chart or report configuration and metadata to aid understanding of structure, fields, and visuals.
BUILD_FILTERSBuilding filters and query parameters from user and report configuration before data extraction.
EXTRACT_DATARetrieving data from the analytics service. Used in CSV and Excel exports to feed chunked processing for large datasets.
TRANSFORM_DATAApplying formatting, normalization, and column mapping to raw analytical data to convert into export schemas.
UPLOAD_INTERNAL_STORAGEUploading generated artifacts to internal storage as an intermediate persistence layer.
UPDATE_PROCESS_STATUSMarking 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.

StageDescription
INIT_CHUNK_ORCHESTRATIONValidating the export and creating logical data chunks for large datasets to enable parallel processing.
ORCHESTRATE_CHUNKSOrchestrating chunk processing jobs by distributing data into chunks evenly (for example, rows per chunk) before processing.
TRANSFORM_CHUNK_DATATransforming chunk data into CSV‑ready columns and formats. Used at the chunk level.
GENERATE_CHUNK_CSVGenerating CSV file for each processed chunk using streams. Efficiently writes large files without high memory usage.
BUILD_FINAL_ZIPCompressing 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.

StageDescription
GENERATE_BASE_JSONGenerating base JSON data for use as the Excel data source. Used as an intermediate representation before file generation.
GENERATE_CHUNK_EXCELGenerating partial Excel files per chunk. Used in large exports to avoid memory pressure.
GENERATE_EXCEL_FILECreating an Excel file with sheet formats and styles. Used in small or single‑chunk exports.
BUILD_FINAL_EXCELCombining 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.

StageDescription
GENERATE_HTMLGenerating HTML representation of charts or report pages. Used as the rendering source.
UPLOAD_HTML_STORAGEUploading generated HTML to internal storage to enable renderers to access HTML.
SEND_RENDER_REQUESTSending HTML reference to external rendering service to trigger rendering.
RENDER_PDFRendering PDF or JPG from HTML. Used only in visual exports.
RENDER_COMPLETEDReceiving confirmation that PDF or JPG rendering is complete. Used as a synchronization point.
LOAD_PAGE_INFOFetching page definitions, layouts, and dependencies for multi‑page PDF exports.
REQUEST_PDF_CHUNKSSending chunk render requests to PDF renderer. Used in large PDF exports where pages are rendered in parallel.
UPDATE_CHUNK_STATUSUpdating 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.

StageDescription
UPLOAD_EXTERNAL_STORAGEValidating 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.