dft is configured through a TOML file located at ~/.config/dft/config.toml by default. The configuration system uses a hierarchical approach:
- Default values built into the application
- Shared configuration applied to all interfaces
- App-specific configuration for each interface (TUI, CLI, etc.)
The final configuration for each interface is a merge of these three layers, with app-specific settings taking precedence over shared settings.
# Settings applied to all interfaces
[shared]
# ...shared settings...
# CLI-specific settings
[cli]
# ...CLI settings...
# TUI-specific settings
[tui]
# ...TUI settings...
# FlightSQL client settings
[flightsql_client]
# ...FlightSQL client settings...
# FlightSQL server settings
[flightsql_server]
# ...FlightSQL server settings...
# HTTP server settings
[http_server]
# ...HTTP server settings...You can specify a different config file with the --config parameter:
dft --config /path/to/custom/config.tomlThe execution config is where you can define query execution properties for each app (so the below would each expect to be in a relevant app section like shared, tui, cli, or flightsql_server (The FlightSQL client doesnt actually execute so doesnt have an execution config). You can configure the ObjectStores that you want to use in your queries and path of a DDL file that you want to run on startup.
There are multiple ways to configure S3 credentials:
[[execution.object_store.s3]]
bucket_name = "my_bucket"
object_store_url = "s3://my_bucket"
aws_endpoint = "https://s3.amazonaws.com"
aws_access_key_id = "MY_ACCESS_KEY"
aws_secret_access_key = "MY_SECRET"
aws_session_token = "MY_SESSION"
aws_allow_http = falseEnable automatic credential resolution from environment variables, ~/.aws/credentials, IAM roles, or EKS service accounts:
[[execution.object_store.s3]]
bucket_name = "my_bucket"
object_store_url = "s3://my_bucket"
use_credential_chain = true
aws_allow_http = falseWhen use_credential_chain = true, credentials are resolved in this order:
- TOML static credentials (if provided, override environment)
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYenvironment variablesAWS_WEB_IDENTITY_TOKEN_FILE(for EKS/IRSA)- ECS container credentials
- EC2 instance profile (via IMDSv2)
Use credential chain but override specific settings like endpoint:
[[execution.object_store.s3]]
bucket_name = "my_bucket"
object_store_url = "s3://my_bucket"
use_credential_chain = true
aws_endpoint = "https://custom-s3.example.com"
aws_allow_http = falseSecurity Note: Credential chain is opt-in via the use_credential_chain flag. When false (default), only TOML credentials are used, preventing accidental exposure of unintended AWS accounts
And define a custom DDL path like so (the default is ~/.config/dft/ddl.sql).
[execution]
ddl_path = "/path/to/my/ddl.sql"Multiple ObjectStores can be defined in the config file. In the future datafusion SessionContext and SessionState options can be configured here.
Set the number of iterations for benchmarking queries (10 is the default).
[execution]
benchmark_iterations = 10The batch size for query execution can be configured based on the app being used (TUI, CLI, or FlightSQL Server). For the TUI it defaults to 100, which may slow down queries, because a Record Batch is used as a unit of pagination and too many rows can cause the TUI to hang. For the CLI and FlightSQL Server, the default is 8092.
[execution]
cli_batch_size = 8092
tui_batch_size = 100
flightsql_server_batch_size = 8092The display config is where you can define the frame rate of the TUI.
[tui.display]
frame_rate = 60The interaction config is where mouse and paste behavior can be defined. This is not currently implemented.
[tui.interaction]
mouse = true
paste = trueThe FlightSQL config is where you can define the connection URL for the FlightSQL client & server.
[flightsql_client]
connection_url = "http://localhost:50051"
benchmark_iterations = 10
[flightsql_server]
connection_url = "http://localhost:50051"
server_metrics_addr = "0.0.0.0:9000"The editor config is where you can set your preferred editor settings.
Currently only syntax highlighting is supported. It is experimental because currently the regex that is used to determine keywords only works in simple cases.
[tui.editor]
experimental_syntax_highlighting = true