diff --git a/.github/workflows/check_data.yml b/.github/workflows/check_data.yml new file mode 100644 index 0000000..68db635 --- /dev/null +++ b/.github/workflows/check_data.yml @@ -0,0 +1,24 @@ +# This workflow will check out the code, install DuckDb then run data quality tests +# For more information see: https://dev.to/optnc/effortless-data-quality-wduckdb-on-github-2mkb +name: 🧪 Check data + + +on: [pull_request, push] + +jobs: + test: + name: 🧪 Verify data + runs-on: ubuntu-latest + steps: + - name: 📥 Checkout code + uses: actions/checkout@v4 + + - name: ⚙️ Install DuckDB + uses: opt-nc/setup-duckdb-action@v1.0.7 + with: + version: ${{ vars.VERSION_DUCKDB}} + + + - name : 🕵️‍♂️ Check data integrity + run: | + duckdb < duck.sql \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/duck.sql b/duck.sql new file mode 100644 index 0000000..78604b1 --- /dev/null +++ b/duck.sql @@ -0,0 +1,19 @@ +-- Load confluence spaces +create +or replace table domaine ( + domain VARCHAR NOT NULL, + marque_nom VARCHAR NOT NULL UNIQUE, + marque_description VARCHAR NOT NULL, + url VARCHAR + +); + +insert into + domaine (domain,marque_nom,marque_description,url) +from + ( + from + 'data/domaines.csv' + ) t; + +from domaine; \ No newline at end of file