Configuration
All configuration options for ckanext-tables are prefixed with ckanext.tables..
Cache settings
These options control how downloaded resource data is cached. They apply to file-based Resource Data Sources (CSV, XLSX, ORC, Parquet, Feather).
ckanext.tables.cache.backend
The storage backend used to cache downloaded table data.
pickle— data is cached as pickle files on disk. Simple and requires no additional infrastructure. The cache directory is controlled byckanext.tables.cache.cache_dir.redis— data is stored in Redis using CKAN's built-in Redis connection. Suitable for multi-worker deployments where shared cache is needed.parquet— data is cached as Apache Parquet files on disk. Scales well for large DataFrames. The cache directory is controlled byckanext.tables.cache.cache_dir.feather— data is cached as Arrow IPC (Feather) files on disk. Optimised for fast read/write speed with minimal serialisation overhead. The cache directory is controlled byckanext.tables.cache.cache_dir.
Unknown values fall back to feather with a warning in the logs.
| Type | string |
| Default | feather |
| Allowed values | pickle, redis, parquet, feather |
ckanext.tables.cache.backend = redis
ckanext.tables.cache.cache_dir
Directory where cache files are stored. Used for file-based cache backends.
Defaults to a tables-cache subdirectory of ckan.storage_path, or of the
system temp directory if that is not configured.
If the directory does not exist it is created automatically, with permissions
restricted to the CKAN process user (mode 0700). If it already exists but is
owned by another user, or is writable by other users/groups, it is refused and
table caching is disabled (a warning is logged) rather than falling back to a
shared, predictable location such as the system temp directory — a shared or
attacker-owned cache directory would let another local user plant a file that
gets read back as trusted cache data (notably by the pickle backend).
| Type | string |
| Computed default | %(ckan.storage_path)s/tables-cache |
ckanext.tables.cache.cache_dir = /var/cache/ckanext-tables
ckanext.tables.cache.ttl
Time-to-live (in seconds) for cached data. After this period, cached entries are considered stale and will be re-fetched from the original source.
This value is used as the default for all cache backends and data sources. Individual data source instances can still override the TTL programmatically.
| Type | string |
| Default | 3600 |
ckanext.tables.cache.ttl = 86400
Remote fetch settings
These options control how the file-based Resource Data Sources (CSV, XLSX, ORC, Parquet, Feather) download data from a resource's url or a resource view's file_url override. Both are set by dataset editors, not sysadmins, but are fetched by the CKAN server process, so downloads are guarded against SSRF (requests to private/loopback/link-local/internal addresses are refused), hangs (connect/read timeouts), and unbounded response bodies (a maximum size, enforced while streaming).
ckanext.tables.fetch.connect_timeout
Maximum time (in seconds) to wait for a connection to the remote host to be established before giving up.
| Type | string |
| Default | 5 |
ckanext.tables.fetch.connect_timeout = 5
ckanext.tables.fetch.read_timeout
Maximum time (in seconds) to wait between bytes received from the remote host before giving up.
| Type | string |
| Default | 30 |
ckanext.tables.fetch.read_timeout = 30
ckanext.tables.fetch.max_bytes
Maximum response size (in bytes) accepted from a remote resource/file_url. Enforced
both from the Content-Length response header and while streaming the body, so a
server that lies about or omits Content-Length cannot bypass it. Defaults to 200 MB.
| Type | string |
| Default | 209715200 |
ckanext.tables.fetch.max_bytes = 209715200
Pagination and export limits
These options bound how much data a single request can pull through a table — both the AJAX page-data endpoint and the export endpoints (CSV, TSV, JSON, NDJSON, YAML, XLSX, HTML, PDF) — since request parameters like page size are controlled by the client, not the server.
ckanext.tables.pagination.max_page_size
Maximum number of rows a single AJAX page request (?size=...) may return. Requests
asking for more are silently clamped to this value; a size of zero or less is
clamped up to 1. The default matches the largest option the built-in page-size
selector itself offers, so it only affects requests crafted outside the normal UI.
| Type | string |
| Default | 100 |
ckanext.tables.pagination.max_page_size = 100
ckanext.tables.export.max_rows
Maximum number of rows a single export may contain. Every exporter fetches the full filtered result set regardless of the current page — including the PDF exporter, which renders it through Jinja and WeasyPrint synchronously in the request — so without this limit an unfiltered or very large table could be exported, or rendered to PDF, with no bound on rows, memory, or CPU time. Exporting more than this many rows is refused (HTTP 413) rather than silently truncated; narrow the result set with filters instead.
| Type | string |
| Default | 50000 |
ckanext.tables.export.max_rows = 50000