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

Commit

Permalink
chore(#1597): Remove 'generate' command from documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Laing committed Jan 17, 2020
1 parent 1c24dd2 commit caf8e49
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ When manually writing profiles, we recommend using a text editor which can valid
Now place the `generator.jar` file (downloaded from the [GitHub releases page](https://github.com/finos/datahelix/releases/)) in the same folder as the profile, open up a terminal, and execute the following:

```
$ java -jar generator.jar generate --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv
$ java -jar generator.jar --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv
```

The generator is a command line tool which reads a profile, and outputs data in CSV or JSON format. The `--max-rows=100` option tells the generator to create 100 rows of data, and the `--replace` option tells it to overwrite previously generated files. The compulsory `--profile-file` option specifies the name of the input profile, and the `--output-path` option specifies the location to write the output to. In `generate` mode `--output-path` is optional; the generator will default to standard output if it is not supplied. By default the generator outputs progress, in rows per second, to the standard error output. This can be useful when generating large volumes of data.
Expand Down Expand Up @@ -248,7 +248,7 @@ The mode is specified via the `--generation-type` option.
The generator has been designed to be fast and efficient, allowing you to generate large quantities of test and simulation data. If you supply a large number for the `--max-rows` option, the data will be streamed to the output file, with the progress / velocity reported during generation.

```
$ java -jar generator.jar generate --max-rows=10000 --replace --profile-file=profile.json --output-path=output.csv
$ java -jar generator.jar --max-rows=10000 --replace --profile-file=profile.json --output-path=output.csv
Generation started at: 16:41:44
Number of rows | Velocity (rows/sec) | Velocity trend
Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ Profiles can be run against a jar using the command line.

Currently the only mode fully supported by the data helix is generate mode. An example command would be something like

`java -jar generator.jar generate --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv`
`java -jar generator.jar --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv`

### Command Line Arguments for Generate Mode
<div id="Command-Line-Arguments-for-Generate-Mode"></div>
Expand Down
2 changes: 1 addition & 1 deletion docs/archive/developer/DockerSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ docker run -ti -v mydir:/data datahelix [parameters]
Note that the `-v` option specifies how to map your local filesystem into the Docker image, so that the DataHelix generator can access the profile file that you pass to it, and can write its output to a location you can access. For example, if you run the image inside the profile directory, on a system with Unix-style environment variables, you can run the following command:

```
docker run -ti -v $PWD:/data datahelix generate --profile-file=/data/examples/actor-names/profile.json
docker run -ti -v $PWD:/data datahelix --profile-file=/data/examples/actor-names/profile.json
```

This will map your current working directory (using the `$PWD` environment variable) to the `/data` directory in the Docker image's virtual filesystem, and uses this mapping to tell the generator to use the file `./examples/actor-names/profile.json` as its profile input. With this example, the generator output will be output to the console, but you can write the output data to a mapped directory in the same way.
6 changes: 3 additions & 3 deletions docs/archive/user/BuildAndRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Build the tool with all its dependencies:

Check the setup worked with this example command:

`java -jar orchestrator\build\libs\generator.jar generate --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv`
`java -jar orchestrator\build\libs\generator.jar --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv`

To generate valid data run the following command from the command line:

Expand Down Expand Up @@ -95,12 +95,12 @@ Navigate to the [`App.java` file](https://github.com/finos/datahelix/blob/master
Now edit the run configuration on the top toolbar created by the initial run. Name the run configuration 'Generate' and under 'Program Arguments' enter the following, replacing the paths with your desired files:

```
generate --profile-file="<path to an example JSON profile>" --output-path="<desired output file path>"
--profile-file="<path to an example JSON profile>" --output-path="<desired output file path>"
```

For example, run this command:
```
java -jar orchestrator\build\libs\generator.jar generate --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv
java -jar orchestrator\build\libs\generator.jar --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv
```

Additionally create another run configuration called GenerateViolating and add the program arguments
Expand Down
7 changes: 3 additions & 4 deletions docs/archive/user/gettingStarted/BasicUsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@

Once [Java v1.8](https://www.java.com/en/download/manual.jsp) is installed you can run the generator with the following command:

`java -jar <path to JAR file> <command> [options] <arguments>`
`java -jar <path to JAR file> [options] <arguments>`

* `<command>` one of the commands described below, `generate`, `visualise` etc which are **case sensitive**
* `[options]` optionally a combination of options to configure how the command operates
* `<arguments>` required inputs for the command to operate

**Note:** Do not include a trailing \ in directory paths

## Examples
* `java -jar generator.jar generate profile.json profile.csv`
* `java -jar generator.jar profile.json profile.csv`
* `java -jar generator.jar violate profile.json violated-data-files/`

Example profiles can be found in the [examples folder](../../../examples).

## Commands
### Generate
#### `generate [options] <profile path> <output path>`
#### `[options] <profile path> <output path>`

Generates data to a specified endpoint.

Expand Down
8 changes: 4 additions & 4 deletions docs/archive/user/gettingStarted/BuildAndRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ Build the tool with all its dependencies:

Check the setup worked with this example command:

`java -jar orchestrator\build\libs\generator.jar generate --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv`
`java -jar orchestrator\build\libs\generator.jar --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv`

To generate valid data run the following command from the command line:

`java -jar <path to JAR file> generate [options] --profile-file="<path to profile>" --output-path="<desired output path>"`
`java -jar <path to JAR file> [options] --profile-file="<path to profile>" --output-path="<desired output path>"`

* `[path to JAR file]` - the location of `generator.jar`.
* `[options]` - optionally a combination of [options](../commandLineOptions/GenerateOptions.md) to configure how the command operates.
Expand Down Expand Up @@ -97,12 +97,12 @@ Navigate to the [`App.java` file](../../../orchestrator/src/main/java/com/scottl
Now edit the run configuration on the top toolbar created by the initial run. Name the run configuration 'Generate' and under 'Program Arguments' enter the following, replacing the paths with your desired files:

```
generate --profile-file="<path to an example JSON profile>" --output-path="<desired output file path>"
--profile-file="<path to an example JSON profile>" --output-path="<desired output file path>"
```

For example, run this command:
```
java -jar orchestrator\build\libs\generator.jar generate --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv
java -jar orchestrator\build\libs\generator.jar --replace --profile-file=docs/user/gettingStarted/ExampleProfile1.json --output-path=out.csv
```

Additionally create another run configuration called GenerateViolating and add the program arguments
Expand Down
4 changes: 2 additions & 2 deletions docs/archive/user/gettingStarted/GeneratingData.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For first time setup, see the [Generator setup instructions](BuildAndRun.md).

To generate data run the following command from the command line

`java -jar <path to JAR file> generate [options] --profile-file="<path to profile>" --output-path="<desired output path>"`
`java -jar <path to JAR file> [options] --profile-file="<path to profile>" --output-path="<desired output path>"`

* `[path to JAR file]` the location of generator.jar
* `[options]` optionally a combination of [options](../commandLineOptions/GenerateOptions.md) to configure how the command operates
Expand All @@ -20,7 +20,7 @@ To generate data run the following command from the command line

Using the [Sample Profile](ExampleProfile1.json) that was created in the [previous](CreatingAProfile.md) section, run the following command:

`java -jar <path to JAR file> generate --profile-file="<path to ExampleProfile1.json>" --output-path="<path to desired output file>"`
`java -jar <path to JAR file> --profile-file="<path to ExampleProfile1.json>" --output-path="<path to desired output file>"`

* `<path to desired output file>` the file path to the desired output file

Expand Down

0 comments on commit caf8e49

Please sign in to comment.