<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>RMLStreamer supported by RML-view-to-CSV in the performance track of the KGC W Challenge 2024</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Els de Vleeschauwer</string-name>
          <email>els.devleeschauwer@ugent.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ben De Meester</string-name>
          <email>ben.demeester@ugent.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IDLab, Dept. Electronics &amp; Information Systems, Ghent University - imec</institution>
          ,
          <country country="BE">Belgium</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>KGCW'24: 5th International Workshop on Knowledge Graph Construction</institution>
        </aff>
      </contrib-group>
      <fpage>2</fpage>
      <lpage>8</lpage>
      <abstract>
        <p>This paper presents the results of the performance track of the Knowledge Graph Construction Workshop 2024 Challenge with RMLStreamer, an RML mapping engine that processes all data in a streaming fashion. On mappings without joins, RMLStreamer scales well regarding execution time and CPU usage, while maintaining a constant memory usage. To optimize the processing of the joins, we added RML-view-to-CSV as a first step to our knowledge graph construction pipeline. RML-view-to-CSV is a proof-of-concept implementation for RML Logical Views, i.e. flattened, source format-agnostic views over one or more existing data sources. RML-view-to-CSV can additionally rewrite referencing object maps as logical views, before it materializes the logical views as CSV files. The combination of RML-view-to-CSV and RMLStreamer emerges as an eficient approach, showcasing the potential of modular mapping engines that delegate each task to the most suitable framework.</p>
      </abstract>
      <kwd-group>
        <kwd>RMLStreamer</kwd>
        <kwd>RML-view-to-CSV</kwd>
        <kwd>challenge</kwd>
        <kwd>knowledge graph construction</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>CEUR
ceur-ws.org</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>©</p>
      <p>2023 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0
International (CC BY 4.0).</p>
      <p>CEUR
Workshop
Proceedings
htp:/ceur-ws.org
ISN1613-073</p>
      <sec id="sec-2-1">
        <title>CEUR</title>
      </sec>
      <sec id="sec-2-2">
        <title>Workshop Proceedings (CEUR-WS.org)</title>
        <p>CHALLENGE INPUT:</p>
        <p>RML mapping
CHALLENGE INPUT:
source data</p>
        <p>RML mapping 
without joins
materialized joins  </p>
        <p>(CSV files)
RML-view-to-CSV</p>
        <p>RMLStreamer</p>
        <p>OUTPUT KGC pipeline:
RDF knowledge graph</p>
        <p>
          In this paper, we present the results of the performance track for RMLStreamer [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], an
RML mapping engine which processes all data in a streaming fashion, in combination
with RML-view-to-CSV4, a proof-of-concept implementation for RML Logical Views [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
        </p>
        <p>Section 2 describes the components of our knowledge graph construction pipeline.
Section 3 discusses the setup used to execute the challenge’s experiments. We present
our results in Section 4 and our conclusion in Section 5.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>2. Knowledge Graph Construction Pipeline</title>
      <p>
        Our knowledge graph construction pipeline (Figure 1) consists of two components: (i)
RMLStreamer executes the RML mapping rules in a streaming fashion [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and (ii)
RML-view-to-CSV is a proof-of-concept implementation for RML Logical Views, that
can resolve joins between data sources [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <sec id="sec-3-1">
        <title>2.1. RMLStreamer</title>
        <p>RMLStreamer executes RML mapping rules to generate high quality Linked Data from
multiple originally (semi-)structured data sources in a streaming way. It handles big
input files and continuous data streams like sensor data without consuming more memory
when the input data size increases. It leverages Apache Flink to scale vertically across
multiple CPU cores and horizontally across multiple machines. In the challenge, we use
RMLStreamer version v2.5.0 with an embedded Flink version in a Docker container5.</p>
        <p>
          The challenge results of 2023 show that, on mapping tasks without joins, RMLStreamer
scales well regarding execution time and CPU usage, while maintaining a constant memory
usage [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>However, joins can significantly prolongue the execution time and increase the size of
the output of RMLStreamer, as RMLStreamer does not eliminate self-joins or duplicates.
As a result, RMLStreamer needs more than three hours to execute the first scale of
the GTFS-Madrid-Bench, generating an output of 105 GB. Therefore, we delegate the
execution of joins to RML-view-to-CSV.
4https://github.com/RMLio/rml-view-to-csv/
5https://zenodo.org/records/7998156</p>
      </sec>
      <sec id="sec-3-2">
        <title>2.2. RML-view-to-CSV</title>
        <p>
          RML-view-to-CSV is a proof-of-concept implementation for RML Logical Views, a new
RML module that is still under development. In our previous paper [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] we elaborated
on both RML Logical Views and RML-view-to-CSV. In this section, we highlight the
aspects used for the challenge.
        </p>
        <p>RML Logical Views6 allow specifying a logical view: a flattened, source format-agnostic
view over one or more existing data sources. A view over multiple data sources can be
created by joining a logical view with other logical views.</p>
        <p>RML-view-to-CSV resolves logical views as a first step in the KGC pipeline. It includes
an option to delegate the execution of joins expressed in triples maps to logical views.
First, RML-view-to-CSV identifies and optimizes redundant self-joins, and eliminates the
remaining referencing object maps from the mapping, replacing them by equivalent logical
views. Afterwards, it materializes the logical views as CSV files. During this process,
RMLview-to-CSV also takes the related triples maps into account, eliminating redundant fields
and duplicate logical iterations. Finally, it rewrites the mapping accordingly, replacing
the logical views as logical sources over the materialized logical views.</p>
        <p>At this moment, RML-view-to-CSV supports one nested source format (JSON) and
one tabular source format (CSV). Slight adaptations to the experiment setup were needed
to overcome this limitation.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. Experiment setup</title>
      <p>The KGCW 2024 Challenge provides CSV files as source data, mapping files, queries,
baseline results (i.e. the expected set of triples and query results), an example pipeline
based on the MySQL, RMLMapper, and Virtuoso for reaching those results, and a tool
for executing the example pipeline.</p>
      <p>The following adaptations were made to the provided experiments to enable execution
with our KGC pipeline. (i) In the provided end-to-end pipelines, the CSV files are loaded
into a relational database. As RML-view-to-CSV does not support SQL (yet), we used
the CSV files directly to construct the knowledge graphs and adapted the mapping
ifles accordingly. (ii) As RML-view-to-CSV does not support XML (yet), we replaced
the XML files in the GTFS-Madrid-Bench heterogeneity experiments by JSON files.
We conducted two heterogeneity experiments: one experiment with only JSON source
data and one experiment with 50 % CSV and 50 % JSON source data, both on scale
100. (iii) We added a condition to the mapping files to recognize the string NULL in the
provided CSV files as an empty value. The GTFS experiments were executed with our
KGC pipeline as shown in Figure 1. For the KGC parameters experiments without joins,
we skipped the preprocessing step with RML-view-to-CSV, as it is a redundant step for
these experiments. For the KGC parameter experiments with joins, we tested both the
pipeline with and without RML-view-to-CSV as preprocessor, to measure also the impact
of RML-view-to-CSV for those experiments.
6https://github.com/kg-construct/rml-lv</p>
      <p>We compared our experiments’ results to ensure that our output is correct with
respect to the baseline results of the challenge. For the first part of the challenge (KGC
parameters), where the output of RMLStreamer is not loaded into a triples store, we
deduplicated the output results as RMLStreamer cannot eliminate duplicates by itself.
After deduplication, we compared the number of triples to the baseline results of the
challenge. For the second part of the challenge (GTFS-Madrid-Bench) we compared the
number of query results to the baseline.</p>
      <p>All experiments were executed on the virtual machine provided by Orange, with
following specifications: 4 vCPUs, 16 GB RAM and 140GiB SSD storage running on
Ubuntu 22.04.3 LTS. The challenge execution tool configures the Java heap space to 50
% of the available memory. All experiments were performed 5 times, and the experiment
with the median of the measurements is reported. All files needed to reproduce the
conducted experiments are available on Zenodo7.</p>
    </sec>
    <sec id="sec-5">
      <title>4. Results</title>
      <p>In Figure 2 and Table 1 we included the measured execution time, CPU time, and maximal
memory usage of the knowledge graph construction pipeline for selected experiments.
The complete overview of the results, as it was submitted to the KGCW 2024 Challenge,
is available on Zenodo8.</p>
      <p>First, we verify how RMLStreamer behaves when the size of the expected output
increases. This is best illustrated by the GTFS-Madrid-Bench scale experiments. Figure 2a
and Figure 2b show that both RML-view-to-CSV and RMLStreamer scale towards a linear
trend. Note that the reported metrics include the startup time of RML-view-to-CSV
and RMLStreamer (no separate measurements in the challenge execution tool), that is
independent of data size and has a higher impact on the lower scales. The execution time
and CPU time increases with a factor of ten, the same factor as the data size for higher
scales. The peak RAM memory (fig. 2c) measured is similar for all scales when using
RMLStreamer. RMLStreamer has a constant memory usage independent of the data size,
because it processes everything in a streaming way. This ensures a stable performance
independent of the data size. As long as there is space to store the output, RMLStreamer
can continue its knowledge graph construction process. For RML-view-to-CSV we note
an increasing use of memory for the higher GTFS scales. Nevertheless, it was still able
to handle scale 1000 without reaching the memory limitations of the provided hardware.</p>
      <p>The measurements for the KGC parameter experiments confirm these observations
(Table 1 Section 1). RMLStreamer shows linear scaling of execution time and CPU usage,
proportional to the size of the input data, in combination with a constant memory usage.</p>
      <p>Second, we evaluate the impact of the format of the data input. Replacing the
CSV source data by JSON data increases the execution time of RMLStreamer with a
factor of two. The diference in execution time for RMLStreamer is the consequence of
RMLStreamer chunking CSV files and processing the chunks in parallel. This is not the
5.766
5.956
10.000
1
10</p>
      <p>100</p>
      <p>Execution time (s)
(a) Linear trend: the execution time of both</p>
      <p>RML-view-to-CSV and RMLStreamer
increases with the same factor as the
data size for higher scales.
Execution
time (s)</p>
      <p>CPU
time (s)
Peak RAM
memory (GB)
7
18
(b) Linear trend: the CPU usage of both</p>
      <p>RML-view-to-CSV and RMLStreamer
increases with the same factor as the
data size for higher scales.
(c) The memory consumption of
RML-viewto-CSV increases, while RMLStreamer
has a constant memory usage
independent of data size.
(d) When using JSON data as source instead
of CSV data, the performance impact
is higher on RML-view-to-CSV than on
RMLStreamer.
case for the JSON formats yet. The performance impact of nested data is higher for
RML-view-to-CSV. The execution time and CPU usage of RML-view-to-CSV increases
with a factor of ten, and its memory consumption with a factor of three (fig. 2d).</p>
      <p>Third, we investigate the impact of duplicates and empty values in the input data. As
RMLStreamer does not eliminate duplicates and the duplicate tests all start with the
same amount of input data, there is no noticeable diference in performance between
the experiments with and without duplicates, whilst a duplication elimination could
result in a much better performance for tests with duplicates (Table 1 Section 2). In the
source data of the experiments with empty values (Table 1 Section 3), this string NULL is
representing an empty value in a CSV file. We had to add a condition to the mappings
of those experiments to recognise this string as an empty values. The execution of this
condition increased the execution time and CPU usage with 50% when all rows contain
empty values.</p>
      <p>Last, we comment on the KGC parameter experiments that include joins (Table 1
Section 4). We executed these experiments without and with RML-view-to-CSV as
preprocessor and noticed that RML-view-to-CSV reduced the total execution time and
CPU usage with respectively 20% and 39% for the experiments containing most joins.</p>
    </sec>
    <sec id="sec-6">
      <title>5. Conclusion</title>
      <p>The KGCW 2024 Challenge results confirms the observations of the KGCW 2023
Challenge: RMLStreamer has a linear scaling of execution time and CPU usage, proportional
to the size of the input data, while maintaining a constant memory usage. Scalability is
the main strength of RMLStreamer.</p>
      <p>The main weakness of RMLStreamer is its ineficient implementation of join
operations (e.g. GTFS-Madrid-Bench experiments with joins cannot be handled properly by
RMLStreamer). When delegating this task to RML-view-to-CSV as a preprocessor, we
resolve this weakness and build a reliable and performing knowledge graph construction
pipeline.</p>
      <p>The challenge results reveal of slower performance of RML-view-to-CSV when handling
nested data. As RML Logical Views enable the flattening of nested data, the
implementation of RML-view-to-CSV is processing all JSON fields separately. A more eficient
implementation for nested data sources is a challenge for future implementations, after
the RML Logical View specification is finalized.</p>
      <p>
        Comparing to the results of KGCW Challenge 2023 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], we see a direct relation between
the performance of RMLStreamer, and the available CPU cores and RAM memory of the
virtual machines used for the experiments. RMLStreamer is now up to a factor of three
slower and uses 30% less memory. The virtual machine used for the KGCW Challenge
2023 had 12 CPU cores and 24 GB RAM; for the KGCW Challenge 2024, all experiments
were conducted on a virtual machine with 4 CPU cores and 16 GB RAM. We concluded
that RMLStreamer takes full advantage of the number of available CPU cores and of the
available memory.
      </p>
      <p>At the moment of writing, we have no insight in the results of the other engines
participating in the performance track of the KGCW Challenge 2024. We are looking
forward to the comparison of the challenge results.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>The described research activities were supported by SolidLab Vlaanderen (Flemish
Government, EWI and RRF project VV023/10), and the European Unions Horizon
Europe research and innovation program under grant agreement no. 101058682
(OntoDESIDE).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Chaves-Fraga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Priyatna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Cimmino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Toledo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Ruckhaus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Corcho</surname>
          </string-name>
          ,
          <article-title>Gtfs-madrid-bench: A benchmark for virtual knowledge graph access in the transport domain</article-title>
          ,
          <source>Journal of Web Semantics</source>
          <volume>65</volume>
          (
          <year>2020</year>
          )
          <article-title>100596</article-title>
          . doi:
          <volume>10</volume>
          .1016/j.websem.
          <year>2020</year>
          .
          <volume>100596</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Sitt</given-names>
            <surname>Min Oo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Haesendonck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>De Meester</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            . Dimou,
            <surname>RMLStreamer-SISO</surname>
          </string-name>
          :
          <article-title>An RDF Stream Generator from Streaming Heterogeneous Data</article-title>
          , in: U. Sattler,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hogan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Keet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Presutti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P. A.</given-names>
            <surname>Almeida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Takeda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Monnin</surname>
          </string-name>
          , G. Pirrò, C. d'Amato (Eds.),
          <source>The Semantic Web - ISWC 2022</source>
          , Springer, Springer International Publishing, Cham,
          <year>2022</year>
          , pp.
          <fpage>697</fpage>
          -
          <lpage>713</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>031</fpage>
          -19433-7_
          <fpage>40</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>E. de Vleeschauwer</surname>
          </string-name>
          , B. De Meester, P. Colpaert,
          <article-title>RML-view-to-CSV: A Proofof-Concept Implementation for RML Logical Views</article-title>
          ,
          <source>in: Proceedings of the 5th International Workshop on Knowledge Graph Construction (KGCW</source>
          <year>2024</year>
          )
          <article-title>co-located with 20th Extended Semantic Web Conference (ESWC</article-title>
          <year>2024</year>
          ),
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4] E. de Vleeschauwer, G. Haesendonck,
          <string-name>
            <given-names>D. Van</given-names>
            <surname>Assche</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. D.</given-names>
            <surname>Meester</surname>
          </string-name>
          , B. De Meester,
          <article-title>RMLStreamer with Reference Conditions in the KGCW Challenge 2023</article-title>
          ,
          <source>in: Proceedings of the 4rd International Workshop on Knowledge Graph Construction (KGCW</source>
          <year>2023</year>
          )
          <article-title>co-located with 20th Extended Semantic Web Conference (ESWC</article-title>
          <year>2023</year>
          ),
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>