Skip to main content

Install

pip install duckdq 

Import

from duckdq import client

Libraries

from supabase import create_client, Client # type: ignore
from dotenv import load_dotenv # type: ignore
import duckdb # type: ignore
import os

# env
load_dotenv()
URL = os.environ.get("API_URL")
KEY = os.environ.get("API_KEY")
BUCKET_KEY_ID = os.environ.get("BUCKET_KEY_ID")
BUCKET_SECRET = os.environ.get("BUCKET_SECRET")

# Session
session: Client = create_client(URL, KEY)

# Engine
engine = duckdb.connect(':memory:')

# Session
dq = client.APIClient(session, engine)

Job

# Name
dataset = "test" 
run_id = "2024-09-24"

# Data
engine.sql(f""" create or replace table {dataset} as select * from read_csv_auto('.csv/fake_customers.csv') limit 10000 """)

Register (initial one-time only)

dq.register(dataset)

Run

dq.run(dataset, run_id)

Env

.env File

API_KEY=xyz
API_URL=xyz

Or Export variables

export API_KEY=xyz
export API_URL=xyz

Database User

GRANT USAGE on schema "validation" to anon;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA "validation" TO anon;
GRANT ALL ON SEQUENCE validation.rule_output_rule_output_id_seq TO anon;
GRANT ALL ON SEQUENCE validation. connections_connection_id_seq TO anon;
GRANT ALL ON SEQUENCE validation.owlcheck_q_job_id_seq TO anon;
GRANT ALL ON SEQUENCE validation.job_log_log_id_seq TO anon;
GRANT ALL ON SEQUENCE validation.assignment_q_id_seq TO anon;

Metadata

Release files for duckdq 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for duckdq 0.0.7
File Size Uploaded Provenance Actions
duckdq-0.0.7.tar.gz 11.7 kB Without provenance Details for duckdq-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for duckdq 0.0.7
File Interpreter ABI Platform Actions
duckdq-0.0.7-py3-none-any.whl Python 3 none any Details for duckdq-0.0.7-py3-none-any.whl

Total release size: 22.7 kB

Release files / duckdq-0.0.7.tar.gz

Download URL duckdq-0.0.7.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
024c0f8368032925437ab7c7d0eb12405ad7e72f1d0909b8b9fb3eaea626dbb2
BLAKE2b-256 checksum
How to use checksums
3c63469e4393cc1c7efe449068dbc865f2d710481e62f58b284bfb6661737d15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / duckdq-0.0.7-py3-none-any.whl

Download URL duckdq-0.0.7-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da32612562a060b3692c51ce955698292cf73c3363e7e2bb0ac79f72084802f4
BLAKE2b-256 checksum
How to use checksums
3404cce1f8a74729965183eedf8fc6f75a9e9d797dbc8484c52248391440aaab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for duckdq 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page