From c284321b1073e06481c63e2c061a1600fa68254d Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 10 Apr 2025 20:27:59 +0200 Subject: Added filters expressions in the externals --- examples/externals_filters.toml | 22 ++++++++++++++++++++++ examples/importer_groupe.toml | 15 ++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 examples/externals_filters.toml (limited to 'examples') diff --git a/examples/externals_filters.toml b/examples/externals_filters.toml new file mode 100644 index 0000000..78e6603 --- /dev/null +++ b/examples/externals_filters.toml @@ -0,0 +1,22 @@ +dataset = "dataset.toml" + +[source] + name = "source" + +# This show how the filter in external works. +# Only the lines with Column C = 'France' will be +# matched. +[externals.source-target] + intern_key = ":source.A" + extern_key = ":A" + filters = [ + ":C = 'France'" + ] + +[sheet] + columns = [ + ":A", + ":C", + ":source-target.A", + ":source-target.C", + ] diff --git a/examples/importer_groupe.toml b/examples/importer_groupe.toml index eb2f7e6..ea2c7de 100644 --- a/examples/importer_groupe.toml +++ b/examples/importer_groupe.toml @@ -1,15 +1,12 @@ -# Cet exemple permet de montrer la combinaison de fonction de groupe avec des -# filtres. +# This file show how the groups can be used in filters. +# +# We search for the greatest value of units sold in France. In order to get the +# expected result, we need to filter first the country in France before +# looking for the greatest value. -# On recherche ici le plus grand nombre d’unitées vendues en France. -# Pour que le résultat soit conforme à l’attendu, il faut que l’application -# commence par filtrer les lignes qui concernent la France, avant de chercher -# la ligne contenant le plus grand nombre d’unités. - -version = 1 +dataset = "dataset.toml" [source] - file = "financial.xlsx" name = "source" [sheet] -- cgit v1.2.3