Calidad de datos en CI con SQL DuckDB y http_client

Guía para usar DuckDB con la extensión http_client en CI y validar que los manejos de GitHub existen y devuelven 200, con ejemplos, vistas y checks, e integración con GitHub Actions para calidad de datos en pipelines

8 sept 2025 • 2 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

En entornos de integraci?n continua CI la calidad de datos es clave para evitar errores en producci?n y filtraciones de datos incorrectos. En este art?culo explico c?mo usar DuckDB con la extensi?n http_client para verificar que manejos de GitHub almacenados en una tabla realmente existen, ideal para añadir validaciones en pipelines de CI.

En Q2BSTUDIO, empresa de desarrollo de software y aplicaciones a medida, ayudamos a implantar controles autom?ticos de calidad de datos en pipelines CI y a integrar estas comprobaciones con soluciones de automatizaci?n de procesos y despliegues en la nube.

Resumen r?pido de los pasos necesarios para usar DuckDB y http_client

1 Instalar y cargar la extensi?n INSTALL http_client FROM community; LOAD http_client;

2 Crear una tabla de ejemplo con manejos de GitHub CREATE OR REPLACE TABLE person_gh_member (sam_accountname varchar PRIMARY KEY, gh_member varchar NOT NULL); INSERT INTO person_gh_member (sam_accountname, gh_member) VALUES (adriens, adriens), (jdoe, johndoe), (asmith, annasmithRRRRR);

3 Consultar el estado HTTP de cada manejador usando http_get y convertir el c?digo de estado CREATE OR REPLACE VIEW v_person_gh_status AS SELECT sam_accountname, gh_member, 'https://github.com/' || gh_member AS gh_url, CAST(http_get(gh_url).status AS INTEGER) AS http_gh_status FROM person_gh_member;

4 Detectar manejos no existentes o con respuesta distinta de 200 SELECT * FROM v_person_gh_status WHERE http_gh_status <> 200;

Si quieres que la comprobaci?n sea parte del propio esquema y falle en inserciones cuando la URL no existe puedes crear una tabla con restricciones CHECK que verifiquen la estructura de la URL y que el c?digo devuelto sea 200. Ejemplo de creaci?n e inserci?n con comprobaci?n

CREATE OR REPLACE TABLE lint_gh_handle (gh_handle varchar PRIMARY KEY, gh_url varchar NOT NULL UNIQUE CHECK (gh_url LIKE 'https://github.com/%'), gh_status integer CHECK (gh_status = 200)); INSERT INTO lint_gh_handle (gh_handle, gh_url, gh_status) SELECT gh_member, 'https://github.com/' || gh_member AS gh_url, CAST(http_get(gh_url).status AS INTEGER) AS gh_status FROM person_gh_member;

Estas validaciones permiten integrar linter de datos en GitHub Actions usando acciones como GitHub Duckdb Action para ejecutar las sentencias SQL durante la fase de CI y bloquear merges si los datos no cumplen las reglas de calidad.

En Q2BSTUDIO ofrecemos implementaciones a medida que combinan software a medida, servicios cloud aws y azure, y soluciones de inteligencia de negocio y power bi para convertir estas comprobaciones en alertas y paneles operativos. Tambi?n desarrollamos proyectos de inteligencia artificial y agentes IA a medida para automatizar detecci?n de anomal?as y enriquecer la calidad de datos, siempre teniendo en cuenta la ciberseguridad para proteger tu informaci?n y procesos.

Si necesitas ayuda para implantar estas pruebas en tus pipelines CI o para desarrollar aplicaciones a medida que incorporen validaci?n de datos, IA para empresas y despliegue seguro en la nube contacta con nosotros para una soluci?n personalizada.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.

Live Chat