Skip to content

Commit 0409a1d

Browse files
authored
Add load data example
1 parent 87673c3 commit 0409a1d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ Learn about Reactive Programming in Java (watch the [webinar](https://go.mariadb
1313

1414
# Setting up the MariaDB database
1515

16-
To run the experiments in this repository, you'll need a MariaDB database running on your machine with the following table:
16+
To run the experiments in this repository, you'll need a MariaDB database running on your machine with the following database and table:
1717

1818
```sql
19+
CREATE DATABASE reactive;
20+
USE reactive;
21+
1922
CREATE TABLE `word` (
2023
`id` int(11) NOT NULL AUTO_INCREMENT,
2124
`text` varchar(64) DEFAULT NULL,
@@ -25,7 +28,17 @@ CREATE TABLE `word` (
2528

2629
> Note: Aria is a storage engine for read-heavy workoads, but it has some limitations. See [this blog post](https://mariadb.com/resources/blog/storage-engine-choice-aria/).
2730
28-
Insert or import test data into this table as well. Check [this](https://github.com/mariadb-developers/wordle-game-clone) for an example on how to import +370k rows.
31+
Insert or import test data into this table. For example, download [this CSV file](https://www.kaggle.com/datasets/ruchi798/part-of-speech-tagging) and import it as follows:
32+
33+
```sql
34+
LOAD DATA LOCAL INFILE '/path/to/words_pos.csv'
35+
IGNORE INTO TABLE word
36+
FIELDS
37+
TERMINATED BY ','
38+
LINES TERMINATED BY '\n'
39+
IGNORE 0 LINES
40+
(@dummy, text) SET text = UPPER(text);
41+
```
2942

3043
## Support and Contribution
3144

0 commit comments

Comments
 (0)