feat: add marquez-cli tool for OpenLineage/Marquez management

Añadido binario CLI en Go para gestionar datasets, jobs y runs en Marquez.

Características:
- Enviar eventos OpenLineage (START, RUNNING, COMPLETE, FAIL)
- Registrar y consultar datasets
- Registrar y consultar jobs y runs
- Consultar lineage de datasets con formato texto/JSON
- Listar recursos (namespaces, jobs, datasets)
- Sin dependencias externas (solo Go stdlib)
- Binario estático compilado de ~5MB

Archivos:
- tools/marquez-cli/main.go: CLI principal con comandos
- tools/marquez-cli/openlineage.go: Cliente HTTP y estructuras OpenLineage
- tools/marquez-cli/go.mod: Módulo de Go
- tools/marquez-cli/Makefile: Build automation
- tools/marquez-cli/README.md: Documentación completa
- tools/marquez-cli/QUICKSTART.md: Guía rápida de uso

Instalación: make install en ~/.local/bin/marquez-cli
This commit is contained in:
2026-03-23 23:40:55 +01:00
parent ea84a8e1f8
commit 5f3bc84696
7 changed files with 1748 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
# Makefile for marquez-cli
BINARY_NAME=marquez-cli
INSTALL_PATH=$(HOME)/.local/bin
GO=go
GOFLAGS=-ldflags="-s -w"
.PHONY: all build install clean test help
all: build
## build: Build the binary
build:
@echo "Building $(BINARY_NAME)..."
@$(GO) build $(GOFLAGS) -o $(BINARY_NAME) .
@echo "✓ Binary built: ./$(BINARY_NAME)"
## install: Build and install to ~/.local/bin
install: build
@echo "Installing $(BINARY_NAME) to $(INSTALL_PATH)..."
@mkdir -p $(INSTALL_PATH)
@cp $(BINARY_NAME) $(INSTALL_PATH)/
@chmod +x $(INSTALL_PATH)/$(BINARY_NAME)
@echo "✓ Installed to $(INSTALL_PATH)/$(BINARY_NAME)"
@echo ""
@echo "Make sure $(INSTALL_PATH) is in your PATH:"
@echo " export PATH=\"\$$PATH:$(INSTALL_PATH)\""
## clean: Remove built binaries
clean:
@echo "Cleaning..."
@rm -f $(BINARY_NAME)
@echo "✓ Cleaned"
## test: Run tests
test:
@echo "Running tests..."
@$(GO) test -v ./...
## uninstall: Remove installed binary
uninstall:
@echo "Uninstalling $(BINARY_NAME)..."
@rm -f $(INSTALL_PATH)/$(BINARY_NAME)
@echo "✓ Uninstalled"
## help: Show this help
help:
@echo "Available targets:"
@sed -n 's/^##//p' Makefile | column -t -s ':' | sed -e 's/^/ /'