NFS (Network File System) is a distributed file system protocol that provides transparent remote access to shared files across networks. Originally developed by Sun Microsystems, it is widely used in Unix/Linux environments for sharing files between systems.
The NFS Data Connector enables federated SQL query across supported file formats stored on NFS exports.
:::note[Platform Support] The NFS Data Connector is available on Linux and macOS. It is not supported on Windows. :::
Connect to an NFS export and query Parquet files:
Query the data using SQL:
Unlike SMB and FTP/SFTP connectors, NFS uses host-based authentication rather than username/password credentials. The NFS server grants access based on the client machine's IP address or hostname, as configured in the server's export rules (typically in /etc/exports).
Ensure the host running Spice is authorized to mount the NFS export before configuring the connector.
fromSpecifies the NFS server and export path to connect to.
Format: nfs://<host>/<export-path>
<host>: The server hostname or IP address<export-path>: The exported directory path on the serverWhen pointing to a directory, Spice loads all files within that directory recursively.
Examples:
nameThe dataset name used as the table name in SQL queries. Cannot be a reserved keyword.
params| Parameter Name | Description |
|---|---|
file_format | Required when connecting to a directory. See File Formats. |
client_timeout | Connection timeout duration. E.g. 30s, 1m. No timeout when unset. |
hive_partitioning_enabled | Enable Hive-style partitioning from folder structure. Default: false. |
Connect to an NFS export:
When pointing to a specific file, the format is inferred from the file extension:
Configure a timeout for slow or unreliable network connections:
Connect to an NFS export containing CSV files:
Enable Hive-style partitioning to automatically extract partition columns from the folder structure:
Given a folder structure like:
Queries can filter on partition columns:
Load different datasets from multiple exports on the same NFS server:
Enable local acceleration for faster repeated queries:
Join NFS data with other data sources:
NFS relies on the server's export configuration for access control. The NFS server administrator must configure the export rules to grant read access to the host running Spice.
Example NFS server export configuration (/etc/exports):
This grants read-only access to all hosts on the 192.168.1.0/24 subnet and to spice-host.local.
If you receive "connection refused" or "mount failed" errors:
If you can connect but receive permission errors:
For slow or unreliable network connections, increase the timeout:
When connecting to a directory, ensure file_format is specified and matches the actual file types in the directory. Spice expects all files in a directory to have the same format.
The NFS connector requires the libnfs library to be installed on the system:
Ubuntu/Debian:
macOS: