From 44848c94ae9a0e60ca004f67ca5c064c770d2ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mich=C3=A8le=20BARRE?= Date: Wed, 10 Apr 2024 15:49:34 +1100 Subject: [PATCH 1/3] fix(data): reorder id_acronym --- data/acronyms_optnc.csv | 4 ++-- duck.sql | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/data/acronyms_optnc.csv b/data/acronyms_optnc.csv index d6eba72..4c5d8f5 100644 --- a/data/acronyms_optnc.csv +++ b/data/acronyms_optnc.csv @@ -100,11 +100,11 @@ "SG","Secrétariat Général." "SGLB","Secrétariat Général Logistique et Bâtiments." "SI","Section Intervention / Système d’Information." +"SI MOBILE","Système d’Information du réseau mobile." +"SI TELECOMS","Système d’Information Télécoms." "SID","Système d’Information Décisionnel." "SIG","Système d’Information Géographique." -"SI MOBILE","Système d’Information du réseau mobile." "SIRH","Système d’Information des Ressources Humaines." -"SI TELECOMS","Système d’Information Télécoms." "SLA","Service Level Agreement - Engagement de niveau de service." "ST","Sous-Traité." "SVA","Service à Valeur Ajoutée." diff --git a/duck.sql b/duck.sql index 391eaec..c77d58f 100644 --- a/duck.sql +++ b/duck.sql @@ -53,4 +53,8 @@ from sorted_table where orig_table.id_acronym = sorted_table.id_acronym -order by orig_table.index; \ No newline at end of file +order by orig_table.index; + +-- Check the resulting table +-- from test_sorted +-- where orig_index != sorted_index; From 6923ddcb1fa3841f181d049c5876601264199318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mich=C3=A8le=20BARRE?= Date: Thu, 11 Apr 2024 08:38:45 +1100 Subject: [PATCH 2/3] fix(sort): fix sort issue when same id_acronym ref: #3 --- duck.sql | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/duck.sql b/duck.sql index c77d58f..4a614fe 100644 --- a/duck.sql +++ b/duck.sql @@ -24,19 +24,19 @@ CREATE SEQUENCE seq_sorted START 1; create or replace temp table orig_table as select nextval('seq_original') as index, - id_acronym from acronyms; + id_acronym, description from acronyms; create or replace temp table sorted_table as select nextval('seq_sorted') as index, - id_acronym - from (select id_acronym from acronyms order by id_acronym); + id_acronym, description + from (select id_acronym, description from acronyms order by id_acronym, description); -- Check the resulting tables from orig_table; from sorted_table; -- Create the table that compares the sorted and original tables columns -create or replace temp table test_sorted(orig_id_acronym varchar, +create or replace temp table test_sorted(orig_id_acronym varchar, orig_description varchar, orig_index integer, sorted_index integer -- the magic part XD @@ -46,6 +46,7 @@ create or replace temp table test_sorted(orig_id_acronym varchar, insert into test_sorted select orig_table.id_acronym as orig_id_acronym, + orig_table.description as orig_description, orig_table.index as orig_index, sorted_table.index as sorted_index, from @@ -53,6 +54,7 @@ from sorted_table where orig_table.id_acronym = sorted_table.id_acronym + and orig_table.description = sorted_table.description order by orig_table.index; -- Check the resulting table From 77bf495bf5c3202c016f98d4b09bbf6a1fb85633 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:43:36 +0000 Subject: [PATCH 3/3] build(deps): bump opt-nc/setup-duckdb-action from 1.0.7 to 1.0.8 Bumps [opt-nc/setup-duckdb-action](https://github.com/opt-nc/setup-duckdb-action) from 1.0.7 to 1.0.8. - [Release notes](https://github.com/opt-nc/setup-duckdb-action/releases) - [Changelog](https://github.com/opt-nc/setup-duckdb-action/blob/main/.releaserc) - [Commits](https://github.com/opt-nc/setup-duckdb-action/compare/v1.0.7...v1.0.8) --- updated-dependencies: - dependency-name: opt-nc/setup-duckdb-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/check_data.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_data.yml b/.github/workflows/check_data.yml index 68db635..5739f47 100644 --- a/.github/workflows/check_data.yml +++ b/.github/workflows/check_data.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 - name: ⚙️ Install DuckDB - uses: opt-nc/setup-duckdb-action@v1.0.7 + uses: opt-nc/setup-duckdb-action@v1.0.8 with: version: ${{ vars.VERSION_DUCKDB}}