Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into fix-typos-in-call-clause
Browse files Browse the repository at this point in the history
  • Loading branch information
matea16 committed Jul 14, 2023
2 parents 9f5ecac + 75b11c7 commit 9b7d653
Show file tree
Hide file tree
Showing 60 changed files with 1,589 additions and 244 deletions.
6 changes: 1 addition & 5 deletions cypher-manual/clauses/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ The `DELETE` clause is used to delete nodes and relationships from the database.
The following examples are executed with this data et. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Deleting a node

Expand Down
5 changes: 4 additions & 1 deletion cypher-manual/clauses/load-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ as it's the most commonly used one.
The syntax of the clause is:

```cypher
LOAD CSV FROM <csv-file-path> ( WITH | NO ) HEADER [IGNORE BAD] [DELIMITER <delimiter-string>] [QUOTE <quote-string>] AS <variable-name>
LOAD CSV FROM <csv-file-path> ( WITH | NO ) HEADER [IGNORE BAD] [DELIMITER <delimiter-string>] [QUOTE <quote-string>] [NULLIF <nullif-string>] AS <variable-name>
```

* `<csv-file-path>` is a string holding the path to the CSV file. There are no
Expand All @@ -34,6 +34,9 @@ LOAD CSV FROM <csv-file-path> ( WITH | NO ) HEADER [IGNORE BAD] [DELIMITER <deli
* `QUOTE <quote-string>` option enables you to specify the CSV quote character.
If it isn't set, the default quote character `"` is assumed.

* `NULLIF <nullif-string>` option enables you to specify a sequence of characters that will be parsed as null.
By default, all empty columns in Memgraph are treated as empty strings, so if this option is not used, no values will be treated as null.

* `<variable-name>` is a symbolic name representing the variable to which the
contents of the parsed row will be bound to, enabling access to the row
contents later in the query.
Expand Down
8 changes: 2 additions & 6 deletions cypher-manual/clauses/match.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ Return it with the [`id()` function](/cypher-manual/functions#scalar-functions).
The following examples are executed with this data set. You can create this data set
locally by executing the queries at the end of the page: [Data Set](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Matching nodes

Expand Down Expand Up @@ -425,7 +421,7 @@ Output:
+---------------------------+
```

Since the dataset doesn't contain any nodes labeled as `Country` with a property `continent` with the value `Asia`, the `OPTIONAL MATCH` clause bypasses it and returns only non-empty sets. Therefore, the output of the query is a list containing only the results of the first `MATCH` clause.
The `OPTIONAL MATCH` clause bypasses the empty set and the query returns only non-empty sets. Therefore, the output of the query is a list containing only the results of the first `MATCH` clause.

## Data set Queries

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ more details.
The following examples are executed with this data set. You can create this data set
locally by executing the queries at the end of the page: [Data Set](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Merging nodes

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/optional-match.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ missing parts of the pattern will be filled with null values.
The following examples are executed with this dataset. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Get optional relationships

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ The `REMOVE` clause is used to remove labels and properties from nodes and relat
The following examples are executed with this dataset. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Removing a property

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/return.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ The `RETURN` clause defines which data should be included in the resulting set.
The following examples are executed with this dataset. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Returning nodes

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/set.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ The `SET` clause is used to update labels on nodes and properties on nodes and r
The following examples are executed with this dataset. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Setting a property

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/union.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ The `UNION` clause is used to combine the result of multiple queries.
The following examples are executed with this dataset. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Combine queries and retain duplicates

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/where.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ order to avoid problems with performance or results.
The following examples are executed with this dataset. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Basic Usage

Expand Down
6 changes: 1 addition & 5 deletions cypher-manual/clauses/with.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ The `WITH` is used to chain together parts of a query, piping the results from o
The following examples are executed with this dataset. You can create this dataset
locally by executing the queries at the end of the page: [Dataset queries](#data-set-queries).

<img
src="https://raw.githubusercontent.com/g-despot/images/master/data_set.png"
alt="Data set"
style={{height: 380}}
/>
![Data set](../data/clauses/data_set.png)

## 1. Filter on aggregate functions

Expand Down
Binary file added cypher-manual/data/clauses/data_set.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
188 changes: 188 additions & 0 deletions docs/how-to-guides/use-init-flags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
---
id: use-init-flags
title: How to use init flags with Docker
sidebar_label: Use init flags with Docker
---

With `init-file` and `init-data-file` [configuration flags](/docs/reference-guide/configuration.md), you can execute queries from a CYPHERL file that need to be executed before or immediately after the Bolt server starts. The CYPHERL file the `init-file` flag points to is usually used to create users and set their passwords allowing only authorized users to access the data in the first run. The CYPHERL file the `init-data-file` points to is usually used to populate the database.

If you will run Memgraph with Docker, make sure that the `init-file` and `init-data-file` configuration flags are referring to the files inside the container before Memgraph starts. Files can't be directly copied into a container before it's started because the filesystem of the container doesn't exist until it's actually running. However, you can tackle this by using a Dockerfile.

In this guide you will learn how to:
- [**Use the `init-file` flag with Docker**](#use-the-init-file-flag-with-docker)
- [**Use the `init-data-file` flag with Docker**](#use-the-init-data-file-flag-with-docker)

## Use the `init-file` flag with Docker

### 1. Create all necessary files

First, create a local directory called `my_init_test` with `auth.cypherl` and Dockerfile inside it.

Below is the content of the `auth.cypherl` file:

```
CREATE USER memgraph1 IDENTIFIED BY '1234';
```

The Dockerfile should be defined like this:

```bash
FROM memgraph/memgraph:latest

USER root

COPY auth.cypherl /usr/lib/memgraph/auth.cypherl

USER memgraph
```

The above Dockerfile builds an image based on `memgraph/memgraph:latest` image. For other images, [check Memgraph's Docker Hub](https://hub.docker.com/u/memgraph). Then, it switches to the user `root` to be able to copy the local file to the container where Memgraph will be run. Due to the permissions set, it is recommended to copy it to `/usr/lib/memgraph/` or any subfolder within that folder. In the end, the user is switched back to `memgraph`.

### 2. Build the Docker image

Open the terminal, place yourself in the `my_init_test` directory and build the image called `my_image` with the following command:

```
docker build -t my_image .
```

### 3. Run the Docker image

Once you've built the Docker image, you can run it with the `init-file` flag set to the appropriate value:

```
docker run -it -p 7687:7687 -p 7444:7444 my_image --init-file=/usr/lib/memgraph/auth.cypherl
```

To check all available flags in Memgraph, refer to [the configuration reference guide](/docs/reference-guide/configuration.md).

### 4. Connect to Memgraph

To verify that everything is set up correctly, [run Memgraph Lab](/docs/memgraph-lab) and [connect to Memgraph](/docs/memgraph-lab/connect-to-memgraph). You'll notice that you have to connect manually and input the correct username and password. This happened because `auth.cypherl` file was run before the Bolt server started. You can also run the `SHOW CONFIG` query:

![memgraph-lab-init-file](../data/how-to-guides/memgraph-lab-init-file.png)

Notice how the current value of `init_file` is updated with the path to the CYPHERL file inside the container.

## Use the `init-data-file` flag with Docker

### 1. Create all necessary files

First, create a local directory called `my_init_test` with `data.cypherl` and Dockerfile inside it.

Below is the content of the `data.cypherl` file:

```
CREATE INDEX ON :__mg_vertex__(__mg_id__);
CREATE (:__mg_vertex__:`Person` {__mg_id__: 0, `name`: "Peter"});
CREATE (:__mg_vertex__:`Team` {__mg_id__: 1, `name`: "Engineering"});
CREATE (:__mg_vertex__:`Repository` {__mg_id__: 2, `name`: "Memgraph"});
CREATE (:__mg_vertex__:`Repository` {__mg_id__: 3, `name`: "MAGE"});
CREATE (:__mg_vertex__:`Repository` {__mg_id__: 4, `name`: "GQLAlchemy"});
CREATE (:__mg_vertex__:`Company` {__mg_id__: 5, `name`: "Memgraph"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 6, `name`: "welcome_to_engineering.txt"});
CREATE (:__mg_vertex__:`Storage` {__mg_id__: 7, `name`: "Google Drive"});
CREATE (:__mg_vertex__:`Storage` {__mg_id__: 8, `name`: "Notion"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 9, `name`: "welcome_to_memgraph.txt"});
CREATE (:__mg_vertex__:`Person` {__mg_id__: 10, `name`: "Carl"});
CREATE (:__mg_vertex__:`Folder` {__mg_id__: 11, `name`: "engineering_folder"});
CREATE (:__mg_vertex__:`Person` {__mg_id__: 12, `name`: "Anna"});
CREATE (:__mg_vertex__:`Folder` {__mg_id__: 13, `name`: "operations_folder"});
CREATE (:__mg_vertex__:`Team` {__mg_id__: 14, `name`: "Operations"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 15, `name`: "operations101.txt"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 16, `name`: "expenses2022.csv"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 17, `name`: "salaries2022.csv"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 18, `name`: "engineering101.txt"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 19, `name`: "working_with_github.txt"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 20, `name`: "working_with_notion.txt"});
CREATE (:__mg_vertex__:`Team` {__mg_id__: 21, `name`: "Marketing"});
CREATE (:__mg_vertex__:`Person` {__mg_id__: 22, `name`: "Julie"});
CREATE (:__mg_vertex__:`Account` {__mg_id__: 23, `name`: "Facebook"});
CREATE (:__mg_vertex__:`Account` {__mg_id__: 24, `name`: "LinkedIn"});
CREATE (:__mg_vertex__:`Account` {__mg_id__: 25, `name`: "HackerNews"});
CREATE (:__mg_vertex__:`File` {__mg_id__: 26, `name`: "welcome_to_marketing.txt"});
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 5 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 9 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 14 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 3 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 4 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 6 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 11 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 1 CREATE (u)-[:`HAS_TEAM`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 21 CREATE (u)-[:`HAS_TEAM`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 14 CREATE (u)-[:`HAS_TEAM`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 6 AND v.__mg_id__ = 7 CREATE (u)-[:`IS_STORED_IN`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 6 AND v.__mg_id__ = 8 CREATE (u)-[:`IS_STORED_IN`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 12 CREATE (u)-[:`CREATED_BY`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 1 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 5 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 9 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 7 CREATE (u)-[:`IS_STORED_IN`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 18 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 19 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 20 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 14 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 13 AND v.__mg_id__ = 15 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 13 AND v.__mg_id__ = 16 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 13 AND v.__mg_id__ = 17 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 13 AND v.__mg_id__ = 7 CREATE (u)-[:`IS_STORED_IN`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 13 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 21 AND v.__mg_id__ = 23 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 21 AND v.__mg_id__ = 24 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 21 AND v.__mg_id__ = 25 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 21 AND v.__mg_id__ = 26 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 22 AND v.__mg_id__ = 21 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 22 AND v.__mg_id__ = 5 CREATE (u)-[:`IS_PART_OF`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 22 AND v.__mg_id__ = 9 CREATE (u)-[:`HAS_ACCESS_TO`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 26 AND v.__mg_id__ = 7 CREATE (u)-[:`IS_STORED_IN`]->(v);
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 26 AND v.__mg_id__ = 8 CREATE (u)-[:`IS_STORED_IN`]->(v);
DROP INDEX ON :__mg_vertex__(__mg_id__);
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
```

These Cypher queries will create the *Identity and access management* dataset available in Memgraph Lab. You can get this CYPHERL file by exporting the dataset from the Memgraph Lab.

The Dockerfile should be defined like this:

```bash
FROM memgraph/memgraph:latest

USER root

COPY data.cypherl /usr/lib/memgraph/data.cypherl

USER memgraph
```

The above Dockerfile builds an image based on `memgraph/memgraph:latest` image. For other images, [check Memgraph's Docker Hub](https://hub.docker.com/u/memgraph). Then, it switches to the user `root` to be able to copy the local file to the container where Memgraph will be run. Due to the permissions set, it is recommended to copy it to `/usr/lib/memgraph/` or any subfolder within that folder. In the end, the user is switched back to `memgraph`.


### 2. Build the Docker image

Open the terminal, place yourself in the `my_init_test` directory and build the image called `my_image` with the following command:

```
docker build -t my_image .
```

### 3. Run the Docker image

Once you've built the Docker image, you can run it with the `init-data-file` flag set to the appropriate value:

```
docker run -it -p 7687:7687 -p 7444:7444 my_image --init-data-file=/usr/lib/memgraph/data.cypherl
```

To check all available flags in Memgraph, refer to [the configuration reference guide](/docs/reference-guide/configuration.md).

### 4. Connect to Memgraph

To verify that everything is set up correctly, [run Memgraph Lab](/docs/memgraph-lab), [connect to Memgraph](/docs/memgraph-lab/connect-to-memgraph), and run the `SHOW CONFIG` query:

![memgraph-lab-init-data-file](../data/how-to-guides/memgraph-lab-init-data-file.png)

Notice how the database is already populated and the current value of `init_data_file` is updated with the path to the CYPHERL file inside the container.


7 changes: 6 additions & 1 deletion docs/import-data/files/load-csv-clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If the import speed is still unsatisfactory, don't hesitate to contact us on [Di
The syntax of the `LOAD CSV` clause is:

```cypher
LOAD CSV FROM <csv-file-path> ( WITH | NO ) HEADER [IGNORE BAD] [DELIMITER <delimiter-string>] [QUOTE <quote-string>] AS <variable-name>
LOAD CSV FROM <csv-file-path> ( WITH | NO ) HEADER [IGNORE BAD] [DELIMITER <delimiter-string>] [QUOTE <quote-string>] [NULLIF <nullif-string>] AS <variable-name>
```

- `<csv-file-path>` is a string of the path to the CSV file. There are no
Expand Down Expand Up @@ -73,6 +73,11 @@ LOAD CSV FROM <csv-file-path> ( WITH | NO ) HEADER [IGNORE BAD] [DELIMITER <deli
* `QUOTE <quote-string>` option enables the user to specify the CSV quote
character. If it isn't set, the default quote character `"` is assumed.

* `NULLIF <nullif-string>` option enables you to specify a sequence of
characters that will be parsed as null. By default, all empty columns in
Memgraph are treated as empty strings, so if this option is not used, no
values will be treated as null.

* `<variable-name>` is a symbolic name representing the variable to which the
contents of the parsed row will be bound to, enabling access to the row
contents later in the query. The variable doesn't have to be used in any
Expand Down
Loading

0 comments on commit 9b7d653

Please sign in to comment.