chore: prepare deps and make to deploy meltano

This commit is contained in:
counterweight 2025-07-25 14:27:13 +02:00
parent bc02946bd5
commit c85ffdfbcd
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 38 additions and 8 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@
.vscode .vscode
*/target */target
.venv

View file

@ -18,3 +18,8 @@ reset: stop
run-rust: run-rust:
cargo build --manifest-path rust/Cargo.toml cargo build --manifest-path rust/Cargo.toml
cargo run --manifest-path rust/Cargo.toml cargo run --manifest-path rust/Cargo.toml
setup-meltano-deps:
meltano init pizza_dw
cd pizza_dw && meltano add extractor tap-postgres && meltano add loader target-postgres

View file

@ -10,18 +10,40 @@
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
python-with-deps = pkgs.python3.withPackages (ps: with ps; [
pip
setuptools
wheel
psycopg2
]);
venvDir = ".venv";
in { in {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ packages = [
rustup pkgs.rustup
pkg-config pkgs.cargo
openssl pkgs.docker
postgresql pkgs.postgresql
sqlx-cli python-with-deps
]; ];
shellHook = '' shellHook = ''
echo " Rust + PostgreSQL dev env ready" echo " Rust + PostgreSQL dev env ready"
if [ ! -d ${venvDir} ]; then
echo "🐍 Creating Python virtualenv..."
python3 -m venv ${venvDir}
fi
source ${venvDir}/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
echo "Python env ready"
''; '';
}; };
}); });

1
requirements.txt Normal file
View file

@ -0,0 +1 @@
meltano==3.8.0