chore: prepare deps and make to deploy meltano
This commit is contained in:
parent
bc02946bd5
commit
c85ffdfbcd
4 changed files with 38 additions and 8 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,4 +1,6 @@
|
||||||
.env
|
.env
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
*/target
|
*/target
|
||||||
|
|
||||||
|
.venv
|
||||||
7
Makefile
7
Makefile
|
|
@ -17,4 +17,9 @@ 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
|
||||||
|
|
||||||
34
flake.nix
34
flake.nix
|
|
@ -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
1
requirements.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
meltano==3.8.0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue