dbt: init at 1.5.3
Add a top-level dbt application with a passthru function that should be used to extend it with adapters.
This commit is contained in:
parent
859e95e2bd
commit
4bfbc45869
|
@ -1,4 +1,5 @@
|
|||
{ lib
|
||||
, python3
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, agate
|
||||
|
@ -81,11 +82,32 @@ buildPythonPackage rec {
|
|||
# tests exist for the dbt tool but not for this package specifically
|
||||
doCheck = false;
|
||||
|
||||
passthru = {
|
||||
withAdapters = python3.pkgs.callPackage ./with-adapters.nix { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications";
|
||||
longDescription = ''
|
||||
The dbt tool needs adapters to data sources in order to work. The available
|
||||
adapters are:
|
||||
|
||||
dbt-bigquery
|
||||
dbt-postgres
|
||||
dbt-redshift
|
||||
dbt-snowflake
|
||||
|
||||
An example of building this package with a few adapters:
|
||||
|
||||
dbt.withAdapters (adapters: [
|
||||
adapters.dbt-bigquery
|
||||
adapters.dbt-postgres
|
||||
])
|
||||
'';
|
||||
homepage = "https://github.com/dbt-labs/dbt-core";
|
||||
changelog = "https://github.com/dbt-labs/dbt-core/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ mausch tjni ];
|
||||
mainProgram = "dbt";
|
||||
};
|
||||
}
|
||||
|
|
18
pkgs/development/python-modules/dbt-core/with-adapters.nix
Normal file
18
pkgs/development/python-modules/dbt-core/with-adapters.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ python3
|
||||
, dbt-bigquery
|
||||
, dbt-core
|
||||
, dbt-postgres
|
||||
, dbt-redshift
|
||||
, dbt-snowflake
|
||||
}:
|
||||
let
|
||||
adapters = {
|
||||
inherit dbt-bigquery dbt-postgres dbt-redshift dbt-snowflake;
|
||||
};
|
||||
in
|
||||
adapterFun: (python3.buildEnv.override {
|
||||
extraLibs = [ dbt-core ] ++ (adapterFun adapters);
|
||||
ignoreCollisions = true;
|
||||
}).overrideAttrs {
|
||||
meta.mainProgram = dbt-core.meta.mainProgram;
|
||||
}
|
|
@ -18752,6 +18752,8 @@ with pkgs;
|
|||
|
||||
cwltool = callPackage ../applications/science/misc/cwltool { };
|
||||
|
||||
dbt = with python3Packages; toPythonApplication dbt-core;
|
||||
|
||||
dprint = callPackage ../development/tools/dprint {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue