The Parquet Dump/Restore mechanism allows for exporting subgraph entity data from PostgreSQL into a file-based format for backup, migration, or sharing. The dump consists of a directory containing metadata, the GraphQL schema, the subgraph manifest, and Parquet files for each entity type.
Directory Layout
<dump-dir>/
metadata.json -- deployment metadata + per-table state
schema.graphql -- raw GraphQL schema text
subgraph.yaml -- raw subgraph manifest YAML (optional)
<EntityType>/
chunk_000000.parquet -- rows ordered by vid
chunk_000001.parquet -- incremental append
...
data_sources$/
chunk_000000.parquet -- dynamic data sources
Key Components
metadata.json: Contains deployment metadata (version, network, deployment hash), manifest details, block information (start_block, head_block), health status, and a map of tables including their chunk files and max_vid.schema.graphql: The raw GraphQL schema used to reconstruct the relational layout.subgraph.yaml: The raw subgraph manifest.- Entity Tables: Each entity type has its own directory containing one or more
.parquet files. Incremental dumps append new chunk files rather than rewriting existing ones. data_sources$: A special table for dynamic data sources, dumped in its own directory.