forked from dask-contrib/dask-sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Review] Refactor ConfigContainer to use dask config (dask-contrib#392)
* Add dask config module to dask-sql * Update context to use dask-sql config instead of ConfigContainer * Remove distributed utils_test fixtures and add client fixture * Reduce connection timeout for non reachable test * Rerun tests * Mount tempfile directory in independent worker container * Skip test_fsql on external cluster * Relax external cluster's conda packages * Add fixme note to failing fugue test due to missing triad module * Update case sensitivity test * Update setup to include the config yaml file for dask-sql * Add sql schema yaml and update setup to include the schema * Remove explicit config dict from dask_sql.config * Update set_config docstring and prevent setting non sql configs * Remove configContainer in favor of dask-sql config module * Add config unit tests * Add dask sql configuration docs and include dask-sphinx-theme ext for rendering config yaml files * Fix dask-sphinx-theme version constraint for config extention * Update set_config docstring * Rerun tests * Remove context.set_config api in favor of directly using dask Co-authored-by: Charles Blackmon-Luca <20627856+charlesbluca@users.noreply.github.com>
- Loading branch information
1 parent
cd38818
commit 0372ebc
Showing
16 changed files
with
212 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
recursive-include dask_sql *.yaml | ||
|
||
include versioneer.py | ||
include dask_sql/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from . import config | ||
from ._version import get_versions | ||
from .cmd import cmd_loop | ||
from .context import Context | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
|
||
import dask | ||
import yaml | ||
|
||
fn = os.path.join(os.path.dirname(__file__), "sql.yaml") | ||
|
||
with open(fn) as f: | ||
defaults = yaml.safe_load(f) | ||
|
||
dask.config.update_defaults(defaults) | ||
dask.config.ensure_file(source=fn, comment=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
properties: | ||
|
||
sql: | ||
type: object | ||
properties: | ||
|
||
groupby: | ||
type: object | ||
properties: | ||
|
||
split_out: | ||
type: integer | ||
description: | | ||
Number of output partitions for a groupby operation | ||
split_every: | ||
type: [integer, "null"] | ||
description: | | ||
Number of branches per reduction step for a groupby operation. | ||
identifier: | ||
type: object | ||
properties: | ||
|
||
case_sensitive: | ||
type: boolean | ||
description: | | ||
Whether sql identifiers are considered case sensitive while parsing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
sql: | ||
groupby: | ||
split_out: 1 | ||
split_every: null | ||
|
||
identifier: | ||
case_sensitive: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _configuration: | ||
|
||
Configuration in Dask-SQL | ||
========================== | ||
|
||
``dask-sql`` supports a list of configuration options to configure behavior of certain operations. | ||
``dask-sql`` uses `Dask's config <https://docs.dask.org/en/stable/configuration.html>`_ | ||
module and configuration options can be specified with YAML files, via environment variables, | ||
or directly, either through the `dask.config.set <https://docs.dask.org/en/stable/configuration.html#dask.config.set>`_ method | ||
or the ``config_options`` argument in the :func:`dask_sql.Context.sql` method. | ||
|
||
Configuration Reference | ||
----------------------- | ||
|
||
.. dask-config-block:: | ||
:location: sql | ||
:config: https://gist.githubusercontent.com/ayushdg/1b0f7cacd0e9db20175669a17386a58d/raw/6ddb78a3b3c4ac5051aa17105e576211d0e32f6b/sql.yaml | ||
:schema: https://gist.githubusercontent.com/ayushdg/1b0f7cacd0e9db20175669a17386a58d/raw/2d37f64c48c2b6ebdca6634b4c5e3c22a59e1cdf/sql-schema.yaml |
Oops, something went wrong.