diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 47945ca..ba1e976 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,9 +15,13 @@ jobs: - uses: pre-commit/action@v3.0.0 integration-tests: runs-on: ubuntu-latest + strategy: + matrix: + dbt_core: [1.4.*, 1.7.*] + db_target: [duckdb, postgres] services: postgres: - image: postgres + image: ${{ (matrix.db_target == 'postgres') && 'postgres' || '' }} env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -29,10 +33,6 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 - strategy: - matrix: - dbt_core: [1.4.*, 1.7.*] - db_target: [dbt-duckdb, dbt-postgres] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 @@ -44,16 +44,20 @@ jobs: version: 1.4.0 virtualenvs-create: true virtualenvs-in-project: true + - name: Run Clickhouse + if: ${{ matrix.db_target == 'clickhouse' }} + run: | + docker run -d -p 8123:8123 --name dbt-linreg-clickhouse --ulimit nofile=262144:262144 clickhouse/clickhouse-server - name: Install dependencies run: | sudo apt-get update sudo apt-get install chmod +x ./run ./run setup - pip install -U "dbt-core==$DBT_CORE_VERSION" "${DBT_PROVIDER_PACKAGE}" + pip install -U "dbt-core==$DBT_CORE_VERSION" "dbt-${DBT_TARGET}" env: DBT_CORE_VERSION: ${{ matrix.dbt_core }} - DBT_PROVIDER_PACKAGE: ${{ matrix.db_target }} + DBT_TARGET: ${{ matrix.db_target }} - name: Test run: ./run test "${DBT_TARGET}" env: diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index f9da91a..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitnore -!dbt_linreg.iml diff --git a/.idea/dbt_linreg.iml b/.idea/dbt_linreg.iml index 5c0ed1b..e69de29 100644 --- a/.idea/dbt_linreg.iml +++ b/.idea/dbt_linreg.iml @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/CHANGELOG.md b/CHANGELOG.md index 7932b93..e2a5e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### `0.3.0` + +- Official support for Clickhouse! +- Rename `format=` and `format_options=` to `output=` and `output_options=` to make the API consistent with **dbt_pca**. + ### `0.2.6` - Fix bug with `group_by` on multiple variables; contributed by [@svkohler](https://github.com/dwreeves/dbt_linreg/issues/21). diff --git a/README.md b/README.md index 36db431..e249932 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ # Overview -**dbt_linreg** is an easy way to perform linear regression and ridge regression in SQL (Snowflake, DuckDB, and more) with OLS using dbt's Jinja2 templating. +**dbt_linreg** is an easy way to perform linear regression and ridge regression in SQL (Snowflake, DuckDB, Clickhouse, and more) with OLS using dbt's Jinja2 templating. Reasons to use **dbt_linreg**: @@ -32,7 +32,7 @@ Add this the `packages:` list your dbt project's `packages.yml`: ```yaml - package: "dwreeves/dbt_linreg" - version: "0.2.6" + version: "0.3.0" ``` The full file will look something like this: @@ -43,7 +43,7 @@ packages: # Other packages here # ... - package: "dwreeves/dbt_linreg" - version: "0.2.6" + version: "0.3.0" ``` # Examples @@ -63,8 +63,8 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg ``` @@ -171,9 +171,10 @@ group by - Snowflake - DuckDB +- Clickhouse - Postgres\* -If `dbt_linreg` does not work in your database tool, please let me know in a bug report and I can make sure it is supported. +If **dbt_linreg** does not work in your database tool, please let me know in a bug report. > _* Minimal support. Postgres is syntactically supported, but is not performant under certain circumstances._ @@ -189,8 +190,8 @@ def ols( endog: str, exog: Union[str, list[str]], add_constant: bool = True, - format: Literal['wide', 'long'] = 'wide', - format_options: Optional[dict[str, Any]] = None, + output: Literal['wide', 'long'] = 'wide', + output_options: Optional[dict[str, Any]] = None, group_by: Optional[Union[str, list[str]]] = None, alpha: Optional[Union[float, list[float]]] = None, method: Literal['chol', 'fwl'] = 'chol', @@ -205,24 +206,25 @@ Where: - **endog**: The endogenous variable / y variable / target variable of the regression. (You can also specify `y=...` instead of `endog=...` if you prefer.) - **exog**: The exogenous variables / X variables / features of the regression. (You can also specify `x=...` instead of `exog=...` if you prefer.) - **add_constant**: If true, a constant term is added automatically to the regression. -- **format**: Either "wide" or "long" format for coefficients. See **Formats and format options** for more. +- **output**: Either "wide" or "long" output format for coefficients. See **Outputs and output options** for more. - If `wide`, the variables span the columns with their original variable names, and the coefficients fill a single row. - If `long`, the coefficients are in a single column called `coefficient`, and the variable names are in a single column called `variable_name`. -- **format_options**: See **Formats and format options** section for more. +- **output_options**: See **Formats and format options** section for more. - **group_by**: If specified, the regression will be grouped by these variables, and individual regressions will run on each group. - **alpha**: If not null, the regression will be run as a ridge regression with a penalty of `alpha`. See **Notes** section for more information. - **method**: The method used to calculate the regression. See **Methods and method options** for more. - **method_options**: Options specific to the estimation method. See **Methods and method options** for more. -# Formats and format options +# Outputs and output options -Outputs can be returned either in `format='long'` or `format='wide'`. +Outputs can be returned either in `output='long'` or `output='wide'`. -(In the future, I might add one or two more formats, notably a summary table format.) +All outputs have their own output options, which can be passed into the `output_options=` arg as a dict, e.g. `output_options={'foo': 'bar'}`. -All formats have their own format options, which can be passed into the `format_options=` arg as a dict, e.g. `format_options={'foo': 'bar'}`. +`output=` and `output_options=` were formerly named `format=` and `format_options=` respectively. +This has been deprecated to make **dbt_linreg**'s API more consistent with **dbt_pca**'s API. -### Options for `format='long'` +### Options for `output='long'` - **round** (default = `None`): If not None, round all coefficients to `round` number of digits. - **constant_name** (default = `'const'`): String name that refers to constant term. @@ -230,13 +232,13 @@ All formats have their own format options, which can be passed into the `format_ - **coefficient_column_name** (default = `'coefficient'`): Column name storing model coefficients. - **strip_quotes** (default = `True`): If true, strip outer quotes from column names if provided; if false, always use string literals. -These options are available for `format='long'` only when `method='chol'`: +These options are available for `output='long'` only when `method='chol'`: - **calculate_standard_error** (default = `True if not alpha else False`): If true, provide the standard error in the output. - **standard_error_column_name** (default = `'standard_error'`): Column name storing the standard error for the parameter. - **t_statistic_column_name** (default = `'t_statistic'`): Column name storing the t-statistic for the parameter. -### Options for `format='wide'` +### Options for `output='wide'` - **round** (default = `None`): If not None, round all coefficients to `round` number of digits. - **constant_name** (default = `'const'`): String name that refers to constant term. @@ -290,6 +292,7 @@ So when should you use `fwl`? The main use case is in OLTP systems (e.g. Postgre - A scalar input (e.g. `alpha=0.01`) will apply an alpha of `0.01` to all features. - An array input (e.g. `alpha=[0.01, 0.02, 0.03, 0.04, 0.05]`) will apply an alpha of `0.01` to the first column, `0.02` to the second column, etc. - `alpha` is equivalent to what TEoSL refers to as "lambda," times the sample size N. That is to say: `α ≡ λ * N`. + - (Of course, you can regularize the constant term by DIYing your own constant term and doing `add_constant=false`.) - Regularization as currently implemented for the `chol` method tends to be very slow in OLTP systems (e.g. Postgres), but is very performant in OLAP systems (e.g. Snowflake, DuckDB, BigQuery, Redshift). As dbt is more commonly used in OLAP contexts, the code base is optimized for the OLAP use case. - That said, it may be possible to make regularization in OLTP more performant (e.g. with augmentation of the design matrix), so PRs are welcome. @@ -298,11 +301,14 @@ So when should you use `fwl`? The main use case is in OLTP systems (e.g. Postgre ### Possible future features -Some things I am thinking about working on down the line: +Some things that could happen in the future: -- **Optimization:** Given access to Jinja2 templating, there may be more efficient ways to calculate the get a closed form OLS solution than the approach taken in this code base. +- Weighted least squares (WLS) +- P-values +- Heteroskedasticity robust standard errors +- Recursive CTE implementations + long formatted inputs -- **Standard errors and t-stats:** For the `format='long'` output (or perhaps a new format?), there is space to sensibly add t-stats and standard errors. The main challenge is that this necessitates inverting a covariance matrix, although this is theoretically doable using Jinja2 templating. +Note that although I maintain this library (as of writing in 2025), I do not actively update it much with new features, so this wish list is unlikely unless I personally need it or unless someone else contributes these features. # FAQ @@ -310,7 +316,7 @@ Some things I am thinking about working on down the line: See **Methods and method options** section for a full breakdown of each linear regression implementation. -All approaches were validated using Statsmodels `sm.OLS()`. Note that the ridge regression coefficients differ very slightly from Statsmodels's outputs for currently unknown reasons, but the coefficients are very close (I enforce a `<0.01%` deviation from Statsmodels's ridge regression coefficients in my integration tests). +All approaches were validated using Statsmodels `sm.OLS()`. ### BigQuery (or other database) has linear regression implemented natively. Why should I use `dbt_linreg` over that? @@ -334,11 +340,11 @@ I opt to leave out dummy variable support because it's tricky, and I want to kee Note that you couldn't simply add categorical variables in the same list as numeric variables because Jinja2 templating is not natively aware of the types you're feeding through it, nor does Jinja2 know the values that a string variable can take on. The way you would actually implement categorical variables is with `group by` trickery (i.e. center both y and X by categorical variable group means), although I am not sure how to do that efficiently for more than one categorical variable column. -If you'd like to regress on a categorical variable, for now you'll need to do your own feature engineering, e.g. `(foo = 'bar')::int as foo_bar` +If you'd like to regress on a categorical variable, for now you'll need to do your own feature engineering, e.g. `(foo = 'bar')::int as foo_bar, (foo = 'baz')::int as foo_baz`. ### Why are there no p-values? -This is planned for the future, so stay tuned! P-values would require a lookup on a dimension table, which is a significant amount of work to manage nicely, but I hope to get to it soon. +This is something that might happen in the future. P-values would require a lookup on a dimension table, which is a significant amount of work to manage nicely. In the meanwhile, you can implement this yourself-- just create a dimension table that left joins a t-statistic on a half-open interval to lookup a p-value. diff --git a/dbt_project.yml b/dbt_project.yml index 7e66bd6..437a414 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: "dbt_linreg" -version: "0.2.6" +version: "0.3.0" # 1.2 is required because of modules.itertools. require-dbt-version: [">=1.2.0", "<2.0.0"] diff --git a/docs/src/img/dbt-linreg-banner.png b/docs/src/img/dbt-linreg-banner.png deleted file mode 100644 index 6beed4f..0000000 Binary files a/docs/src/img/dbt-linreg-banner.png and /dev/null differ diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 88472f4..c559315 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: "dbt_linreg_tests" -version: "0.2.3" +version: "0.3.0" require-dbt-version: [">=1.0.0", "<2.0.0"] @@ -10,5 +10,15 @@ clean-targets: ["target", "dbt_modules", "dbt_packages"] macro-paths: ["macros"] log-path: "logs" +vars: + _test_precision_simple_matrix: '{{ "10e-8" if target.name == "clickhouse" else 0.0 }}' + _test_precision_collinear_matrix: '{{ "10e-6" if target.name == "clickhouse" else "10e-7" }}' + +models: + +materialized: table + +tests: + +store_failures: true + # During dev only! profile: "dbt_linreg_profile" diff --git a/integration_tests/models/collinear_matrix_1var_without_const.sql b/integration_tests/models/collinear_matrix_1var_without_const.sql index 23809b8..05eb295 100644 --- a/integration_tests/models/collinear_matrix_1var_without_const.sql +++ b/integration_tests/models/collinear_matrix_1var_without_const.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1'], - format='long', - add_constant=False + output='long', + add_constant=false ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_1var_without_const_ridge.sql b/integration_tests/models/collinear_matrix_1var_without_const_ridge.sql index 3eb2e64..625a6d3 100644 --- a/integration_tests/models/collinear_matrix_1var_without_const_ridge.sql +++ b/integration_tests/models/collinear_matrix_1var_without_const_ridge.sql @@ -9,7 +9,7 @@ select * from {{ endog='y', exog=['x1'], alpha=2.0, - format='long', - add_constant=False + output='long', + add_constant=false ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_2var_without_const.sql b/integration_tests/models/collinear_matrix_2var_without_const.sql index 9b293b0..9669c51 100644 --- a/integration_tests/models/collinear_matrix_2var_without_const.sql +++ b/integration_tests/models/collinear_matrix_2var_without_const.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2'], - format='long', - add_constant=False + output='long', + add_constant=false ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_3var_without_const.sql b/integration_tests/models/collinear_matrix_3var_without_const.sql index 11c642e..11d91c5 100644 --- a/integration_tests/models/collinear_matrix_3var_without_const.sql +++ b/integration_tests/models/collinear_matrix_3var_without_const.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3'], - format='long', - add_constant=False + output='long', + add_constant=false ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_4var_without_const.sql b/integration_tests/models/collinear_matrix_4var_without_const.sql index 54144c4..a9d168c 100644 --- a/integration_tests/models/collinear_matrix_4var_without_const.sql +++ b/integration_tests/models/collinear_matrix_4var_without_const.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4'], - format='long', - add_constant=False + output='long', + add_constant=false ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_5var_without_const.sql b/integration_tests/models/collinear_matrix_5var_without_const.sql index f3187e6..99bbc15 100644 --- a/integration_tests/models/collinear_matrix_5var_without_const.sql +++ b/integration_tests/models/collinear_matrix_5var_without_const.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], - format='long', - add_constant=False + output='long', + add_constant=false ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_5var_without_const_ridge.sql b/integration_tests/models/collinear_matrix_5var_without_const_ridge.sql index dfe9a9b..6069149 100644 --- a/integration_tests/models/collinear_matrix_5var_without_const_ridge.sql +++ b/integration_tests/models/collinear_matrix_5var_without_const_ridge.sql @@ -10,7 +10,7 @@ select * from {{ endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], alpha=1.0, - format='long', - add_constant=False + output='long', + add_constant=false ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_regression_chol.sql b/integration_tests/models/collinear_matrix_regression_chol.sql index 0874ed7..669d446 100644 --- a/integration_tests/models/collinear_matrix_regression_chol.sql +++ b/integration_tests/models/collinear_matrix_regression_chol.sql @@ -9,7 +9,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], - format='long', + output='long', method='chol' ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_regression_chol_unoptimized.sql b/integration_tests/models/collinear_matrix_regression_chol_unoptimized.sql index ae8a0da..b0340da 100644 --- a/integration_tests/models/collinear_matrix_regression_chol_unoptimized.sql +++ b/integration_tests/models/collinear_matrix_regression_chol_unoptimized.sql @@ -1,7 +1,7 @@ {{ config( materialized="table", - tags=["skip-postgres"] + tags=["skip-postgres", "skip-clickhouse"] ) }} select * from {{ @@ -9,7 +9,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], - format='long', + output='long', method='chol', method_options={'subquery_optimization': False} ) diff --git a/integration_tests/models/collinear_matrix_regression_fwl.sql b/integration_tests/models/collinear_matrix_regression_fwl.sql index e427c76..225fb62 100644 --- a/integration_tests/models/collinear_matrix_regression_fwl.sql +++ b/integration_tests/models/collinear_matrix_regression_fwl.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], - format='long', + output='long', method='fwl' ) }} as linreg diff --git a/integration_tests/models/collinear_matrix_ridge_regression_chol.sql b/integration_tests/models/collinear_matrix_ridge_regression_chol.sql index ccb622e..bc4dfe3 100644 --- a/integration_tests/models/collinear_matrix_ridge_regression_chol.sql +++ b/integration_tests/models/collinear_matrix_ridge_regression_chol.sql @@ -9,7 +9,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], - format='long', + output='long', alpha=0.01, method='chol' ) diff --git a/integration_tests/models/collinear_matrix_ridge_regression_chol_unoptimized.sql b/integration_tests/models/collinear_matrix_ridge_regression_chol_unoptimized.sql index e0e5160..1759f56 100644 --- a/integration_tests/models/collinear_matrix_ridge_regression_chol_unoptimized.sql +++ b/integration_tests/models/collinear_matrix_ridge_regression_chol_unoptimized.sql @@ -1,7 +1,7 @@ {{ config( materialized="table", - tags=["skip-postgres"] + tags=["skip-postgres", "skip-clickhouse"] ) }} select * from {{ @@ -9,7 +9,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], - format='long', + output='long', alpha=0.01, method='chol', method_options={'subquery_optimization': False} diff --git a/integration_tests/models/collinear_matrix_ridge_regression_fwl.sql b/integration_tests/models/collinear_matrix_ridge_regression_fwl.sql index 1ebc482..d3fed9b 100644 --- a/integration_tests/models/collinear_matrix_ridge_regression_fwl.sql +++ b/integration_tests/models/collinear_matrix_ridge_regression_fwl.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('collinear_matrix'), endog='y', exog=['x1', 'x2', 'x3', 'x4', 'x5'], - format='long', + output='long', alpha=0.01, method='fwl' ) diff --git a/integration_tests/models/groups_matrix_regression_chol_optimized.sql b/integration_tests/models/groups_matrix_regression_chol_optimized.sql index 0b6a836..0f7f503 100644 --- a/integration_tests/models/groups_matrix_regression_chol_optimized.sql +++ b/integration_tests/models/groups_matrix_regression_chol_optimized.sql @@ -10,7 +10,7 @@ select * from {{ endog='y', exog=['x1', 'x2', 'x3'], group_by=['gb_var'], - format='long', + output='long', method='chol', method_options={'subquery_optimization': True} ) diff --git a/integration_tests/models/groups_matrix_regression_chol_unoptimized.sql b/integration_tests/models/groups_matrix_regression_chol_unoptimized.sql index 0a6e718..c8cc63a 100644 --- a/integration_tests/models/groups_matrix_regression_chol_unoptimized.sql +++ b/integration_tests/models/groups_matrix_regression_chol_unoptimized.sql @@ -1,7 +1,7 @@ {{ config( materialized="table", - tags=["skip-postgres"] + tags=["skip-postgres", "skip-clickhouse"] ) }} select * from {{ @@ -10,7 +10,7 @@ select * from {{ endog='y', exog=['x1', 'x2', 'x3'], group_by=['gb_var'], - format='long', + output='long', method='chol', method_options={'subquery_optimization': False} ) diff --git a/integration_tests/models/groups_matrix_regression_fwl.sql b/integration_tests/models/groups_matrix_regression_fwl.sql index eda7dd6..7a3f95f 100644 --- a/integration_tests/models/groups_matrix_regression_fwl.sql +++ b/integration_tests/models/groups_matrix_regression_fwl.sql @@ -9,7 +9,7 @@ select * from {{ endog='y', exog=['x1', 'x2', 'x3'], group_by=['gb_var'], - format='long', + output='long', method='fwl' ) }} as linreg diff --git a/integration_tests/models/long_format_options.sql b/integration_tests/models/long_format_options.sql index 2fd436f..d10266e 100644 --- a/integration_tests/models/long_format_options.sql +++ b/integration_tests/models/long_format_options.sql @@ -10,8 +10,8 @@ select table=ref('simple_matrix'), endog='y', exog=['"xa"', 'xb'], - format='long', - format_options={ + output='long', + output_options={ 'constant_name': 'constant_term', 'variable_column_name': 'vname', 'coefficient_column_name': 'co', @@ -29,8 +29,8 @@ select table=ref('simple_matrix'), endog='y', exog=['"xa"', 'xb'], - format='long', - format_options={ + output='long', + output_options={ 'constant_name': 'constant_term', 'variable_column_name': 'vname', 'coefficient_column_name': 'co', diff --git a/integration_tests/models/simple_0var_regression_long_chol.sql b/integration_tests/models/simple_0var_regression_long_chol.sql index fa84aea..8f4dfed 100644 --- a/integration_tests/models/simple_0var_regression_long_chol.sql +++ b/integration_tests/models/simple_0var_regression_long_chol.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=[], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_0var_regression_long_fwl.sql b/integration_tests/models/simple_0var_regression_long_fwl.sql index fa84aea..8f4dfed 100644 --- a/integration_tests/models/simple_0var_regression_long_fwl.sql +++ b/integration_tests/models/simple_0var_regression_long_fwl.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=[], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_0var_regression_wide.sql b/integration_tests/models/simple_0var_regression_wide.sql index dc2ca1f..5b3de88 100644 --- a/integration_tests/models/simple_0var_regression_wide.sql +++ b/integration_tests/models/simple_0var_regression_wide.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=[], - format='wide', - format_options={'round': 5} + output='wide', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_10var_regression_long.sql b/integration_tests/models/simple_10var_regression_long.sql index e1d16c2..affeb8a 100644 --- a/integration_tests/models/simple_10var_regression_long.sql +++ b/integration_tests/models/simple_10var_regression_long.sql @@ -10,7 +10,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc', 'xd', 'xe', 'xf', 'xg', 'xh', 'xi', 'xj'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_1var_regression_long_chol.sql b/integration_tests/models/simple_1var_regression_long_chol.sql index 5922702..36a9fa7 100644 --- a/integration_tests/models/simple_1var_regression_long_chol.sql +++ b/integration_tests/models/simple_1var_regression_long_chol.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_1var_regression_long_fwl.sql b/integration_tests/models/simple_1var_regression_long_fwl.sql index 5922702..36a9fa7 100644 --- a/integration_tests/models/simple_1var_regression_long_fwl.sql +++ b/integration_tests/models/simple_1var_regression_long_fwl.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_1var_regression_wide.sql b/integration_tests/models/simple_1var_regression_wide.sql index e75df44..f916dbb 100644 --- a/integration_tests/models/simple_1var_regression_wide.sql +++ b/integration_tests/models/simple_1var_regression_wide.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa'], - format='wide', - format_options={'round': 5} + output='wide', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_2var_regression_long.sql b/integration_tests/models/simple_2var_regression_long.sql index 96d6266..06fe65d 100644 --- a/integration_tests/models/simple_2var_regression_long.sql +++ b/integration_tests/models/simple_2var_regression_long.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_2var_regression_wide.sql b/integration_tests/models/simple_2var_regression_wide.sql index c259e6f..f64d20b 100644 --- a/integration_tests/models/simple_2var_regression_wide.sql +++ b/integration_tests/models/simple_2var_regression_wide.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb'], - format='wide', - format_options={'round': 5} + output='wide', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_3var_regression_long.sql b/integration_tests/models/simple_3var_regression_long.sql index 9230a2c..e98eab2 100644 --- a/integration_tests/models/simple_3var_regression_long.sql +++ b/integration_tests/models/simple_3var_regression_long.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_3var_regression_wide.sql b/integration_tests/models/simple_3var_regression_wide.sql index 53f81c4..322598e 100644 --- a/integration_tests/models/simple_3var_regression_wide.sql +++ b/integration_tests/models/simple_3var_regression_wide.sql @@ -9,7 +9,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc'], - format='wide', - format_options={'round': 5} + output='wide', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_4var_regression_long.sql b/integration_tests/models/simple_4var_regression_long.sql index 7e26eeb..23474fe 100644 --- a/integration_tests/models/simple_4var_regression_long.sql +++ b/integration_tests/models/simple_4var_regression_long.sql @@ -8,7 +8,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc', 'xd'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_4var_regression_wide.sql b/integration_tests/models/simple_4var_regression_wide.sql index 8c6cedb..1c707b7 100644 --- a/integration_tests/models/simple_4var_regression_wide.sql +++ b/integration_tests/models/simple_4var_regression_wide.sql @@ -9,7 +9,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc', 'xd'], - format='wide', - format_options={'round': 5} + output='wide', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_5var_regression_long.sql b/integration_tests/models/simple_5var_regression_long.sql index 466fbfc..879cc4a 100644 --- a/integration_tests/models/simple_5var_regression_long.sql +++ b/integration_tests/models/simple_5var_regression_long.sql @@ -9,7 +9,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc', 'xd', 'xe'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_5var_regression_wide.sql b/integration_tests/models/simple_5var_regression_wide.sql index 9c21289..3ad1bab 100644 --- a/integration_tests/models/simple_5var_regression_wide.sql +++ b/integration_tests/models/simple_5var_regression_wide.sql @@ -9,7 +9,7 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc', 'xd', 'xe'], - format='wide', - format_options={'round': 5} + output='wide', + output_options={'round': 5} ) }} as linreg diff --git a/integration_tests/models/simple_8var_regression_wide.sql b/integration_tests/models/simple_8var_regression_wide.sql index 3b0f9b4..22e8fa9 100644 --- a/integration_tests/models/simple_8var_regression_wide.sql +++ b/integration_tests/models/simple_8var_regression_wide.sql @@ -10,6 +10,6 @@ select * from {{ table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc', 'xd', 'xe', 'xf', 'xg', 'xh'], - format='wide', + output='wide', ) }} as linreg diff --git a/integration_tests/models/wide_format_options.sql b/integration_tests/models/wide_format_options.sql index 6ea13c2..68063d8 100644 --- a/integration_tests/models/wide_format_options.sql +++ b/integration_tests/models/wide_format_options.sql @@ -10,8 +10,8 @@ select table=ref('simple_matrix'), endog='y', exog=['"xa"', 'xb'], - format='wide', - format_options={ + output='wide', + output_options={ 'variable_column_prefix': 'foo', 'variable_column_suffix': '_bar', 'constant_name': 'constant_term' diff --git a/integration_tests/profiles/profiles.yml b/integration_tests/profiles/profiles.yml index a2b454b..60e7ab1 100644 --- a/integration_tests/profiles/profiles.yml +++ b/integration_tests/profiles/profiles.yml @@ -1,10 +1,10 @@ dbt_linreg_profile: - target: dbt-duckdb + target: duckdb outputs: - dbt-duckdb: + duckdb: type: duckdb path: dbt.duckdb - dbt-postgres: + postgres: type: postgres user: '{{ env_var("POSTGRES_USER") }}' password: '{{ env_var("POSTGRES_PASSWORD") }}' @@ -12,3 +12,7 @@ dbt_linreg_profile: port: '{{ env_var("POSTGRES_PORT", "5432") | as_number }}' dbname: '{{ env_var("POSTGRES_DB", "dbt_linreg") }}' schema: '{{ env_var("POSTGRES_SCHEMA", "public") }}' + clickhouse: + type: clickhouse + port: 8123 + schema: dbt_linreg diff --git a/integration_tests/selectors.yml b/integration_tests/selectors.yml index 37e3554..a605a13 100644 --- a/integration_tests/selectors.yml +++ b/integration_tests/selectors.yml @@ -1,7 +1,7 @@ selectors: - - name: dbt-duckdb-selector + - name: duckdb-selector definition: 'fqn:*' - - name: dbt-postgres-selector + - name: postgres-selector # Postgres runs into memory / performance issues for some of these queries. # Resolving this and making Postgres more performant is a TODO. definition: @@ -9,3 +9,10 @@ selectors: - 'fqn:*' - exclude: - '@tag:skip-postgres' + - name: clickhouse-selector + # Clickhouse struggles with the unoptimized chol method. + definition: + union: + - 'fqn:*' + - exclude: + - '@tag:skip-clickhouse' diff --git a/integration_tests/tests/test_collinear_matrix_1var_without_const.sql b/integration_tests/tests/test_collinear_matrix_1var_without_const.sql index b54c8c0..9b00a97 100644 --- a/integration_tests/tests/test_collinear_matrix_1var_without_const.sql +++ b/integration_tests/tests/test_collinear_matrix_1var_without_const.sql @@ -6,14 +6,17 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_1var_without_const') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_collinear_matrix_1var_without_const_ridge.sql b/integration_tests/tests/test_collinear_matrix_1var_without_const_ridge.sql index 93c9e52..9e3d7e2 100644 --- a/integration_tests/tests/test_collinear_matrix_1var_without_const_ridge.sql +++ b/integration_tests/tests/test_collinear_matrix_1var_without_const_ridge.sql @@ -9,7 +9,10 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_1var_without_const_ridge') }} as base full outer join expected on base.variable_name = expected.variable_name diff --git a/integration_tests/tests/test_collinear_matrix_2var_without_const.sql b/integration_tests/tests/test_collinear_matrix_2var_without_const.sql index 2979eeb..aa47ba4 100644 --- a/integration_tests/tests/test_collinear_matrix_2var_without_const.sql +++ b/integration_tests/tests/test_collinear_matrix_2var_without_const.sql @@ -8,14 +8,17 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_2var_without_const') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_collinear_matrix_3var_without_const.sql b/integration_tests/tests/test_collinear_matrix_3var_without_const.sql index c83c7f5..df13243 100644 --- a/integration_tests/tests/test_collinear_matrix_3var_without_const.sql +++ b/integration_tests/tests/test_collinear_matrix_3var_without_const.sql @@ -10,14 +10,17 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_3var_without_const') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_collinear_matrix_4var_without_const.sql b/integration_tests/tests/test_collinear_matrix_4var_without_const.sql index 5af25bf..2176051 100644 --- a/integration_tests/tests/test_collinear_matrix_4var_without_const.sql +++ b/integration_tests/tests/test_collinear_matrix_4var_without_const.sql @@ -12,14 +12,17 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_4var_without_const') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_collinear_matrix_5var_without_const.sql b/integration_tests/tests/test_collinear_matrix_5var_without_const.sql index 6907858..c5ac63d 100644 --- a/integration_tests/tests/test_collinear_matrix_5var_without_const.sql +++ b/integration_tests/tests/test_collinear_matrix_5var_without_const.sql @@ -14,14 +14,17 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_5var_without_const') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_collinear_matrix_5var_without_const_ridge.sql b/integration_tests/tests/test_collinear_matrix_5var_without_const_ridge.sql index f60d4af..e64971c 100644 --- a/integration_tests/tests/test_collinear_matrix_5var_without_const_ridge.sql +++ b/integration_tests/tests/test_collinear_matrix_5var_without_const_ridge.sql @@ -17,7 +17,10 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_5var_without_const_ridge') }} as base full outer join expected on base.variable_name = expected.variable_name diff --git a/integration_tests/tests/test_collinear_matrix_regression_chol.sql b/integration_tests/tests/test_collinear_matrix_regression_chol.sql index f1395d8..f42fcf7 100644 --- a/integration_tests/tests/test_collinear_matrix_regression_chol.sql +++ b/integration_tests/tests/test_collinear_matrix_regression_chol.sql @@ -16,14 +16,21 @@ expected as ( ) -select base.* +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient, + expected.standard_error as expected_standard_error, + base.standard_error as actual_standard_error, + expected.t_statistic as expected_t_statistic, + base.t_statistic as actual_t_statistic from {{ ref('collinear_matrix_regression_chol') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_collinear_matrix_regression_chol_unoptimized.sql b/integration_tests/tests/test_collinear_matrix_regression_chol_unoptimized.sql index 7068a17..b3c5140 100644 --- a/integration_tests/tests/test_collinear_matrix_regression_chol_unoptimized.sql +++ b/integration_tests/tests/test_collinear_matrix_regression_chol_unoptimized.sql @@ -16,14 +16,21 @@ expected as ( ) -select base.* +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient, + expected.standard_error as expected_standard_error, + base.standard_error as actual_standard_error, + expected.t_statistic as expected_t_statistic, + base.t_statistic as actual_t_statistic from {{ ref('collinear_matrix_regression_chol_unoptimized') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_collinear_matrix_regression_fwl.sql b/integration_tests/tests/test_collinear_matrix_regression_fwl.sql index 1cd1852..123f85b 100644 --- a/integration_tests/tests/test_collinear_matrix_regression_fwl.sql +++ b/integration_tests/tests/test_collinear_matrix_regression_fwl.sql @@ -16,11 +16,19 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_regression_fwl') }} as base full outer join expected on base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) + {% if target.name == "clickhouse" %} + {# This has poor precision for Clickhouse; not much I can do about it. #} + abs(base.coefficient - expected.coefficient) > 0.1 + {% else %} + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + {% endif %} or base.coefficient is null or expected.coefficient is null diff --git a/integration_tests/tests/test_collinear_matrix_ridge_regression_chol.sql b/integration_tests/tests/test_collinear_matrix_ridge_regression_chol.sql index 94e42bb..f094e61 100644 --- a/integration_tests/tests/test_collinear_matrix_ridge_regression_chol.sql +++ b/integration_tests/tests/test_collinear_matrix_ridge_regression_chol.sql @@ -19,7 +19,10 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_ridge_regression_chol') }} as base full outer join expected on base.variable_name = expected.variable_name diff --git a/integration_tests/tests/test_collinear_matrix_ridge_regression_chol_unoptimized.sql b/integration_tests/tests/test_collinear_matrix_ridge_regression_chol_unoptimized.sql index 926771b..449dcc9 100644 --- a/integration_tests/tests/test_collinear_matrix_ridge_regression_chol_unoptimized.sql +++ b/integration_tests/tests/test_collinear_matrix_ridge_regression_chol_unoptimized.sql @@ -19,7 +19,10 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('collinear_matrix_ridge_regression_chol_unoptimized') }} as base full outer join expected on base.variable_name = expected.variable_name diff --git a/integration_tests/tests/test_collinear_matrix_ridge_regression_fwl.sql b/integration_tests/tests/test_collinear_matrix_ridge_regression_fwl.sql index 443eb2e..c0e8efa 100644 --- a/integration_tests/tests/test_collinear_matrix_ridge_regression_fwl.sql +++ b/integration_tests/tests/test_collinear_matrix_ridge_regression_fwl.sql @@ -19,7 +19,8 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name from {{ ref('collinear_matrix_ridge_regression_fwl') }} as base full outer join expected on base.variable_name = expected.variable_name diff --git a/integration_tests/tests/test_groups_matrix_regression_chol_optimized.sql b/integration_tests/tests/test_groups_matrix_regression_chol_optimized.sql index 22075ae..f845c76 100644 --- a/integration_tests/tests/test_groups_matrix_regression_chol_optimized.sql +++ b/integration_tests/tests/test_groups_matrix_regression_chol_optimized.sql @@ -20,16 +20,23 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient, + expected.standard_error as expected_standard_error, + base.standard_error as actual_standard_error, + expected.t_statistic as expected_t_statistic, + base.t_statistic as actual_t_statistic from {{ ref('groups_matrix_regression_chol_optimized') }} as base full outer join expected on base.gb_var = expected.gb_var and base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_groups_matrix_regression_chol_unoptimized.sql b/integration_tests/tests/test_groups_matrix_regression_chol_unoptimized.sql index 0d4b2cb..4800e3a 100644 --- a/integration_tests/tests/test_groups_matrix_regression_chol_unoptimized.sql +++ b/integration_tests/tests/test_groups_matrix_regression_chol_unoptimized.sql @@ -20,16 +20,23 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient, + expected.standard_error as expected_standard_error, + base.standard_error as actual_standard_error, + expected.t_statistic as expected_t_statistic, + base.t_statistic as actual_t_statistic from {{ ref('groups_matrix_regression_chol_unoptimized') }} as base full outer join expected on base.gb_var = expected.gb_var and base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) - or round(base.standard_error, 7) != round(expected.standard_error, 7) - or round(base.t_statistic, 7) != round(expected.t_statistic, 7) + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.standard_error - expected.standard_error) > {{ var("_test_precision_collinear_matrix") }} + or abs(base.t_statistic - expected.t_statistic) > {{ var("_test_precision_collinear_matrix") }} or base.coefficient is null or base.standard_error is null or base.t_statistic is null diff --git a/integration_tests/tests/test_groups_matrix_regression_fwl.sql b/integration_tests/tests/test_groups_matrix_regression_fwl.sql index 217b342..eff3fb6 100644 --- a/integration_tests/tests/test_groups_matrix_regression_fwl.sql +++ b/integration_tests/tests/test_groups_matrix_regression_fwl.sql @@ -23,13 +23,21 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('groups_matrix_regression_fwl') }} as base full outer join expected on base.gb_var = expected.gb_var and base.variable_name = expected.variable_name where - round(base.coefficient, 7) != round(expected.coefficient, 7) + {% if target.name == "clickhouse" %} + {# This has poor precision for Clickhouse; not much I can do about it. #} + abs(base.coefficient - expected.coefficient) > 0.1 + {% else %} + abs(base.coefficient - expected.coefficient) > {{ THRESHOLD }} + {% endif %} or base.coefficient is null or expected.coefficient is null diff --git a/integration_tests/tests/test_long_format_options.sql b/integration_tests/tests/test_long_format_options.sql index 1d8f12b..d4f187a 100644 --- a/integration_tests/tests/test_long_format_options.sql +++ b/integration_tests/tests/test_long_format_options.sql @@ -3,7 +3,7 @@ with base as ( select strip_quotes, vname, co - from {{ ref("long_format_options") }} + from {{ ref("long_output_options") }} ), diff --git a/integration_tests/tests/test_simple_0var_regression_long_chol.sql b/integration_tests/tests/test_simple_0var_regression_long_chol.sql index a5aa18c..0ab1f53 100644 --- a/integration_tests/tests/test_simple_0var_regression_long_chol.sql +++ b/integration_tests/tests/test_simple_0var_regression_long_chol.sql @@ -6,8 +6,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_0var_regression_long_chol') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_0var_regression_long_fwl.sql b/integration_tests/tests/test_simple_0var_regression_long_fwl.sql index 366d526..bb774f1 100644 --- a/integration_tests/tests/test_simple_0var_regression_long_fwl.sql +++ b/integration_tests/tests/test_simple_0var_regression_long_fwl.sql @@ -6,8 +6,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_0var_regression_long_fwl') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_1var_regression_long_chol.sql b/integration_tests/tests/test_simple_1var_regression_long_chol.sql index b0cdf96..5efc39a 100644 --- a/integration_tests/tests/test_simple_1var_regression_long_chol.sql +++ b/integration_tests/tests/test_simple_1var_regression_long_chol.sql @@ -8,8 +8,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_1var_regression_long_chol') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_1var_regression_long_fwl.sql b/integration_tests/tests/test_simple_1var_regression_long_fwl.sql index 53a5266..a7175d2 100644 --- a/integration_tests/tests/test_simple_1var_regression_long_fwl.sql +++ b/integration_tests/tests/test_simple_1var_regression_long_fwl.sql @@ -8,8 +8,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_1var_regression_long_fwl') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_1var_regression_wide.sql b/integration_tests/tests/test_simple_1var_regression_wide.sql index e730260..a5f557c 100644 --- a/integration_tests/tests/test_simple_1var_regression_wide.sql +++ b/integration_tests/tests/test_simple_1var_regression_wide.sql @@ -7,9 +7,13 @@ expected as ( 5.0 as xa ) -select base.* +select + expected.const as expected_const, + base.const as actual_const, + expected.xa as expected_xa, + base.xa as actual_xa from {{ ref('simple_1var_regression_wide') }} as base, expected where not ( - base.const = expected.const - and base.xa = expected.xa + abs(base.const - expected.const) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xa - expected.xa) <= {{ var("_test_precision_simple_matrix") }} ) diff --git a/integration_tests/tests/test_simple_2var_regression_long.sql b/integration_tests/tests/test_simple_2var_regression_long.sql index b58500c..149650a 100644 --- a/integration_tests/tests/test_simple_2var_regression_long.sql +++ b/integration_tests/tests/test_simple_2var_regression_long.sql @@ -10,8 +10,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_2var_regression_long') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_2var_regression_wide.sql b/integration_tests/tests/test_simple_2var_regression_wide.sql index a21a6f7..86202da 100644 --- a/integration_tests/tests/test_simple_2var_regression_wide.sql +++ b/integration_tests/tests/test_simple_2var_regression_wide.sql @@ -8,10 +8,16 @@ expected as ( 7.0 as xb ) -select base.* +select + expected.const as expected_const, + base.const as actual_const, + expected.xa as expected_xa, + base.xa as actual_xa, + expected.xb as expected_xb, + base.xb as actual_xb from {{ ref('simple_2var_regression_wide') }} as base, expected where not ( - base.const = expected.const - and base.xa = expected.xa - and base.xb = expected.xb + abs(base.const - expected.const) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xa - expected.xa) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xb - expected.xb) <= {{ var("_test_precision_simple_matrix") }} ) diff --git a/integration_tests/tests/test_simple_3var_regression_long.sql b/integration_tests/tests/test_simple_3var_regression_long.sql index 78fca4f..70dea51 100644 --- a/integration_tests/tests/test_simple_3var_regression_long.sql +++ b/integration_tests/tests/test_simple_3var_regression_long.sql @@ -12,8 +12,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_3var_regression_long') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_3var_regression_wide.sql b/integration_tests/tests/test_simple_3var_regression_wide.sql index 7a53b6d..2ebc9f3 100644 --- a/integration_tests/tests/test_simple_3var_regression_wide.sql +++ b/integration_tests/tests/test_simple_3var_regression_wide.sql @@ -9,11 +9,19 @@ expected as ( 9.0 as xc ) -select base.* +select + expected.const as expected_const, + base.const as actual_const, + expected.xa as expected_xa, + base.xa as actual_xa, + expected.xb as expected_xb, + base.xb as actual_xb, + expected.xc as expected_xc, + base.xc as actual_xc from {{ ref('simple_3var_regression_wide') }} as base, expected where not ( - base.const = expected.const - and base.xa = expected.xa - and base.xb = expected.xb - and base.xc = expected.xc + abs(base.const - expected.const) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xa - expected.xa) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xb - expected.xb) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xc - expected.xc) <= {{ var("_test_precision_simple_matrix") }} ) diff --git a/integration_tests/tests/test_simple_4var_regression_long.sql b/integration_tests/tests/test_simple_4var_regression_long.sql index 337f2c0..e8be697 100644 --- a/integration_tests/tests/test_simple_4var_regression_long.sql +++ b/integration_tests/tests/test_simple_4var_regression_long.sql @@ -14,8 +14,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_4var_regression_long') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_4var_regression_wide.sql b/integration_tests/tests/test_simple_4var_regression_wide.sql index 2bccadc..ba7d32e 100644 --- a/integration_tests/tests/test_simple_4var_regression_wide.sql +++ b/integration_tests/tests/test_simple_4var_regression_wide.sql @@ -10,12 +10,22 @@ expected as ( 11.0 as xd ) -select base.* +select + expected.const as expected_const, + base.const as actual_const, + expected.xa as expected_xa, + base.xa as actual_xa, + expected.xb as expected_xb, + base.xb as actual_xb, + expected.xc as expected_xc, + base.xc as actual_xc, + expected.xd as expected_xd, + base.xd as actual_xd from {{ ref('simple_4var_regression_wide') }} as base, expected where not ( - base.const = expected.const - and base.xa = expected.xa - and base.xb = expected.xb - and base.xc = expected.xc - and base.xd = expected.xd + abs(base.const - expected.const) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xa - expected.xa) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xb - expected.xb) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xc - expected.xc) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xd - expected.xd) <= {{ var("_test_precision_simple_matrix") }} ) diff --git a/integration_tests/tests/test_simple_5var_regression_long.sql b/integration_tests/tests/test_simple_5var_regression_long.sql index c0e82d9..fd38b7c 100644 --- a/integration_tests/tests/test_simple_5var_regression_long.sql +++ b/integration_tests/tests/test_simple_5var_regression_long.sql @@ -16,8 +16,13 @@ expected as ( ) -select base.variable_name +select + coalesce(base.variable_name, expected.variable_name) as variable_name, + expected.coefficient as expected_coefficient, + base.coefficient as actual_coefficient from {{ ref('simple_5var_regression_long') }} as base full outer join expected on base.variable_name = expected.variable_name -where base.coefficient != expected.coefficient or base.coefficient is null +where + abs(base.coefficient - expected.coefficient) > {{ var("_test_precision_simple_matrix") }} + or base.coefficient is null diff --git a/integration_tests/tests/test_simple_5var_regression_wide.sql b/integration_tests/tests/test_simple_5var_regression_wide.sql index adeafb9..ba09c29 100644 --- a/integration_tests/tests/test_simple_5var_regression_wide.sql +++ b/integration_tests/tests/test_simple_5var_regression_wide.sql @@ -11,13 +11,25 @@ expected as ( 13.0 as xe ) -select base.* +select + expected.const as expected_const, + base.const as actual_const, + expected.xa as expected_xa, + base.xa as actual_xa, + expected.xb as expected_xb, + base.xb as actual_xb, + expected.xc as expected_xc, + base.xc as actual_xc, + expected.xd as expected_xd, + base.xd as actual_xd, + expected.xe as expected_xe, + base.xe as actual_xe from {{ ref('simple_5var_regression_wide') }} as base, expected where not ( - base.const = expected.const - and base.xa = expected.xa - and base.xb = expected.xb - and base.xc = expected.xc - and base.xd = expected.xd - and base.xe = expected.xe + abs(base.const - expected.const) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xa - expected.xa) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xb - expected.xb) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xc - expected.xc) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xd - expected.xd) <= {{ var("_test_precision_simple_matrix") }} + and abs(base.xe - expected.xe) <= {{ var("_test_precision_simple_matrix") }} ) diff --git a/integration_tests/tests/test_wide_format_options.sql b/integration_tests/tests/test_wide_format_options.sql index b732dc5..d08a49b 100644 --- a/integration_tests/tests/test_wide_format_options.sql +++ b/integration_tests/tests/test_wide_format_options.sql @@ -5,7 +5,7 @@ with base as ( "fooxa_bar", fooxb_bar from - {{ ref("wide_format_options") }} + {{ ref("wide_output_options") }} ) diff --git a/macros/linear_regression/ols.sql b/macros/linear_regression/ols.sql index 685abb5..e382908 100644 --- a/macros/linear_regression/ols.sql +++ b/macros/linear_regression/ols.sql @@ -1,15 +1,17 @@ {% macro ols(table, - endog=None, - exog=None, - x=None, - y=None, - add_constant=True, - format='wide', - format_options=None, - group_by=None, - alpha=None, - method=None, - method_options=None) -%} + endog=none, + exog=none, + x=none, + y=none, + add_constant=true, + output='wide', + output_options=none, + format=none, + format_options=none, + group_by=none, + alpha=none, + method=none, + method_options=none) -%} {############################################################################# @@ -36,8 +38,29 @@ ) }} {% endif %} - {% if format_options is none %} - {% set format_options = {} %} + {% if format_options is not none and output_options is not none %} + {{ exceptions.raise_compiler_error( + "`format_options` is deprecated and is another name for `output_options`." + " Please only set the `output_options`." + ) }} + {% endif %} + + + {% if format is not none and output is not none %} + {{ exceptions.raise_compiler_error( + "`format` is deprecated and is another name for `output`." + " Please only set the `output`." + ) }} + {% elif format is not none and output is none %} + {% set output = format %} + {% endif %} + + {% if output_options is none %} + {% if format_options is not none %} + {% set output_options = format_options %} + {% else %} + {% set output_options = {} %} + {% endif %} {% endif %} {% if method_options is none %} @@ -120,9 +143,16 @@ {% endfor %} {% endfor %} - {% if format not in ['wide', 'long'] %} + {% if format is not none and format not in ['wide', 'long'] %} + {{ exceptions.raise_compiler_error( + "Format must be either 'wide' or 'long'; received " ~ output ~ "." + " Also, `format=` is deprecated; it is suggested you use `output=` instead." + ) }} + {% endif %} + + {% if output not in ['wide', 'long'] %} {{ exceptions.raise_compiler_error( - "Format must be either 'wide' or 'long'; received " ~ format ~ "." + "Output must be either 'wide' or 'long'; received " ~ output ~ "." ) }} {% endif %} @@ -143,8 +173,8 @@ endog=endog, exog=exog, add_constant=add_constant, - format=format, - format_options=format_options, + output=output, + output_options=output_options, group_by=group_by, alpha=alpha, method_options=method_options @@ -157,8 +187,8 @@ endog=endog, exog=exog, add_constant=add_constant, - format=format, - format_options=format_options, + output=output, + output_options=output_options, group_by=group_by, alpha=alpha, method_options=method_options diff --git a/macros/linear_regression/ols_impl_chol/_ols_impl_chol.sql b/macros/linear_regression/ols_impl_chol/_ols_impl_chol.sql index 2ef4648..30c11cd 100644 --- a/macros/linear_regression/ols_impl_chol/_ols_impl_chol.sql +++ b/macros/linear_regression/ols_impl_chol/_ols_impl_chol.sql @@ -21,6 +21,10 @@ {{ return((prefix if prefix is not none else '') ~ 'i' ~ i ~ 'j' ~ j) }} {% endmacro %} +{% macro clickhouse___cell_or_alias(i, j, d, prefix=none) %} + {{ return((prefix if prefix is not none else '') ~ 'i' ~ i ~ 'j' ~ j) }} +{% endmacro %} + {% macro _safe_sqrt(x, safe=True) %} {{ return( adapter.dispatch('_safe_sqrt', 'dbt_linreg') @@ -99,8 +103,8 @@ endog, exog, add_constant=True, - format=None, - format_options=None, + output=None, + output_options=None, group_by=None, alpha=None, method_options=None) -%} @@ -111,15 +115,15 @@ endog=endog, exog=exog, add_constant=add_constant, - format=format, - format_options=format_options, + output=output, + output_options=output_options, group_by=group_by, alpha=alpha )) }} {%- endif %} {%- set subquery_optimization = method_options.get('subquery_optimization', True) %} {%- set safe_mode = method_options.get('safe', True) %} -{%- set calculate_standard_error = format_options.get('calculate_standard_error', (not alpha)) and format == 'long' %} +{%- set calculate_standard_error = output_options.get('calculate_standard_error', (not alpha)) and output == 'long' %} {%- if alpha and calculate_standard_error %} {% do log( 'Warning: Standard errors are NOT designed to take into account ridge regression regularization.' @@ -311,8 +315,8 @@ _dbt_linreg_stderrs as ( exog_aliased=exog_aliased, add_constant=add_constant, group_by=group_by, - format=format, - format_options=format_options, + output=output, + output_options=output_options, calculate_standard_error=calculate_standard_error ) }}) diff --git a/macros/linear_regression/ols_impl_fwl/_ols_impl_fwl.sql b/macros/linear_regression/ols_impl_fwl/_ols_impl_fwl.sql index 59c24ff..a7b4e13 100644 --- a/macros/linear_regression/ols_impl_fwl/_ols_impl_fwl.sql +++ b/macros/linear_regression/ols_impl_fwl/_ols_impl_fwl.sql @@ -96,8 +96,8 @@ endog, exog, add_constant=True, - format=None, - format_options=None, + output=None, + output_options=None, group_by=None, alpha=None, method_options=None) -%} @@ -108,8 +108,8 @@ endog=endog, exog=exog, add_constant=add_constant, - format=format, - format_options=format_options, + output=output, + output_options=output_options, group_by=group_by, alpha=alpha )) }} @@ -119,8 +119,8 @@ endog=endog, exog=exog, add_constant=add_constant, - format=format, - format_options=format_options, + output=output, + output_options=output_options, group_by=group_by, alpha=alpha )) }} @@ -186,7 +186,7 @@ _dbt_linreg_step0 as ( {% for step in range(1, (exog | length)) %} _dbt_linreg_step{{ step }} as ( with - __dbt_linreg_coefs as ( + __dbt_linreg_coefs{{ step }} as ( select {{ dbt_linreg._gb_cols(group_by, trailing_comma=True) | indent(6) }} {#- Slope terms #} @@ -237,7 +237,7 @@ _dbt_linreg_step{{ step }} as ( {%- endif %} {%- endfor %} from _dbt_linreg_step0 as b - {{ dbt_linreg._join_on_groups(group_by, 'b', '__dbt_linreg_coefs') | indent(2) }} + {{ dbt_linreg._join_on_groups(group_by, 'b', '__dbt_linreg_coefs'~step) | indent(2) }} ), {%- if loop.last %} _dbt_linreg_final_coefs as ( @@ -273,8 +273,8 @@ _dbt_linreg_final_coefs as ( exog_aliased=exog_aliased, add_constant=add_constant, group_by=group_by, - format=format, - format_options=format_options, + output=output, + output_options=output_options, calculate_standard_error=False ) }} diff --git a/macros/linear_regression/ols_impl_special/_ols_0var.sql b/macros/linear_regression/ols_impl_special/_ols_0var.sql index 9e1cdf0..d6467b9 100644 --- a/macros/linear_regression/ols_impl_special/_ols_0var.sql +++ b/macros/linear_regression/ols_impl_special/_ols_0var.sql @@ -2,8 +2,8 @@ endog, exog, add_constant=True, - format=None, - format_options=None, + output=None, + output_options=None, group_by=None, alpha=None) -%} (with _dbt_linreg_final_coefs as ( @@ -22,8 +22,8 @@ exog_aliased=[], add_constant=add_constant, group_by=group_by, - format=format, - format_options=format_options, + output=output, + output_options=output_options, calculate_standard_error=False ) }} diff --git a/macros/linear_regression/ols_impl_special/_ols_1var.sql b/macros/linear_regression/ols_impl_special/_ols_1var.sql index 0101bc9..6ed428e 100644 --- a/macros/linear_regression/ols_impl_special/_ols_1var.sql +++ b/macros/linear_regression/ols_impl_special/_ols_1var.sql @@ -2,8 +2,8 @@ endog, exog, add_constant=True, - format=None, - format_options=None, + output=None, + output_options=None, group_by=None, alpha=None) -%} {%- set exog_aliased = ['x1'] %} @@ -73,8 +73,8 @@ _dbt_linreg_final_coefs as ( exog_aliased=['x1'], add_constant=add_constant, group_by=group_by, - format=format, - format_options=format_options, + output=format, + output_options=output_options, calculate_standard_error=False ) }} diff --git a/macros/linear_regression/utils/utils.sql b/macros/linear_regression/utils/utils.sql index d25a4ca..d648029 100644 --- a/macros/linear_regression/utils/utils.sql +++ b/macros/linear_regression/utils/utils.sql @@ -36,17 +36,17 @@ exog_aliased=None, group_by=None, add_constant=True, - format=None, - format_options=None, + output=None, + output_options=None, calculate_standard_error=False) -%} -{%- if format == 'long' %} +{%- if output == 'long' %} {%- if add_constant %} select {{ dbt_linreg._unalias_gb_cols(group_by, prefix='b') | indent(2) }} - {{ dbt.string_literal(format_options.get('constant_name', 'const')) }} as {{ format_options.get('variable_column_name', 'variable_name') }}, - {{ dbt_linreg._maybe_round('x0_coef', format_options.get('round')) }} as {{ format_options.get('coefficient_column_name', 'coefficient') }}{% if calculate_standard_error %}, - {{ dbt_linreg._maybe_round('x0_stderr', format_options.get('round')) }} as {{ format_options.get('standard_error_column_name', 'standard_error') }}, - {{ dbt_linreg._maybe_round('x0_coef/x0_stderr', format_options.get('round')) }} as {{ format_options.get('t_statistic_column_name', 't_statistic') }} + {{ dbt.string_literal(output_options.get('constant_name', 'const')) }} as {{ output_options.get('variable_column_name', 'variable_name') }}, + {{ dbt_linreg._maybe_round('x0_coef', output_options.get('round')) }} as {{ output_options.get('coefficient_column_name', 'coefficient') }}{% if calculate_standard_error %}, + {{ dbt_linreg._maybe_round('x0_stderr', output_options.get('round')) }} as {{ output_options.get('standard_error_column_name', 'standard_error') }}, + {{ dbt_linreg._maybe_round('x0_coef/x0_stderr', output_options.get('round')) }} as {{ output_options.get('t_statistic_column_name', 't_statistic') }} {%- endif %} from _dbt_linreg_final_coefs as b {%- if calculate_standard_error %} @@ -59,10 +59,10 @@ union all {%- for i in exog_aliased %} select {{ dbt_linreg._unalias_gb_cols(group_by, prefix='b') | indent(2) }} - {{ dbt.string_literal(dbt_linreg._strip_quotes(exog[loop.index0], format_options)) }} as {{ format_options.get('variable_column_name', 'variable_name') }}, - {{ dbt_linreg._maybe_round(i~'_coef', format_options.get('round')) }} as {{ format_options.get('coefficient_column_name', 'coefficient') }}{% if calculate_standard_error %}, - {{ dbt_linreg._maybe_round(i~'_stderr', format_options.get('round')) }} as {{ format_options.get('standard_error_column_name', 'standard_error') }}, - {{ dbt_linreg._maybe_round(i~'_coef/'~i~'_stderr', format_options.get('round')) }} as {{ format_options.get('t_statistic_column_name', 't_statistic') }} + {{ dbt.string_literal(dbt_linreg._strip_quotes(exog[loop.index0], output_options)) }} as {{ output_options.get('variable_column_name', 'variable_name') }}, + {{ dbt_linreg._maybe_round(i~'_coef', output_options.get('round')) }} as {{ output_options.get('coefficient_column_name', 'coefficient') }}{% if calculate_standard_error %}, + {{ dbt_linreg._maybe_round(i~'_stderr', output_options.get('round')) }} as {{ output_options.get('standard_error_column_name', 'standard_error') }}, + {{ dbt_linreg._maybe_round(i~'_coef/'~i~'_stderr', output_options.get('round')) }} as {{ output_options.get('t_statistic_column_name', 't_statistic') }} {%- endif %} from _dbt_linreg_final_coefs as b {%- if calculate_standard_error %} @@ -72,17 +72,17 @@ from _dbt_linreg_final_coefs as b union all {%- endif %} {%- endfor %} -{%- elif format == 'wide' %} +{%- elif output == 'wide' %} select {%- if add_constant -%} {{ dbt_linreg._unalias_gb_cols(group_by) | indent(2) }} - {{ dbt_linreg._maybe_round('x0_coef', format_options.get('round')) }} as {{ dbt_linreg._format_wide_variable_column(format_options.get('constant_name', 'const'), format_options) }} + {{ dbt_linreg._maybe_round('x0_coef', output_options.get('round')) }} as {{ dbt_linreg._format_wide_variable_column(output_options.get('constant_name', 'const'), output_options) }} {%- if exog_aliased -%} , {%- endif -%} {%- endif -%} {%- for i in exog_aliased %} - {{ dbt_linreg._maybe_round(i~'_coef', format_options.get('round')) }} as {{ dbt_linreg._format_wide_variable_column(exog[loop.index0], format_options) }} + {{ dbt_linreg._maybe_round(i~'_coef', output_options.get('round')) }} as {{ dbt_linreg._format_wide_variable_column(exog[loop.index0], output_options) }} {%- if not loop.last -%} , {%- endif %} @@ -101,8 +101,8 @@ select * from _dbt_linreg_final_coefs {# Users can pass columns such as '"foo"', with the double quotes included. In this situation, we want to strip the double quotes when presenting outputs in a long format. #} -{% macro _strip_quotes(x, format_options) -%} - {% if format_options.get('strip_quotes') | default(True) %} +{% macro _strip_quotes(x, output_options) -%} + {% if output_options.get('strip_quotes') | default(True) %} {% if x[0] == '"' and x[-1] == '"' and (x | length) > 1 %} {{ return(x[1:-1]) }} {% endif %} @@ -110,18 +110,18 @@ select * from _dbt_linreg_final_coefs {{ return(x)}} {%- endmacro %} -{% macro _format_wide_variable_column(x, format_options) -%} +{% macro _format_wide_variable_column(x, output_options) -%} {% if x[0] == '"' and x[-1] == '"' and (x | length) > 1 %} {% set _add_quotes = True %} {% set x = x[1:-1] %} {% else %} {% set _add_quotes = False %} {% endif %} - {% if format_options.get('variable_column_prefix') %} - {% set x = format_options.get('variable_column_prefix') ~ x %} + {% if output_options.get('variable_column_prefix') %} + {% set x = output_options.get('variable_column_prefix') ~ x %} {% endif %} - {% if format_options.get('variable_column_suffix') %} - {% set x = x ~ format_options.get('variable_column_suffix') %} + {% if output_options.get('variable_column_suffix') %} + {% set x = x ~ output_options.get('variable_column_suffix') %} {% endif %} {% if _add_quotes %} {% set x = '"' ~ x ~ '"' %} diff --git a/macros/schema.yml b/macros/schema.yml index d58e5c6..5ad5044 100644 --- a/macros/schema.yml +++ b/macros/schema.yml @@ -21,8 +21,8 @@ macros: table=ref('simple_matrix'), endog='y', exog=['xa', 'xb', 'xc'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} ``` @@ -45,8 +45,8 @@ macros: table='my_data', endog='y', exog=['xa', 'xb', 'xc'], - format='long', - format_options={'round': 5} + output='long', + output_options={'round': 5} ) }} ``` @@ -68,15 +68,15 @@ macros: - name: add_constant type: boolean description: 'If true, a constant term is added automatically to the regression. (Default: `true`)' - - name: format + - name: output type: string description: |- Either "wide" or "long" format for coefficients. See **Formats and format options** in the README for more. - If `wide`, the variables span the columns with their original variable names, and the coefficients fill a single row. - If `long`, the coefficients are in a single column called `coefficient`, and the variable names are in a single column called `variable_name`. - - name: format_options + - name: output_options type: dict - description: See **Formats and format options** section in the README for more. + description: See **Outputs and output options** section in the README for more. - name: group_by type: string or list of numbers description: If specified, the regression will be grouped by these variables, and individual regressions will run on each group. diff --git a/poetry.lock b/poetry.lock index 6e9f50b..d3e9881 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "agate" @@ -78,6 +78,85 @@ files = [ {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] +[[package]] +name = "cffi" +version = "1.17.1" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, + {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, + {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, + {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, + {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, + {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, + {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, + {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, + {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, + {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, + {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, + {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, + {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, + {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, + {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, + {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, +] + +[package.dependencies] +pycparser = "*" + [[package]] name = "cfgv" version = "3.4.0" @@ -202,6 +281,231 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} +[[package]] +name = "clickhouse-connect" +version = "0.8.12" +description = "ClickHouse Database Core Driver for Python, Pandas, and Superset" +optional = false +python-versions = "~=3.8" +files = [ + {file = "clickhouse_connect-0.8.12-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e7e6c7107ff1bcf27c1acb4ebd4921d6a156173f2ffb16e533efe5eec158e308"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fdc62172d4f6086df63a82bb1a9d99b2ed0d7b2e581ebdf6f170a4c84eca1db7"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2be8f2aadc81ab1617c819f5c75b9e7368fdc8388214882418be72994def4257"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20abca71a9a55bf5f6c936c0b9fc1e3af87aff6dca48403ccfb27f2804d15c22"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d38a50370096d4ba098d4cdfd7f56f177f073468614beec8f954db5d2d382ec8"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:08aaf67f9bd0a6dc1ddd4ceb42f35c9a865a6596033b7d7376df6bc7fa6e27a1"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:4a3c8be85803e60f3bcbb89d506fdd49cb2094e5cccd1fe809ce38dc0800bb85"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:125c2d79054af994958f31f102ecd21454b7a402d6d68a168b1601b433473fc8"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-win32.whl", hash = "sha256:63e9a8804d6b27134e668cc9917fa814265342a37af7fc1f7ae8fba33cc56d39"}, + {file = "clickhouse_connect-0.8.12-cp310-cp310-win_amd64.whl", hash = "sha256:8c08b6bff840903d904e2baed4695c23d2d8ee144d4852d8e9c6c1f1791ae811"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f2332533651b260e5fb202ac96dc3b699ce200270e125f8680337df5e6520138"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f28622e95e8d016d348d4dd4f3c389d66f5b821a573ed42410333d95476b437e"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:507a49e70a25086a8622f8a2d6ca3225e32ce88b007ad9cc30eb35c840c83b8a"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:704c103aead930d154e2b3aa00a4d6208fc4c6f246937778867238fc4fdf407b"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4d837cd7165253610b4203fd1a99d9fe8568fa3e2068742a1c7fc675a8976c78"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7862f647263140340531f1b8da3ec17f72c086c02bcd63ca09fff0556cc59578"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a3a6c108952a55f4a88a1aaeca05cf5b91f58fc126e16e8a11b1bfd43914ae69"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7ac6d9835cda21c07bd0d766478d5f3c105ec5a9626316e34376f93ef92c501a"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-win32.whl", hash = "sha256:65f00f5da608b4bed07b7e50cd3c3de7829c17a756b12d5b83ba254a8784e532"}, + {file = "clickhouse_connect-0.8.12-cp311-cp311-win_amd64.whl", hash = "sha256:9d561faf6de50e7dc97bdff1465eaf5ec6abfc43e880fc4a834a525f20d5fd5a"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:898814c40bf700dc65db38eafb5bde1168e4210891fae92fc2459104cc9fd778"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a6a6cccf5eb313163cb76f20c7ee56a806899a32c1739a6b7c508810e0e4e52c"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d011afbf200c8efcb1a3a2bf225d03c3c2e84ea29138b77cf9a8d337fad9c96"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a2bf29edcbda62e0b3ff75458b244e544ad2646463efbf8c365f82d3264538d"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a221e9e57d032fb210f7dd2cefe4088e3cca2eacafd895d286b2cfeb37763a57"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:479e951e67b88f1a3f2ab97b33912b7c5cb7689f20ef81d7624564e149ec12f8"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:37c4b51aaaeb44985e88bcaef84eec13ec591568d24c4d362dddb08b299ceeba"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:45e38a9846b3a3bc894a0bf72184a14a81c5c7a9f67a3baa3f7a3f15dfc8b414"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-win32.whl", hash = "sha256:d8190457f044a69e3b38bf9defedd563eee410df22343f2618e081fa18330bed"}, + {file = "clickhouse_connect-0.8.12-cp312-cp312-win_amd64.whl", hash = "sha256:03828dce58e2397bc50c6382b3f09171896ce32ef9a1d962699e7eaeef563e74"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:58279ecf65ef2e67581de94885f901a6d3e1bd91e054079891807ebf24c66c35"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d35669ba723364d4d61a77e8052a7f92eec6f42705593ba75bd1992cec37c679"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbcd383c73922897abc561ba47de7a1421a9893fd47a7523f1d3fc2e6f26b104"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65b74e4589b932882bb2f7f8c559ca306bebccfc755d0e0520c4dbba0e7aea1a"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b62260afb4b12034d17d604b6df9e414a92282330f3719f8123836ff692eb5e"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:8ed29cb734fa565460872a37d04af2d312a938054c66c3ea13262fb4595e571a"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:17c037020b2c01642b197dbd577f61c79c94cc9fd556dd0edec9d288834b30c3"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:91367df99c672f127d80d10feafaedea81d011636aa8822d6da1010928aac477"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-win32.whl", hash = "sha256:223f52bfcdd9de115e6c0f56558d8bb3a0b5e00d7fd6671db8ec4bfd5187facd"}, + {file = "clickhouse_connect-0.8.12-cp313-cp313-win_amd64.whl", hash = "sha256:e6534ce5ea45a1ebf0038d209acff98965e95800c9d906a8ed0eea5180a5f384"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:935a3a328a4b36e0f3fce80233b3b234793c4e09c0a9f570e80c2455a2748c06"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4a07fb96470957a1645430ae64391f6b7fdd1b87e8cc409acdbda237591ca82b"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7686616f1d2c4131f41585c9dee533e22ae8c519d92d324f6b323533c042775"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af363f4052f9336abd3568080439ace630cd7aa9960df15854ec7d7fb086bf8d"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b859469346d8de463612492294f29465019060fe58b66c2d0f7ae28b9a04ade8"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:4a5be2ca676c9ba7d2c8c80a41406de9b9b416aa889a4a58674550175fc392a0"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:82b6fd3116e16a873618da1489bf15ec280b697ee8943ecaffdd919b93eda45c"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a566b61c8ca730fa4c250accc17c10649af18e902d03002a5783d2374ddb8943"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-win32.whl", hash = "sha256:818927c9a8131dd0e41b23d1c89c4cd0048e0cc745b201bd2bd6f6b3d11e8487"}, + {file = "clickhouse_connect-0.8.12-cp38-cp38-win_amd64.whl", hash = "sha256:4d6b25110a166d3ea7a07b8c3f49593f0710101729f851fef7f5c9fbdf14e950"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c25fa7786d5fd99b39a1bd752bbc437b94308932ddedd6e3e6437f77079290fd"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:55ef0378ddc6a82bbabfa6ae7f98ece947c9ac0fb4d0a7fc80a6124527f22f53"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d71f8062255e4729d57de480593615f7f266f8478c6ca958a7259578403cc9bf"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:924ec60ab078a2a31696c3bfee53f493c13f4167989d433c7c605ae4e77c730b"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fc5b5def8b7f6972bf3f1744061f12b9af5a2c7837dce08b31e0d2a246ec4b8"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b4de304d49f5c514505ff8ac2c3e3452315d702a70d39c848e72e858b6c81f7d"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f224c8c35ad68a934d038b897f25227d972d237cc2bc688979ebcbe898eb18f4"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:18677cd7b714e32f04fee0f4751808c2f79d7f7403345116e03b96ac934baf87"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-win32.whl", hash = "sha256:75f071410446865d232b6e7c44cb0f36f841922598e45beb9aeac8827a7baca9"}, + {file = "clickhouse_connect-0.8.12-cp39-cp39-win_amd64.whl", hash = "sha256:fa0d2bdf66a1fb919ca5323723dca0bdfe2bb664bd132fea81350d9a7e470a20"}, + {file = "clickhouse_connect-0.8.12-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7c125bfa8aa6cdc9c671cb5402e015308fea8dc2302851772071a9c15c5d2eb2"}, + {file = "clickhouse_connect-0.8.12-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:15d74a6af4093060b22c427dbfa6f41e540394dcb284b50175b7488dbd8c42f9"}, + {file = "clickhouse_connect-0.8.12-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a64663b8f6fc7a3ffecb31bc54a16564960148ee936bd8f566606996ae9f640f"}, + {file = "clickhouse_connect-0.8.12-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8e9fae76a4554c384becca09918e07e4c41bf3f948b43e3fee169644bc4f09a"}, + {file = "clickhouse_connect-0.8.12-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:badeef77fb3503c9ce1439d7d18f496e994407b9e94d8fa9eaf0899464ac3b85"}, + {file = "clickhouse_connect-0.8.12-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:84d5991e7b6db0e4041a3e3a155f0a285500ab4159149fe0a2fe97fe7f389b8d"}, + {file = "clickhouse_connect-0.8.12-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0b711bb9f906dd9efd5f6c89ac2729f6ac0a53c0efd5ff6d9e8dda8c60d212a8"}, + {file = "clickhouse_connect-0.8.12-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:dcd2efcbb3b8c068b47eb39b711022a7c3fa3a3bc399020c58e1f61a07c025e6"}, + {file = "clickhouse_connect-0.8.12-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5e3311087de7598bd2bb15fd8c518e7d727dff55493755f7fca1f3ddf3d490e"}, + {file = "clickhouse_connect-0.8.12-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1cc24439a9d027df7fa62fc9fbbf57407d02783aab4b15802cd4a8db0b4eec76"}, + {file = "clickhouse_connect-0.8.12-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c681f3432acf0835f6885d978f41e91a7850afe2443f5c07e25fe512af0237ca"}, + {file = "clickhouse_connect-0.8.12-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:51fade15d2475213dd8ea01077203d96fb33b284b719beb3890ad1c71d47223b"}, + {file = "clickhouse_connect-0.8.12-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ddf237046f50bab9b9818b7e38e18af03bafcd8b028f4f66912fcc6ca077e6c5"}, + {file = "clickhouse_connect-0.8.12-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:49d0db59e06d0b7ac5f5df64294dd5a600766462f8e56d4f899f307ad58c0146"}, + {file = "clickhouse_connect-0.8.12-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c8bace585a0bb5a05b81ba1850e7ad4de9fe5e119d4144e78188ebea059b51d"}, + {file = "clickhouse_connect-0.8.12-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b29a3523700d23f76c4472b6d99da6c1ca38a313df1ea2b81c8c5f8ff2b9d5a4"}, + {file = "clickhouse_connect-0.8.12-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:03568a0476a445e7281bab63e120164dce9327832c7893f67ac5a51506b752d5"}, + {file = "clickhouse_connect-0.8.12-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7e55fce16db16bc0d9755e001b67b9b6dbf13dd0480a465f719dc7330f151e3e"}, + {file = "clickhouse_connect-0.8.12.tar.gz", hash = "sha256:a274006617965a736f22bfe3f4ae676583b1b7ab517397908f9599d758147a20"}, +] + +[package.dependencies] +certifi = "*" +lz4 = "*" +pytz = "*" +urllib3 = ">=1.26" +zstandard = "*" + +[package.extras] +arrow = ["pyarrow"] +numpy = ["numpy"] +orjson = ["orjson"] +pandas = ["pandas"] +sqlalchemy = ["sqlalchemy (>1.3.21,<2.0)"] +tzlocal = ["tzlocal (>=4.0)"] + +[[package]] +name = "clickhouse-driver" +version = "0.2.9" +description = "Python driver with native interface for ClickHouse" +optional = false +python-versions = "<4,>=3.7" +files = [ + {file = "clickhouse-driver-0.2.9.tar.gz", hash = "sha256:050ea4870ead993910b39e7fae965dc1c347b2e8191dcd977cd4b385f9e19f87"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6ce04e9d0d0f39561f312d1ac1a8147bc9206e4267e1a23e20e0423ebac95534"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7ae5c8931bf290b9d85582e7955b9aad7f19ff9954e48caa4f9a180ea4d01078"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e51792f3bd12c32cb15a907f12de3c9d264843f0bb33dce400e3966c9f09a3f"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:42fc546c31e4a04c97b749769335a679c9044dc693fa7a93e38c97fd6727173d"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a383a403d185185c64e49edd6a19b2ec973c5adcb8ebff7ed2fc539a2cc65a5"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f05321a97e816afc75b3e4f9eda989848fecf14ecf1a91d0f22c04258123d1f7"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be47e793846aac28442b6b1c6554e0731b848a5a7759a54aa2489997354efe4a"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:780e42a215d1ae2f6d695d74dd6f087781fb2fa51c508b58f79e68c24c5364e0"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:9e28f1fe850675e173db586e9f1ac790e8f7edd507a4227cd54cd7445f8e75b6"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:125aae7f1308d3083dadbb3c78f828ae492e060f13e4007a0cf53a8169ed7b39"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:2f3c4fbb61e75c62a1ab93a1070d362de4cb5682f82833b2c12deccb3bae888d"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dc03196a84e32d23b88b665be69afae98f57426f5fdf203e16715b756757961"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-win32.whl", hash = "sha256:25695d78a1d7ad6e221e800612eac08559f6182bf6dee0a220d08de7b612d993"}, + {file = "clickhouse_driver-0.2.9-cp310-cp310-win_amd64.whl", hash = "sha256:367acac95398d721a0a2a6cf87e93638c5588b79498a9848676ce7f182540a6c"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5a7353a7a08eee3aa0001d8a5d771cb1f37e2acae1b48178002431f23892121a"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6af1c6cbc3481205503ab72a34aa76d6519249c904aa3f7a84b31e7b435555be"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48033803abd1100bfff6b9a1769d831b672cd3cda5147e0323b956fd1416d38d"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f202a58a540c85e47c31dabc8f84b6fe79dca5315c866450a538d58d6fa0571"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e4df50fd84bfa4aa1eb7b52d48136066bfb64fabb7ceb62d4c318b45a296200b"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:433a650571a0d7766eb6f402e8f5930222997686c2ee01ded22f1d8fd46af9d4"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:232ee260475611cbf7adb554b81db6b5790b36e634fe2164f4ffcd2ca3e63a71"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:09049f7e71f15c9c9a03f597f77fc1f7b61ababd155c06c0d9e64d1453d945d7"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:424153d1d5f5a807f596a48cc88119f9fb3213ca7e38f57b8d15dcc964dd91f7"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:4f078fd1cf19c4ca63b8d1e0803df665310c8d5b644c5b02bf2465e8d6ef8f55"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:f138d939e26e767537f891170b69a55a88038919f5c10d8865b67b8777fe4848"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9aafabc7e32942f85dcb46f007f447ab69024831575df97cae28c6ed127654d1"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-win32.whl", hash = "sha256:935e16ebf1a1998d8493979d858821a755503c9b8af572d9c450173d4b88868c"}, + {file = "clickhouse_driver-0.2.9-cp311-cp311-win_amd64.whl", hash = "sha256:306b3102cba278b5dfec6f5f7dc8b78416c403901510475c74913345b56c9e42"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fcb2fd00e58650ae206a6d5dbc83117240e622471aa5124733fbf2805eb8bda0"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b7a3e6b0a1eb218e3d870a94c76daaf65da46dca8f6888ea6542f94905c24d88"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a8d8e2888a857d8db3d98765a5ad23ab561241feaef68bbffc5a0bd9c142342"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85d50c011467f5ff6772c4059345968b854b72e07a0219030b7c3f68419eb7f7"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:93b395c1370629ccce8fb3e14cd5be2646d227bd32018c21f753c543e9a7e96b"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dbcee870c60d9835e5dce1456ab6b9d807e6669246357f4b321ef747b90fa43"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fffa5a5f317b1ec92e406a30a008929054cf3164d2324a3c465d0a0330273bf8"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:476702740a279744badbd177ae1c4a2d089ec128bd676861219d1f92078e4530"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:5cd6d95fab5ff80e9dc9baedc9a926f62f74072d42d5804388d63b63bec0bb63"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:05027d32d7cf3e46cb8d04f8c984745ae01bd1bc7b3579f9dadf9b3cca735697"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:3d11831842250b4c1b26503a6e9c511fc03db096608b7c6af743818c421a3032"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:81b4b671b785ebb0b8aeabf2432e47072413d81db959eb8cfd8b6ab58c5799c6"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-win32.whl", hash = "sha256:e893bd4e014877174a59e032b0e99809c95ec61328a0e6bd9352c74a2f6111a8"}, + {file = "clickhouse_driver-0.2.9-cp312-cp312-win_amd64.whl", hash = "sha256:de6624e28eeffd01668803d28ae89e3d4e359b1bff8b60e4933e1cb3c6f86f18"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:909205324089a9ee59bee7ecbfa94595435118cca310fd62efdf13f225aa2965"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03f31d6e47dc2b0f367f598f5629147ed056d7216c1788e25190fcfbfa02e749"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed84179914b2b7bb434c2322a6e7fd83daa681c97a050450511b66d917a129bb"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67d1bf63efb4ba14ae6c6da99622e4a549e68fc3ee14d859bf611d8e6a61b3fa"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eed23ea41dd582d76f7a2ec7e09cbe5e9fec008f11a4799fa35ce44a3ebd283"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a654291132766efa2703058317749d7c69b69f02d89bac75703eaf7f775e20da"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1c26c5ef16d0ef3cabc5bc03e827e01b0a4afb5b4eaf8850b7cf740cee04a1d4"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b57e83d7986d3cbda6096974a9510eb53cb33ad9072288c87c820ba5eee3370e"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:153cc03b36f22cbde55aa6a5bbe99072a025567a54c48b262eb0da15d8cd7c83"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:83a857d99192936091f495826ae97497cd1873af213b1e069d56369fb182ab8e"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bb05a9bb22cbe9ad187ad268f86adf7e60df6083331fe59c01571b7b725212dd"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-win32.whl", hash = "sha256:3e282c5c25e32d96ed151e5460d2bf4ecb805ea64449197dd918e84e768016df"}, + {file = "clickhouse_driver-0.2.9-cp37-cp37m-win_amd64.whl", hash = "sha256:c46dccfb04a9afd61a1b0e60bfefceff917f76da2c863f9b36b39248496d5c77"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:612ca9028c718f362c97f552e63d313cf1a70a616ef8532ddb0effdaf12ebef9"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:471b884d318e012f68d858476052742048918854f7dfe87d78e819f87a848ffb"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58ee63c35e99da887eb035c8d6d9e64fd298a0efc1460395297dd5cc281a6912"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0819bb63d2c5025a1fb9589f57ef82602687cef11081d6dfa6f2ce44606a1772"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f6680ee18870bca1fbab1736c8203a965efaec119ab4c37821ad99add248ee08"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:713c498741b54debd3a10a5529e70b6ed85ca33c3e8629e24ae5cd8160b5a5f2"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:730837b8f63941065c9c955c44286aef0987fb084ffb3f55bf1e4fe07df62269"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9f4e38b2ea09214c8e7848a19391009a18c56a3640e1ba1a606b9e57aeb63404"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:457f1d6639e0345b717ae603c79bd087a35361ce68c1c308d154b80b841e5e7d"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:49a55aeb8ea625a87965a96e361bbb1ad67d0931bfb2a575f899c1064e70c2da"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:9230058d8c9b1a04079afae4650fb67745f0f1c39db335728f64d48bd2c19246"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8798258bd556542dd9c6b8ebe62f9c5110c9dcdf97c57fb077e7b8b6d6da0826"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-win32.whl", hash = "sha256:ce8e3f4be46bcc63555863f70ab0035202b082b37e6f16876ef50e7bc4b47056"}, + {file = "clickhouse_driver-0.2.9-cp38-cp38-win_amd64.whl", hash = "sha256:2d982959ff628255808d895a67493f2dab0c3a9bfc65eeda0f00c8ae9962a1b3"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a46b227fab4420566ed24ee70d90076226d16fcf09c6ad4d428717efcf536446"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7eaa2ce5ea08cf5fddebb8c274c450e102f329f9e6966b6cd85aa671c48e5552"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f97f0083194d6e23b5ef6156ed0d5388c37847b298118199d7937ba26412a9e2"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6cab5cdbb0f8ee51d879d977b78f07068b585225ac656f3c081896c362e8f83"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cdb1b011a53ee71539e9dc655f268b111bac484db300da92829ed59e910a8fd0"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bf51bb761b281d20910b4b689c699ef98027845467daa5bb5dfdb53bd6ee404"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8ea462e3cebb121ff55002e9c8a9a0a3fd9b5bbbf688b4960f0a83c0172fb31"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:70bee21c245226ad0d637bf470472e2d487b86911b6d673a862127b934336ff4"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:253a3c223b944d691bf0abbd599f592ea3b36f0a71d2526833b1718f37eca5c2"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:a6549b53fc5c403dc556cb39b2ae94d73f9b113daa00438a660bb1dd5380ae4d"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:1c685cd4abe61af1c26279ff04b9f567eb4d6c1ec7fb265af7481b1f153043aa"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7e25144219577491929d032a6c3ddd63c6cd7fa764af829a5637f798190d9b26"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-win32.whl", hash = "sha256:0b9925610d25405a8e6d83ff4f54fc2456a121adb0155999972f5edd6ba3efc8"}, + {file = "clickhouse_driver-0.2.9-cp39-cp39-win_amd64.whl", hash = "sha256:b243de483cfa02716053b0148d73558f4694f3c27b97fc1eaa97d7079563a14d"}, + {file = "clickhouse_driver-0.2.9-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:45a3d5b1d06750fd6a18c29b871494a2635670099ec7693e756a5885a4a70dbf"}, + {file = "clickhouse_driver-0.2.9-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8415ffebd6ca9eef3024763abc450f8659f1716d015bd563c537d01c7fbc3569"}, + {file = "clickhouse_driver-0.2.9-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ace48db993aa4bd31c42de0fa8d38c94ad47405916d6b61f7a7168a48fb52ac1"}, + {file = "clickhouse_driver-0.2.9-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b07123334fe143bfe6fa4e3d4b732d647d5fd2cfb9ec7f2f76104b46fe9d20c6"}, + {file = "clickhouse_driver-0.2.9-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e2af3efa73d296420ce6362789f5b1febf75d4aa159a479393f01549115509d5"}, + {file = "clickhouse_driver-0.2.9-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:baf57eede88d07a1eb04352d26fc58a4d97991ca3d8840f7c5d48691dec9f251"}, + {file = "clickhouse_driver-0.2.9-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:275d0ccdab9c3571bdb3e9acfab4497930aa584ff2766b035bb2f854deaf8b82"}, + {file = "clickhouse_driver-0.2.9-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:293da77bfcac3168fb35b27c242f97c1a05502435c0686ecbb8e2e4abcb3de26"}, + {file = "clickhouse_driver-0.2.9-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d6c2e5830705e4eeef33070ca4d5a24dfa221f28f2f540e5e6842c26e70b10b"}, + {file = "clickhouse_driver-0.2.9-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:11934bd78d97dd7e1a23a6222b5edd1e1b4d34e1ead5c846dc2b5c56fdc35ff5"}, + {file = "clickhouse_driver-0.2.9-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b802b6f0fbdcc3ab81b87f09b694dde91ab049f44d1d2c08c3dc8ea9a5950cfa"}, + {file = "clickhouse_driver-0.2.9-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7af871c5315eb829ecf4533c790461ea8f73b3bfd5f533b0467e479fdf6ddcfd"}, + {file = "clickhouse_driver-0.2.9-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d577dd4867b9e26cf60590e1f500990c8701a6e3cfbb9e644f4d0c0fb607028"}, + {file = "clickhouse_driver-0.2.9-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2ed3dea2d1eca85fef5b8564ddd76dedb15a610c77d55d555b49d9f7c896b64b"}, + {file = "clickhouse_driver-0.2.9-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:91ec96f2c48e5bdeac9eea43a9bc9cc19acb2d2c59df0a13d5520dfc32457605"}, + {file = "clickhouse_driver-0.2.9-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7667ab423452754f36ba8fb41e006a46baace9c94e2aca2a745689b9f2753dfb"}, + {file = "clickhouse_driver-0.2.9-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:653583b1f3b088d106f180d6f02c90917ecd669ec956b62903a05df4a7f44863"}, + {file = "clickhouse_driver-0.2.9-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ef3dd0cbdf2f0171caab90389af0ede068ec802bf46c6a77f14e6edc86671bc"}, + {file = "clickhouse_driver-0.2.9-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11b1833ee8ff8d5df39a34a895e060b57bd81e05ea68822bc60476daff4ce1c8"}, + {file = "clickhouse_driver-0.2.9-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8a3195639e6393b9d4aafe736036881ff86b6be5855d4bf7d9f5c31637181ec3"}, +] + +[package.dependencies] +pytz = "*" +tzlocal = "*" + +[package.extras] +lz4 = ["clickhouse-cityhash (>=1.0.2.1)", "lz4", "lz4 (<=3.0.1)"] +numpy = ["numpy (>=1.12.0)", "pandas (>=0.24.0)"] +zstd = ["clickhouse-cityhash (>=1.0.2.1)", "zstd"] + [[package]] name = "colorama" version = "0.4.6" @@ -312,32 +616,49 @@ files = [ [[package]] name = "dbt-adapters" -version = "1.7.0" +version = "1.13.0" description = "The set of adapter protocols and base functionality that supports integration with dbt-core" optional = false -python-versions = ">=3.8.0" +python-versions = ">=3.9.0" files = [ - {file = "dbt_adapters-1.7.0-py3-none-any.whl", hash = "sha256:f192294112d5722c6a0981a104f7a9f57548aeeefe31b0b9d5708493f74a09f5"}, - {file = "dbt_adapters-1.7.0.tar.gz", hash = "sha256:ad3392794ed0504e2082e19b3e447701982af1ab28b91f829bb3feb986bd1b29"}, + {file = "dbt_adapters-1.13.0-py3-none-any.whl", hash = "sha256:4888f9b7d0ddb709e8219e722ee01678e31aade2b8b19595cf094a177c71dc56"}, + {file = "dbt_adapters-1.13.0.tar.gz", hash = "sha256:2e4e743d3613e7d72319edf6eb85ea2ca57133472e32ff0148c1325f21ff6d16"}, ] [package.dependencies] agate = ">=1.0,<2.0" -dbt-common = ">=1.8,<2.0" -mashumaro = {version = ">=3.0,<4.0", extras = ["msgpack"]} -protobuf = ">=3.0,<5.0" +dbt-common = ">=1.13,<2.0" +mashumaro = {version = ">=3.9,<3.15", extras = ["msgpack"]} +protobuf = ">=5.0,<6.0" pytz = ">=2015.7" typing-extensions = ">=4.0,<5.0" +[[package]] +name = "dbt-clickhouse" +version = "1.8.7" +description = "The Clickhouse plugin for dbt (data build tool)" +optional = false +python-versions = ">=3.9" +files = [ + {file = "dbt_clickhouse-1.8.7-py2.py3-none-any.whl", hash = "sha256:694dd95e6bcfcbbdcb0b1288ac920f25a25a60ba8948f76298a2062a79f618aa"}, + {file = "dbt_clickhouse-1.8.7.tar.gz", hash = "sha256:eedce8caf51624a44f6b5f6c9bb4f7d2fac797fa48deed010e904b68f08631f0"}, +] + +[package.dependencies] +clickhouse-connect = ">=0.6.22" +clickhouse-driver = ">=0.2.6" +dbt-core = ">=1.8.0,<1.9.0" +setuptools = ">=0.69" + [[package]] name = "dbt-common" -version = "1.10.0" +version = "1.14.0" description = "The shared common utilities that dbt-core and adapter implementations use" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "dbt_common-1.10.0-py3-none-any.whl", hash = "sha256:06e6fe9c6f7e13a6f1b513f98f7b1d093f1fb9c02cdbebb3b8904ec6746cc8cf"}, - {file = "dbt_common-1.10.0.tar.gz", hash = "sha256:cfd9f46e9de4f9c2c95ec70210d1be53ac41e279038d18a7928cbbfd3f9b67af"}, + {file = "dbt_common-1.14.0-py3-none-any.whl", hash = "sha256:239b568a0dd764a431b93cdfe247628622c975f2eed8abf3bc04f4dc770ad161"}, + {file = "dbt_common-1.14.0.tar.gz", hash = "sha256:2227e24a165780c5368320dedd3c6bc40038dedece48af03daab43c11bf20372"}, ] [package.dependencies] @@ -349,25 +670,25 @@ jinja2 = ">=3.1.3,<4" jsonschema = ">=4.0,<5.0" mashumaro = {version = ">=3.9,<4.0", extras = ["msgpack"]} pathspec = ">=0.9,<0.13" -protobuf = ">=4.0.0,<5.0.0" +protobuf = ">=5.0,<6.0" python-dateutil = ">=2.0,<3.0" requests = "<3.0.0" typing-extensions = ">=4.4,<5.0" [package.extras] build = ["check-wheel-contents", "twine", "wheel"] -lint = ["black (>=23.3,<24.0)", "flake8", "flake8-docstrings", "flake8-pyproject", "mypy (>=1.3,<2.0)", "pytest (>=7.3,<8.0)", "types-jinja2 (>=2.11,<3.0)", "types-jsonschema (>=4.17,<5.0)", "types-protobuf (>=4.24,<5.0)", "types-python-dateutil (>=2.8,<3.0)", "types-pyyaml (>=6.0,<7.0)", "types-requests"] +lint = ["black (>=23.3,<24.0)", "flake8", "flake8-docstrings", "flake8-pyproject", "mypy (>=1.3,<2.0)", "pytest (>=7.3,<8.0)", "types-jinja2 (>=2.11,<3.0)", "types-jsonschema (>=4.17,<5.0)", "types-protobuf (>=5.0,<6.0)", "types-python-dateutil (>=2.8,<3.0)", "types-pyyaml (>=6.0,<7.0)", "types-requests"] test = ["hypothesis (>=6.87,<7.0)", "pytest (>=7.3,<8.0)", "pytest-cov (>=4.1,<5.0)", "pytest-mock", "pytest-xdist (>=3.2,<4.0)"] [[package]] name = "dbt-core" -version = "1.8.7" +version = "1.8.9" description = "With dbt, data analysts and engineers can build analytics the way engineers build applications." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "dbt_core-1.8.7-py3-none-any.whl", hash = "sha256:3dc6a5c994cb58a2448e092bf80c071ae2bfa8e3ecdde8fa4bcd45b78c41695d"}, - {file = "dbt_core-1.8.7.tar.gz", hash = "sha256:0786999515f6eb704a0b2337f7d1846fee54eaf74add71e7a1c5f83778fc224f"}, + {file = "dbt_core-1.8.9-py3-none-any.whl", hash = "sha256:d376cf9c6eb13ed1e2a654e164bf84f4e66c57621d1681733835e49bb9cb1683"}, + {file = "dbt_core-1.8.9.tar.gz", hash = "sha256:763a69b0fa4551ceff7a98b88b4f7af05eff0db959086373369b30b342bb5b26"}, ] [package.dependencies] @@ -385,7 +706,7 @@ minimal-snowplow-tracker = ">=0.0.2,<0.1" networkx = ">=2.3,<4.0" packaging = ">20.9" pathspec = ">=0.9,<0.13" -protobuf = ">=4.0.0,<5" +protobuf = ">=5.0,<6.0" pytz = ">=2015.7" pyyaml = ">=6.0" requests = "<3.0.0" @@ -765,6 +1086,56 @@ sqlalchemy = ["sqlalchemy"] test = ["mock", "pytest", "pytest-cov (<2.6)"] zmq = ["pyzmq"] +[[package]] +name = "lz4" +version = "4.3.3" +description = "LZ4 Bindings for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "lz4-4.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b891880c187e96339474af2a3b2bfb11a8e4732ff5034be919aa9029484cd201"}, + {file = "lz4-4.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:222a7e35137d7539c9c33bb53fcbb26510c5748779364014235afc62b0ec797f"}, + {file = "lz4-4.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f76176492ff082657ada0d0f10c794b6da5800249ef1692b35cf49b1e93e8ef7"}, + {file = "lz4-4.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1d18718f9d78182c6b60f568c9a9cec8a7204d7cb6fad4e511a2ef279e4cb05"}, + {file = "lz4-4.3.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6cdc60e21ec70266947a48839b437d46025076eb4b12c76bd47f8e5eb8a75dcc"}, + {file = "lz4-4.3.3-cp310-cp310-win32.whl", hash = "sha256:c81703b12475da73a5d66618856d04b1307e43428a7e59d98cfe5a5d608a74c6"}, + {file = "lz4-4.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:43cf03059c0f941b772c8aeb42a0813d68d7081c009542301637e5782f8a33e2"}, + {file = "lz4-4.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30e8c20b8857adef7be045c65f47ab1e2c4fabba86a9fa9a997d7674a31ea6b6"}, + {file = "lz4-4.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2f7b1839f795315e480fb87d9bc60b186a98e3e5d17203c6e757611ef7dcef61"}, + {file = "lz4-4.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edfd858985c23523f4e5a7526ca6ee65ff930207a7ec8a8f57a01eae506aaee7"}, + {file = "lz4-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563"}, + {file = "lz4-4.3.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2507ee9c99dbddd191c86f0e0c8b724c76d26b0602db9ea23232304382e1f21"}, + {file = "lz4-4.3.3-cp311-cp311-win32.whl", hash = "sha256:f180904f33bdd1e92967923a43c22899e303906d19b2cf8bb547db6653ea6e7d"}, + {file = "lz4-4.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:b14d948e6dce389f9a7afc666d60dd1e35fa2138a8ec5306d30cd2e30d36b40c"}, + {file = "lz4-4.3.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e36cd7b9d4d920d3bfc2369840da506fa68258f7bb176b8743189793c055e43d"}, + {file = "lz4-4.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:31ea4be9d0059c00b2572d700bf2c1bc82f241f2c3282034a759c9a4d6ca4dc2"}, + {file = "lz4-4.3.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33c9a6fd20767ccaf70649982f8f3eeb0884035c150c0b818ea660152cf3c809"}, + {file = "lz4-4.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bca8fccc15e3add173da91be8f34121578dc777711ffd98d399be35487c934bf"}, + {file = "lz4-4.3.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7d84b479ddf39fe3ea05387f10b779155fc0990125f4fb35d636114e1c63a2e"}, + {file = "lz4-4.3.3-cp312-cp312-win32.whl", hash = "sha256:337cb94488a1b060ef1685187d6ad4ba8bc61d26d631d7ba909ee984ea736be1"}, + {file = "lz4-4.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:5d35533bf2cee56f38ced91f766cd0038b6abf46f438a80d50c52750088be93f"}, + {file = "lz4-4.3.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:363ab65bf31338eb364062a15f302fc0fab0a49426051429866d71c793c23394"}, + {file = "lz4-4.3.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0a136e44a16fc98b1abc404fbabf7f1fada2bdab6a7e970974fb81cf55b636d0"}, + {file = "lz4-4.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abc197e4aca8b63f5ae200af03eb95fb4b5055a8f990079b5bdf042f568469dd"}, + {file = "lz4-4.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56f4fe9c6327adb97406f27a66420b22ce02d71a5c365c48d6b656b4aaeb7775"}, + {file = "lz4-4.3.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0e822cd7644995d9ba248cb4b67859701748a93e2ab7fc9bc18c599a52e4604"}, + {file = "lz4-4.3.3-cp38-cp38-win32.whl", hash = "sha256:24b3206de56b7a537eda3a8123c644a2b7bf111f0af53bc14bed90ce5562d1aa"}, + {file = "lz4-4.3.3-cp38-cp38-win_amd64.whl", hash = "sha256:b47839b53956e2737229d70714f1d75f33e8ac26e52c267f0197b3189ca6de24"}, + {file = "lz4-4.3.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6756212507405f270b66b3ff7f564618de0606395c0fe10a7ae2ffcbbe0b1fba"}, + {file = "lz4-4.3.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee9ff50557a942d187ec85462bb0960207e7ec5b19b3b48949263993771c6205"}, + {file = "lz4-4.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2b901c7784caac9a1ded4555258207d9e9697e746cc8532129f150ffe1f6ba0d"}, + {file = "lz4-4.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6d9ec061b9eca86e4dcc003d93334b95d53909afd5a32c6e4f222157b50c071"}, + {file = "lz4-4.3.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4c7bf687303ca47d69f9f0133274958fd672efaa33fb5bcde467862d6c621f0"}, + {file = "lz4-4.3.3-cp39-cp39-win32.whl", hash = "sha256:054b4631a355606e99a42396f5db4d22046a3397ffc3269a348ec41eaebd69d2"}, + {file = "lz4-4.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:eac9af361e0d98335a02ff12fb56caeb7ea1196cf1a49dbf6f17828a131da807"}, + {file = "lz4-4.3.3.tar.gz", hash = "sha256:01fe674ef2889dbb9899d8a67361e0c4a2c833af5aeb37dd505727cf5d2a131e"}, +] + +[package.extras] +docs = ["sphinx (>=1.6.0)", "sphinx-bootstrap-theme"] +flake8 = ["flake8"] +tests = ["psutil", "pytest (!=3.3.0)", "pytest-cov"] + [[package]] name = "markdown-it-py" version = "3.0.0" @@ -1281,22 +1652,22 @@ virtualenv = ">=20.10.0" [[package]] name = "protobuf" -version = "4.25.5" +version = "5.29.2" description = "" optional = false python-versions = ">=3.8" files = [ - {file = "protobuf-4.25.5-cp310-abi3-win32.whl", hash = "sha256:5e61fd921603f58d2f5acb2806a929b4675f8874ff5f330b7d6f7e2e784bbcd8"}, - {file = "protobuf-4.25.5-cp310-abi3-win_amd64.whl", hash = "sha256:4be0571adcbe712b282a330c6e89eae24281344429ae95c6d85e79e84780f5ea"}, - {file = "protobuf-4.25.5-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:b2fde3d805354df675ea4c7c6338c1aecd254dfc9925e88c6d31a2bcb97eb173"}, - {file = "protobuf-4.25.5-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:919ad92d9b0310070f8356c24b855c98df2b8bd207ebc1c0c6fcc9ab1e007f3d"}, - {file = "protobuf-4.25.5-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:fe14e16c22be926d3abfcb500e60cab068baf10b542b8c858fa27e098123e331"}, - {file = "protobuf-4.25.5-cp38-cp38-win32.whl", hash = "sha256:98d8d8aa50de6a2747efd9cceba361c9034050ecce3e09136f90de37ddba66e1"}, - {file = "protobuf-4.25.5-cp38-cp38-win_amd64.whl", hash = "sha256:b0234dd5a03049e4ddd94b93400b67803c823cfc405689688f59b34e0742381a"}, - {file = "protobuf-4.25.5-cp39-cp39-win32.whl", hash = "sha256:abe32aad8561aa7cc94fc7ba4fdef646e576983edb94a73381b03c53728a626f"}, - {file = "protobuf-4.25.5-cp39-cp39-win_amd64.whl", hash = "sha256:7a183f592dc80aa7c8da7ad9e55091c4ffc9497b3054452d629bb85fa27c2a45"}, - {file = "protobuf-4.25.5-py3-none-any.whl", hash = "sha256:0aebecb809cae990f8129ada5ca273d9d670b76d9bfc9b1809f0a9c02b7dbf41"}, - {file = "protobuf-4.25.5.tar.gz", hash = "sha256:7f8249476b4a9473645db7f8ab42b02fe1488cbe5fb72fddd445e0665afd8584"}, + {file = "protobuf-5.29.2-cp310-abi3-win32.whl", hash = "sha256:c12ba8249f5624300cf51c3d0bfe5be71a60c63e4dcf51ffe9a68771d958c851"}, + {file = "protobuf-5.29.2-cp310-abi3-win_amd64.whl", hash = "sha256:842de6d9241134a973aab719ab42b008a18a90f9f07f06ba480df268f86432f9"}, + {file = "protobuf-5.29.2-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a0c53d78383c851bfa97eb42e3703aefdc96d2036a41482ffd55dc5f529466eb"}, + {file = "protobuf-5.29.2-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:494229ecd8c9009dd71eda5fd57528395d1eacdf307dbece6c12ad0dd09e912e"}, + {file = "protobuf-5.29.2-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:b6b0d416bbbb9d4fbf9d0561dbfc4e324fd522f61f7af0fe0f282ab67b22477e"}, + {file = "protobuf-5.29.2-cp38-cp38-win32.whl", hash = "sha256:e621a98c0201a7c8afe89d9646859859be97cb22b8bf1d8eacfd90d5bda2eb19"}, + {file = "protobuf-5.29.2-cp38-cp38-win_amd64.whl", hash = "sha256:13d6d617a2a9e0e82a88113d7191a1baa1e42c2cc6f5f1398d3b054c8e7e714a"}, + {file = "protobuf-5.29.2-cp39-cp39-win32.whl", hash = "sha256:36000f97ea1e76e8398a3f02936aac2a5d2b111aae9920ec1b769fc4a222c4d9"}, + {file = "protobuf-5.29.2-cp39-cp39-win_amd64.whl", hash = "sha256:2d2e674c58a06311c8e99e74be43e7f3a8d1e2b2fdf845eaa347fbd866f23355"}, + {file = "protobuf-5.29.2-py3-none-any.whl", hash = "sha256:fde4554c0e578a5a0bcc9a276339594848d1e89f9ea47b4427c80e5d72f90181"}, + {file = "protobuf-5.29.2.tar.gz", hash = "sha256:b2cc8e8bb7c9326996f0e160137b0861f1a82162502658df2951209d0cb0309e"}, ] [[package]] @@ -1380,6 +1751,17 @@ files = [ {file = "psycopg2_binary-2.9.9-cp39-cp39-win_amd64.whl", hash = "sha256:f7ae5d65ccfbebdfa761585228eb4d0df3a8b15cfb53bd953e713e09fbb12957"}, ] +[[package]] +name = "pycparser" +version = "2.22" +description = "C parser in Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, +] + [[package]] name = "pydantic" version = "2.9.2" @@ -1937,6 +2319,26 @@ dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodest doc = ["jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.13.1)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<=7.3.7)", "sphinx-design (>=0.4.0)"] test = ["Cython", "array-api-strict (>=2.0)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] +[[package]] +name = "setuptools" +version = "75.7.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +optional = false +python-versions = ">=3.9" +files = [ + {file = "setuptools-75.7.0-py3-none-any.whl", hash = "sha256:84fb203f278ebcf5cd08f97d3fb96d3fbed4b629d500b29ad60d11e00769b183"}, + {file = "setuptools-75.7.0.tar.gz", hash = "sha256:886ff7b16cd342f1d1defc16fc98c9ce3fde69e087a4e1983d7ab634e5f41f4f"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.8.0)"] +core = ["importlib_metadata (>=6)", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] +type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.14.*)", "pytest-mypy"] + [[package]] name = "six" version = "1.16.0" @@ -2072,6 +2474,23 @@ files = [ {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, ] +[[package]] +name = "tzlocal" +version = "5.2" +description = "tzinfo object for the local timezone" +optional = false +python-versions = ">=3.8" +files = [ + {file = "tzlocal-5.2-py3-none-any.whl", hash = "sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8"}, + {file = "tzlocal-5.2.tar.gz", hash = "sha256:8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e"}, +] + +[package.dependencies] +tzdata = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +devenv = ["check-manifest", "pytest (>=4.3)", "pytest-cov", "pytest-mock (>=3.3)", "zest.releaser"] + [[package]] name = "urllib3" version = "2.2.3" @@ -2128,7 +2547,119 @@ enabler = ["pytest-enabler (>=2.2)"] test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] +[[package]] +name = "zstandard" +version = "0.23.0" +description = "Zstandard bindings for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zstandard-0.23.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bf0a05b6059c0528477fba9054d09179beb63744355cab9f38059548fedd46a9"}, + {file = "zstandard-0.23.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fc9ca1c9718cb3b06634c7c8dec57d24e9438b2aa9a0f02b8bb36bf478538880"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77da4c6bfa20dd5ea25cbf12c76f181a8e8cd7ea231c673828d0386b1740b8dc"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2170c7e0367dde86a2647ed5b6f57394ea7f53545746104c6b09fc1f4223573"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c16842b846a8d2a145223f520b7e18b57c8f476924bda92aeee3a88d11cfc391"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:157e89ceb4054029a289fb504c98c6a9fe8010f1680de0201b3eb5dc20aa6d9e"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:203d236f4c94cd8379d1ea61db2fce20730b4c38d7f1c34506a31b34edc87bdd"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:dc5d1a49d3f8262be192589a4b72f0d03b72dcf46c51ad5852a4fdc67be7b9e4"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:752bf8a74412b9892f4e5b58f2f890a039f57037f52c89a740757ebd807f33ea"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80080816b4f52a9d886e67f1f96912891074903238fe54f2de8b786f86baded2"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:84433dddea68571a6d6bd4fbf8ff398236031149116a7fff6f777ff95cad3df9"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ab19a2d91963ed9e42b4e8d77cd847ae8381576585bad79dbd0a8837a9f6620a"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:59556bf80a7094d0cfb9f5e50bb2db27fefb75d5138bb16fb052b61b0e0eeeb0"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:27d3ef2252d2e62476389ca8f9b0cf2bbafb082a3b6bfe9d90cbcbb5529ecf7c"}, + {file = "zstandard-0.23.0-cp310-cp310-win32.whl", hash = "sha256:5d41d5e025f1e0bccae4928981e71b2334c60f580bdc8345f824e7c0a4c2a813"}, + {file = "zstandard-0.23.0-cp310-cp310-win_amd64.whl", hash = "sha256:519fbf169dfac1222a76ba8861ef4ac7f0530c35dd79ba5727014613f91613d4"}, + {file = "zstandard-0.23.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:34895a41273ad33347b2fc70e1bff4240556de3c46c6ea430a7ed91f9042aa4e"}, + {file = "zstandard-0.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:77ea385f7dd5b5676d7fd943292ffa18fbf5c72ba98f7d09fc1fb9e819b34c23"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:983b6efd649723474f29ed42e1467f90a35a74793437d0bc64a5bf482bedfa0a"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80a539906390591dd39ebb8d773771dc4db82ace6372c4d41e2d293f8e32b8db"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:445e4cb5048b04e90ce96a79b4b63140e3f4ab5f662321975679b5f6360b90e2"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd30d9c67d13d891f2360b2a120186729c111238ac63b43dbd37a5a40670b8ca"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d20fd853fbb5807c8e84c136c278827b6167ded66c72ec6f9a14b863d809211c"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ed1708dbf4d2e3a1c5c69110ba2b4eb6678262028afd6c6fbcc5a8dac9cda68e"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:be9b5b8659dff1f913039c2feee1aca499cfbc19e98fa12bc85e037c17ec6ca5"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:65308f4b4890aa12d9b6ad9f2844b7ee42c7f7a4fd3390425b242ffc57498f48"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98da17ce9cbf3bfe4617e836d561e433f871129e3a7ac16d6ef4c680f13a839c"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8ed7d27cb56b3e058d3cf684d7200703bcae623e1dcc06ed1e18ecda39fee003"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:b69bb4f51daf461b15e7b3db033160937d3ff88303a7bc808c67bbc1eaf98c78"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:034b88913ecc1b097f528e42b539453fa82c3557e414b3de9d5632c80439a473"}, + {file = "zstandard-0.23.0-cp311-cp311-win32.whl", hash = "sha256:f2d4380bf5f62daabd7b751ea2339c1a21d1c9463f1feb7fc2bdcea2c29c3160"}, + {file = "zstandard-0.23.0-cp311-cp311-win_amd64.whl", hash = "sha256:62136da96a973bd2557f06ddd4e8e807f9e13cbb0bfb9cc06cfe6d98ea90dfe0"}, + {file = "zstandard-0.23.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b4567955a6bc1b20e9c31612e615af6b53733491aeaa19a6b3b37f3b65477094"}, + {file = "zstandard-0.23.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e172f57cd78c20f13a3415cc8dfe24bf388614324d25539146594c16d78fcc8"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0e166f698c5a3e914947388c162be2583e0c638a4703fc6a543e23a88dea3c1"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12a289832e520c6bd4dcaad68e944b86da3bad0d339ef7989fb7e88f92e96072"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d50d31bfedd53a928fed6707b15a8dbeef011bb6366297cc435accc888b27c20"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72c68dda124a1a138340fb62fa21b9bf4848437d9ca60bd35db36f2d3345f373"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53dd9d5e3d29f95acd5de6802e909ada8d8d8cfa37a3ac64836f3bc4bc5512db"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6a41c120c3dbc0d81a8e8adc73312d668cd34acd7725f036992b1b72d22c1772"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:40b33d93c6eddf02d2c19f5773196068d875c41ca25730e8288e9b672897c105"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9206649ec587e6b02bd124fb7799b86cddec350f6f6c14bc82a2b70183e708ba"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:76e79bc28a65f467e0409098fa2c4376931fd3207fbeb6b956c7c476d53746dd"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:66b689c107857eceabf2cf3d3fc699c3c0fe8ccd18df2219d978c0283e4c508a"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9c236e635582742fee16603042553d276cca506e824fa2e6489db04039521e90"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a8fffdbd9d1408006baaf02f1068d7dd1f016c6bcb7538682622c556e7b68e35"}, + {file = "zstandard-0.23.0-cp312-cp312-win32.whl", hash = "sha256:dc1d33abb8a0d754ea4763bad944fd965d3d95b5baef6b121c0c9013eaf1907d"}, + {file = "zstandard-0.23.0-cp312-cp312-win_amd64.whl", hash = "sha256:64585e1dba664dc67c7cdabd56c1e5685233fbb1fc1966cfba2a340ec0dfff7b"}, + {file = "zstandard-0.23.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:576856e8594e6649aee06ddbfc738fec6a834f7c85bf7cadd1c53d4a58186ef9"}, + {file = "zstandard-0.23.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38302b78a850ff82656beaddeb0bb989a0322a8bbb1bf1ab10c17506681d772a"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2240ddc86b74966c34554c49d00eaafa8200a18d3a5b6ffbf7da63b11d74ee2"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ef230a8fd217a2015bc91b74f6b3b7d6522ba48be29ad4ea0ca3a3775bf7dd5"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:774d45b1fac1461f48698a9d4b5fa19a69d47ece02fa469825b442263f04021f"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f77fa49079891a4aab203d0b1744acc85577ed16d767b52fc089d83faf8d8ed"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac184f87ff521f4840e6ea0b10c0ec90c6b1dcd0bad2f1e4a9a1b4fa177982ea"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c363b53e257246a954ebc7c488304b5592b9c53fbe74d03bc1c64dda153fb847"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e7792606d606c8df5277c32ccb58f29b9b8603bf83b48639b7aedf6df4fe8171"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a0817825b900fcd43ac5d05b8b3079937073d2b1ff9cf89427590718b70dd840"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9da6bc32faac9a293ddfdcb9108d4b20416219461e4ec64dfea8383cac186690"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:fd7699e8fd9969f455ef2926221e0233f81a2542921471382e77a9e2f2b57f4b"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d477ed829077cd945b01fc3115edd132c47e6540ddcd96ca169facff28173057"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa6ce8b52c5987b3e34d5674b0ab529a4602b632ebab0a93b07bfb4dfc8f8a33"}, + {file = "zstandard-0.23.0-cp313-cp313-win32.whl", hash = "sha256:a9b07268d0c3ca5c170a385a0ab9fb7fdd9f5fd866be004c4ea39e44edce47dd"}, + {file = "zstandard-0.23.0-cp313-cp313-win_amd64.whl", hash = "sha256:f3513916e8c645d0610815c257cbfd3242adfd5c4cfa78be514e5a3ebb42a41b"}, + {file = "zstandard-0.23.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2ef3775758346d9ac6214123887d25c7061c92afe1f2b354f9388e9e4d48acfc"}, + {file = "zstandard-0.23.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4051e406288b8cdbb993798b9a45c59a4896b6ecee2f875424ec10276a895740"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2d1a054f8f0a191004675755448d12be47fa9bebbcffa3cdf01db19f2d30a54"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f83fa6cae3fff8e98691248c9320356971b59678a17f20656a9e59cd32cee6d8"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:32ba3b5ccde2d581b1e6aa952c836a6291e8435d788f656fe5976445865ae045"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f146f50723defec2975fb7e388ae3a024eb7151542d1599527ec2aa9cacb152"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1bfe8de1da6d104f15a60d4a8a768288f66aa953bbe00d027398b93fb9680b26"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:29a2bc7c1b09b0af938b7a8343174b987ae021705acabcbae560166567f5a8db"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:61f89436cbfede4bc4e91b4397eaa3e2108ebe96d05e93d6ccc95ab5714be512"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:53ea7cdc96c6eb56e76bb06894bcfb5dfa93b7adcf59d61c6b92674e24e2dd5e"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:a4ae99c57668ca1e78597d8b06d5af837f377f340f4cce993b551b2d7731778d"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:379b378ae694ba78cef921581ebd420c938936a153ded602c4fea612b7eaa90d"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:50a80baba0285386f97ea36239855f6020ce452456605f262b2d33ac35c7770b"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:61062387ad820c654b6a6b5f0b94484fa19515e0c5116faf29f41a6bc91ded6e"}, + {file = "zstandard-0.23.0-cp38-cp38-win32.whl", hash = "sha256:b8c0bd73aeac689beacd4e7667d48c299f61b959475cdbb91e7d3d88d27c56b9"}, + {file = "zstandard-0.23.0-cp38-cp38-win_amd64.whl", hash = "sha256:a05e6d6218461eb1b4771d973728f0133b2a4613a6779995df557f70794fd60f"}, + {file = "zstandard-0.23.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3aa014d55c3af933c1315eb4bb06dd0459661cc0b15cd61077afa6489bec63bb"}, + {file = "zstandard-0.23.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7f0804bb3799414af278e9ad51be25edf67f78f916e08afdb983e74161b916"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb2b1ecfef1e67897d336de3a0e3f52478182d6a47eda86cbd42504c5cbd009a"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:837bb6764be6919963ef41235fd56a6486b132ea64afe5fafb4cb279ac44f259"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1516c8c37d3a053b01c1c15b182f3b5f5eef19ced9b930b684a73bad121addf4"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48ef6a43b1846f6025dde6ed9fee0c24e1149c1c25f7fb0a0585572b2f3adc58"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11e3bf3c924853a2d5835b24f03eeba7fc9b07d8ca499e247e06ff5676461a15"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2fb4535137de7e244c230e24f9d1ec194f61721c86ebea04e1581d9d06ea1269"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8c24f21fa2af4bb9f2c492a86fe0c34e6d2c63812a839590edaf177b7398f700"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a8c86881813a78a6f4508ef9daf9d4995b8ac2d147dcb1a450448941398091c9"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fe3b385d996ee0822fd46528d9f0443b880d4d05528fd26a9119a54ec3f91c69"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:82d17e94d735c99621bf8ebf9995f870a6b3e6d14543b99e201ae046dfe7de70"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c7c517d74bea1a6afd39aa612fa025e6b8011982a0897768a2f7c8ab4ebb78a2"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fd7e0f1cfb70eb2f95a19b472ee7ad6d9a0a992ec0ae53286870c104ca939e5"}, + {file = "zstandard-0.23.0-cp39-cp39-win32.whl", hash = "sha256:43da0f0092281bf501f9c5f6f3b4c975a8a0ea82de49ba3f7100e64d422a1274"}, + {file = "zstandard-0.23.0-cp39-cp39-win_amd64.whl", hash = "sha256:f8346bfa098532bc1fb6c7ef06783e969d87a99dd1d2a5a18a892c1d7a643c58"}, + {file = "zstandard-0.23.0.tar.gz", hash = "sha256:b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09"}, +] + +[package.dependencies] +cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\""} + +[package.extras] +cffi = ["cffi (>=1.11)"] + [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "927a5a6c1a2d57d612fc982a1f8ab7617613f19e8f553d843fb61565a1a80565" +content-hash = "3e9b09708c82930a638443866e715ca98401663372b3b542581330c5faa7cb93" diff --git a/pyproject.toml b/pyproject.toml index d556ba1..8223bba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,9 +26,10 @@ statsmodels = "*" tabulate = "*" dbt-postgres = "^1.6.6" pyyaml = "*" +dbt-clickhouse = "^1.8.7" [tool.ruff] -line-length = 100 +line-length = 120 [tool.ruff.lint] select = ["F", "E", "W", "I001"] diff --git a/run b/run index 3562fc6..4d8358e 100755 --- a/run +++ b/run @@ -2,48 +2,51 @@ set -eo pipefail +export DBT_PROFILES_DIR=./integration_tests/profiles +export DBT_PROJECT_DIR=./integration_tests + if [ -f .env ]; then # shellcheck disable=SC2002,SC2046 export $(cat .env | xargs) fi +function dbt { + poetry run dbt "${@}" +} + function setup { poetry install poetry run pre-commit install } function test { - local target="${1-"dbt-duckdb"}" + local target="${1-"duckdb"}" - if [ -z "${GITHUB_ACTIONS}" ] && [ "${target}" = "dbt-postgres" ]; + if [ -z "${GITHUB_ACTIONS}" ] && [ "${target}" = "postgres" ]; then createdb "${POSTGRES_DB-"dbt_linreg"}" || true fi - if [ -z "${GITHUB_ACTIONS}" ] && [ "${target}" = "dbt-duckdb" ]; + if [ "${target}" = "clickhouse" ]; + then + docker run \ + -d \ + -p 8123:8123 \ + --name dbt-linreg-clickhouse \ + --ulimit nofile=262144:262144 \ + clickhouse/clickhouse-server || true + fi + + if [ -z "${GITHUB_ACTIONS}" ] && [ "${target}" = "duckdb" ]; then rm -f dbt.duckdb fi - poetry run python scripts.py gen-test-cases --skip-if-exists - poetry run dbt deps \ - --project-dir ./integration_tests \ - --profiles-dir ./integration_tests/profiles \ - --target "${target}" - poetry run dbt seed \ - --project-dir ./integration_tests \ - --profiles-dir ./integration_tests/profiles \ - --target "${target}" - poetry run dbt run \ - --project-dir ./integration_tests \ - --profiles-dir ./integration_tests/profiles \ - --target "${target}" \ - --selector "${target}-selector" - poetry run dbt test \ - --project-dir ./integration_tests \ - --profiles-dir ./integration_tests/profiles \ - --target "${target}" \ - --selector "${target}-selector" + poetry run python scripts.py gen-test-cases + dbt deps --target "${target}" + dbt seed --target "${target}" + dbt run --target "${target}" --selector "${target}-selector" + dbt test --target "${target}" --selector "${target}-selector" --store-failures } function lint { diff --git a/scripts.py b/scripts.py index 08b6b82..b1e3d39 100644 --- a/scripts.py +++ b/scripts.py @@ -192,7 +192,7 @@ def click_option_size(**kwargs): ) -@click.group("main") +@click.group("main", context_settings=dict(help_option_names=["-h", "--help"])) def cli(): """CLI for manually testing the code base."""