Skip to content

Commit

Permalink
update with random multi copy split testing info (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyun-sj authored and ray6080 committed Nov 11, 2024
1 parent fc140cb commit 1ea6789
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/content/docs/developer-guide/testing-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,24 @@ In the example above:
The file must be created inside `test/statements/<name-of-the-file.cypher>`. By doing so, the testing
framework reads the query statements from the file and execute each query statement.

### Random Split Files to Copy

You can use `-MULTI_COPY_RANDOM` to randomly split a copy-able source into multiple csv files, which will then each be copied to a specified table.

```
-MULTI_COPY_RANDOM 5 test "${KUZU_ROOT_DIRECTORY}/dataset/large-serial/serialtable_merged.csv"
```

In the example above:

`-MULTI_COPY_RANDOM` is followed by an integer, being `5`, indicating the number of fragments the source should be split into. The next parameter is the table to copy into, here being `test`. The last parameter is a string that is the exact string used if the source were to be used in a `COPY FROM` statement (including the quotes and any specifications such as `delim` that follow).

Optionally, a seed can be specified after the table name to stably split the source or to reproduce a previous result. The seed is made up of two unsigned 64-bit integers. So, formally, the syntax from `-MULTI_COPY_RANDOM` is:

```
-MULTI_COPY_RANDOM <int> <string> [ SEED <int> <int> ] <string>
```

## Examples

### Full example with comments
Expand Down

0 comments on commit 1ea6789

Please sign in to comment.