Skip to content

Commit

Permalink
Deployed 5124657 with MkDocs version: 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
katarinasupe committed Jul 10, 2024
1 parent c1442c3 commit 6171049
Show file tree
Hide file tree
Showing 26 changed files with 362 additions and 73 deletions.
68 changes: 59 additions & 9 deletions changelog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,26 @@
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#v160-july-10-2024" class="md-nav__link">
v1.6.0 - July 10, 2024
</a>

<nav class="md-nav" aria-label="v1.6.0 - July 10, 2024">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements" class="md-nav__link">
Features and improvements
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#v151-january-8-2024" class="md-nav__link">
v1.5.1 - January 8, 2024
Expand Down Expand Up @@ -1716,7 +1736,7 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements" class="md-nav__link">
<a href="#features-and-improvements_1" class="md-nav__link">
Features and improvements
</a>

Expand Down Expand Up @@ -1750,7 +1770,7 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements_1" class="md-nav__link">
<a href="#features-and-improvements_2" class="md-nav__link">
Features and improvements
</a>

Expand All @@ -1777,7 +1797,7 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements_2" class="md-nav__link">
<a href="#features-and-improvements_3" class="md-nav__link">
Features and improvements
</a>

Expand Down Expand Up @@ -1943,6 +1963,26 @@
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#v160-july-10-2024" class="md-nav__link">
v1.6.0 - July 10, 2024
</a>

<nav class="md-nav" aria-label="v1.6.0 - July 10, 2024">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements" class="md-nav__link">
Features and improvements
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#v151-january-8-2024" class="md-nav__link">
v1.5.1 - January 8, 2024
Expand Down Expand Up @@ -1972,7 +2012,7 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements" class="md-nav__link">
<a href="#features-and-improvements_1" class="md-nav__link">
Features and improvements
</a>

Expand Down Expand Up @@ -2006,7 +2046,7 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements_1" class="md-nav__link">
<a href="#features-and-improvements_2" class="md-nav__link">
Features and improvements
</a>

Expand All @@ -2033,7 +2073,7 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#features-and-improvements_2" class="md-nav__link">
<a href="#features-and-improvements_3" class="md-nav__link">
Features and improvements
</a>

Expand Down Expand Up @@ -2184,14 +2224,24 @@


<h1 id="changelog">Changelog</h1>
<h2 id="v160-july-10-2024">v1.6.0 - July 10, 2024</h2>
<h3 id="features-and-improvements">Features and improvements</h3>
<ul>
<li>Added <code>SIMILAR</code> operator to query builder (https://github.com/memgraph/gqlalchemy/pull/304)</li>
<li>Better documented how to load CSV from a remote location: to load CSV from a remote location, provide a URL as a path (https://github.com/memgraph/gqlalchemy/pull/305)</li>
<li>You can now add relationship properties in many-to-many mapping when importing a CSV file (https://github.com/memgraph/gqlalchemy/pull/306)</li>
<li>Added getter and setter for Memgraph storage modes (https://github.com/memgraph/gqlalchemy/pull/309)</li>
<li>Added <code>get_transactions()</code> and <code>terminate_transactions()</code> methods for easier transaction management (https://github.com/memgraph/gqlalchemy/pull/310)</li>
<li>Added support for <code>ZonedDateTime</code> data type (https://github.com/memgraph/gqlalchemy/pull/312)</li>
</ul>
<h2 id="v151-january-8-2024">v1.5.1 - January 8, 2024</h2>
<h3 id="updates">Updates</h3>
<ul>
<li>Support <code>pydantic</code> versions &gt;= 2.3.0, &lt; 3.0.0 (https://github.com/memgraph/gqlalchemy/pull/298)</li>
<li>Support <code>pymgclient</code> versions &gt;= 1.3.1, &lt; 2.0.0 , <code>neo4j</code> versions &gt;= 4.4.3, &lt; 5.0.0, <code>pytest-flake8</code> versons &gt;= 1.0.7, &lt; 2.0.0 (https://github.com/memgraph/gqlalchemy/pull/299)</li>
</ul>
<h2 id="v150-september-22-2023">v1.5.0 - September 22, 2023</h2>
<h3 id="features-and-improvements">Features and improvements</h3>
<h3 id="features-and-improvements_1">Features and improvements</h3>
<ul>
<li>Added <code>get_or_create()</code> metod for <code>Node</code> and <code>Relationship</code> to simplify merging nodes and relationships (https://github.com/memgraph/gqlalchemy/pull/244)</li>
<li>Added spelling fixes (https://github.com/memgraph/gqlalchemy/pull/251)</li>
Expand All @@ -2214,7 +2264,7 @@ <h3 id="updates_1">Updates</h3>
<p>We are hoping to have full support for Python 3.11 soon. Please <a href="https://github.com/memgraph/gqlalchemy/issues">open an issue</a> if you have any blockers with the current update.</p>
</div>
<h2 id="v141-april-19-2023">v1.4.1 - April 19, 2023</h2>
<h3 id="features-and-improvements_1">Features and improvements</h3>
<h3 id="features-and-improvements_2">Features and improvements</h3>
<ul>
<li>Installing and testing GQLAlchemy is now easier because Apache Arrow, PyTorch Geometric and DGL dependencies have been made optional. <a href="https://github.com/memgraph/gqlalchemy/pull/235">#235</a></li>
</ul>
Expand All @@ -2223,7 +2273,7 @@ <h3 id="bug-fixes_1">Bug fixes</h3>
<li>Removed unnecessary extra argument in the call of the <code>escape_value</code> method and fixed a bug in query creation for the <code>Map</code> property type. <a href="https://github.com/memgraph/gqlalchemy/pull/198/files">#198</a></li>
</ul>
<h2 id="v14-march-10-2023">v1.4 - March 10, 2023</h2>
<h3 id="features-and-improvements_2">Features and improvements</h3>
<h3 id="features-and-improvements_3">Features and improvements</h3>
<ul>
<li>Data from Memgraph can now be <a href="../reference/gqlalchemy/transformations/importing/graph_importer/">imported from</a> and <a href="../reference/gqlalchemy/transformations/export/graph_transporter/">exported to</a> <code>NetworkX</code>, <code>DGL</code> and <code>PyG</code> graph formats. <a href="https://github.com/memgraph/gqlalchemy/pull/215">#215</a></li>
<li>Now you can execute procedures from query modules on a subgraph <a href="../how-to-guides/query-builder/graph-projection/">using the project feature</a>. <a href="https://github.com/memgraph/gqlalchemy/pull/210">#210</a></li>
Expand Down
130 changes: 116 additions & 14 deletions how-to-guides/loaders/import-table-data-to-graph-database/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,26 @@
Loading a CSV file from the local file system
</a>

<nav class="md-nav" aria-label="Loading a CSV file from the local file system">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#one-to-many" class="md-nav__link">
One to many
</a>

</li>

<li class="md-nav__item">
<a href="#many-to-many" class="md-nav__link">
Many to many
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
Expand Down Expand Up @@ -1746,6 +1766,26 @@
Loading a CSV file from the local file system
</a>

<nav class="md-nav" aria-label="Loading a CSV file from the local file system">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#one-to-many" class="md-nav__link">
One to many
</a>

</li>

<li class="md-nav__item">
<a href="#many-to-many" class="md-nav__link">
Many to many
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
Expand Down Expand Up @@ -1800,13 +1840,18 @@ <h1 id="how-to-import-table-data-to-a-graph-database">How to import table data t
<p>The features below aren’t included in the default GQLAlchemy installation. To use them, make sure to <a href="../../../installation/">install GQLAlchemy</a> with the relevant extras.</p>
</div>
<h2 id="loading-a-csv-file-from-the-local-file-system">Loading a CSV file from the local file system</h2>
<p>Let's say you have a simple table data in a CSV file stored at
<code>/home/user/table_data</code>:</p>
<div class="highlight"><pre><span></span><code>name,surname,grade
Ivan,Horvat,4
Marko,Andric,5
Luka,Lukic,3
</code></pre></div>
<p>Let's say you have a simple dataset stored in CSV files:</p>
<p><code>/home/user/table_data/individual.csv</code>:
<div class="highlight"><pre><span></span><code>ind_id, name, surname, add_id
1, Ivan, Horvat, 2
2, Marko, Andric, 2
3, Luka, Lukic, 1
</code></pre></div></p>
<p><code>/home/user/table_data/address.csv</code>:
<div class="highlight"><pre><span></span><code>add_id, street, num, city
1, Ilica, 2, Zagreb
2, Broadway, 12, New York
</code></pre></div></p>
<p>To create a translation from table to graph data, you need to define a <strong>data
configuration object</strong>. This can be done inside your code by defining a
dictionary, but it is recommended to use a YAML file structured like this:</p>
Expand Down Expand Up @@ -1846,20 +1891,32 @@ <h2 id="loading-a-csv-file-from-the-local-file-system">Loading a CSV file from t
<span class="w"> </span><span class="nt">column_name</span><span class="p">:</span>
<span class="w"> </span><span class="nt">reference_table</span><span class="p">:</span>
<span class="w"> </span><span class="nt">reference_key</span><span class="p">:</span>
<span class="w"> </span><span class="nt">label</span><span class="p">:</span>
<span class="w"> </span><span class="nt">label</span><span class="p">:</span><span class="w"> </span><span class="c1"># relationship&#39;s label</span>
<span class="w"> </span><span class="nt">properties</span><span class="p">:</span><span class="w"> </span><span class="c1"># list of properties to add to the relationship</span>
</code></pre></div>
<h3 id="one-to-many">One to many</h3>
<p>For this example, you don't need all of those fields. You only need to define
<code>indices</code> and <code>one_to_many_relations</code>. Hence, you have the following YAML file:</p>
<div class="highlight"><pre><span></span><code><span class="nt">indices</span><span class="p">:</span>
<span class="w"> </span><span class="nt">example</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">name</span>
<span class="w"> </span><span class="nt">address</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">add_id</span>
<span class="w"> </span><span class="nt">individual</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ind_id</span>

<span class="nt">name_mappings</span><span class="p">:</span>
<span class="w"> </span><span class="nt">example</span><span class="p">:</span>
<span class="w"> </span><span class="nt">label</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">PERSON</span>
<span class="w"> </span><span class="nt">individual</span><span class="p">:</span>
<span class="w"> </span><span class="nt">label</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">INDIVIDUAL</span>
<span class="w"> </span><span class="nt">address</span><span class="p">:</span>
<span class="w"> </span><span class="nt">label</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ADDRESS</span>

<span class="nt">one_to_many_relations</span><span class="p">:</span>
<span class="w"> </span><span class="nt">example</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[]</span>
<span class="w"> </span><span class="nt">address</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[]</span>
<span class="w"> </span><span class="nt">individual</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">foreign_key</span><span class="p">:</span>
<span class="w"> </span><span class="nt">column_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">add_id</span>
<span class="w"> </span><span class="nt">reference_table</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">address</span>
<span class="w"> </span><span class="nt">reference_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">add_id</span>
<span class="w"> </span><span class="nt">label</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">LIVES_IN</span>
</code></pre></div>
<p>In order to read the data configuration from the YAML file, run:</p>
<div class="highlight"><pre><span></span><code><span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s2">&quot;./example.yaml&quot;</span><span class="p">,</span> <span class="s2">&quot;r&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">stream</span><span class="p">:</span>
Expand All @@ -1872,11 +1929,56 @@ <h2 id="loading-a-csv-file-from-the-local-file-system">Loading a CSV file from t
make an instance of an <code>Importer</code> and call <code>translate()</code>.</p>
<div class="highlight"><pre><span></span><code><span class="n">importer</span> <span class="o">=</span> <span class="n">CSVLocalFileSystemImporter</span><span class="p">(</span>
<span class="n">data_configuration</span><span class="o">=</span><span class="n">parsed_yaml</span><span class="p">,</span>
<span class="n">path</span><span class="o">=</span><span class="s2">&quot;/home/user/table_data&quot;</span><span class="p">,</span>
<span class="n">path</span><span class="o">=</span><span class="s2">&quot;/home/user/table_data/&quot;</span><span class="p">,</span>
<span class="p">)</span>

<span class="n">importer</span><span class="o">.</span><span class="n">translate</span><span class="p">(</span><span class="n">drop_database_on_start</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</code></pre></div>
<h3 id="many-to-many">Many to many</h3>
<p>Relationships can also be defined using a third, associative table.</p>
<p><code>/home/user/table_data/tenant.csv</code>:
<div class="highlight"><pre><span></span><code>ind_id, add_id, duration
1, 2, 21
2, 2, 3
3, 1, 5
</code></pre></div></p>
<p>We need to extend our data configuration YAML file to include the <code>many_to_many_relations</code>, like so:</p>
<div class="highlight"><pre><span></span><code>indices:
address:
- add_id
individual:
- ind_id

name_mappings:
individual:
label: INDIVIDUAL
address:
label: ADDRESS
tenant:
column_names_mapping:
duration: years

one_to_many_relations:
address: []
individual: []

many_to_many_relations:
tenant:
foreign_key_from:
column_name: ind_id
reference_table: individual
reference_key: ind_id
foreign_key_to:
column_name: add_id
reference_table: address
reference_key: add_id
label: LIVES_IN
properties:
- duration
</code></pre></div>
<p>From here the procedure is the same as before.
In addition to having imported nodes and connected individuals and their addresses, we have also added an edge property.
This property is read from the associative table and is named in accordance with the <code>name_mappings</code>.</p>
<h2 id="using-a-cloud-storage-solution">Using a cloud storage solution</h2>
<p>To connect to Azure Blob, simply change the Importer object you are using. Like
above, first, define a data configuration object and then simply call:</p>
Expand Down
4 changes: 2 additions & 2 deletions reference/gqlalchemy/connection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@



<title>connection - GQLAlchemy Documentation</title>
<title>gqlalchemy.connection - GQLAlchemy Documentation</title>



Expand Down Expand Up @@ -108,7 +108,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">

connection
gqlalchemy.connection

</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions reference/gqlalchemy/disk_storage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@



<title>disk_storage - GQLAlchemy Documentation</title>
<title>gqlalchemy.disk_storage - GQLAlchemy Documentation</title>



Expand Down Expand Up @@ -108,7 +108,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">

disk_storage
gqlalchemy.disk_storage

</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions reference/gqlalchemy/exceptions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@



<title>exceptions - GQLAlchemy Documentation</title>
<title>gqlalchemy.exceptions - GQLAlchemy Documentation</title>



Expand Down Expand Up @@ -108,7 +108,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">

exceptions
gqlalchemy.exceptions

</span>
</div>
Expand Down
Loading

0 comments on commit 6171049

Please sign in to comment.