Command line

Every command of qadg, what it does, an example and its flags, in the words qadg help prints.

qadg generate <recipe>

Reads a recipe, produces the records it describes and writes them as CSV, as JSON or as SQL statements, beside a note saying what the run made. Nothing appears under its real name until the whole run has succeeded, so a run that fails or is stopped leaves nothing behind.

qadg generate --out ./data recipe.yaml
FlagWhat it does
--out <dir>Write the dataset here rather than where the recipe says.
--seed <text>Draw from this seed rather than the one in the recipe. The same seed gives the same data.
--format <name>Write csv, json or sql rather than the format the recipe asks for.
--dialect <name>Write sql for postgresql, mysql, sqlserver or sqlite. sql needs one, from here or from the recipe.
--manifest <form>Also write the manifest in this form beside the JSON one: gherkin, csv, markdown. Without it only the JSON is written.
--overwriteWrite over files that are already there. Without it an existing file stops the run.
--dry-runSay what would be produced and write nothing.

qadg verify <manifest> <response>

Reads the manifest a run wrote and a record of what your application did with that data, and reports where the two disagree. It is the only command that fails because of your application rather than because of itself.

qadg verify expectation-manifest.json response.json

qadg corrupt <file>

Reads a comma separated file, works out what its columns hold by looking at the values, and writes them back with damage in them beside a manifest saying what should happen to each one. What could not be worked out is listed rather than guessed.

qadg corrupt --layers L2,L3 --rows 5% contacts.csv
FlagWhat it does
--layers <list>Which lines of defence to attack, such as L2,L3. Required, because there is no safe default.
--rows <share>The share of rows to damage, such as 5%. Defaults to 5%.
--out <dir>Write the damaged file and the manifest here. Defaults to the current directory.
--seed <text>Draw from this seed. The same seed and the same file give the same damage.
--delimiter <char>The character between fields, for reading and for writing back. Defaults to a comma.
--per-row <how>exactly_one or any, for how many defects one damaged row carries.
--exclude-fields <list>Columns to leave alone, whatever the layers say.
--locale <name>Which locale's damage is available. It does not decide what the columns hold, the values do. A locale this build has no data for is refused.
--manifest <form>Also write the manifest in this form beside the JSON one: gherkin, csv, markdown. Without it only the JSON is written.
--overwriteWrite over files that are already there. Without it an existing file stops the run.
--dry-runSay what was worked out and what would be damaged, and write nothing.

qadg validate <recipe>

Reports every problem at once rather than stopping at the first, and lists separately what it did not check. A recipe that passes says what would be generated, not that the data exists.

qadg validate --json recipe.yaml

qadg quick <generator>

Writes values of the kind named, one to a line, and nothing else. It is the only command whose runs differ from each other: without a seed it draws a new one every time, so asking twice gives different values, and naming a seed makes it repeatable.

qadg quick pesel --count 10 --gender female
FlagWhat it does
--count <number>How many values to produce, one to a line. They are drawn rather than dealt, so with a short list of data behind them some may repeat.
--locale <name>Which locale to draw from. A generator that has no data for it is refused with the reason.
--seed <text>Draw from this seed. Without it a fresh one is drawn and named on the log channel.
--gender <female|male>The gender the value has to agree with. Refused for a generator that takes no account of it.
--birth-date <YYYY-MM-DD>The date of birth the value has to agree with. Refused for a generator that takes no account of it.

qadg help [command|generators]

With nothing after it, it prints what qadg --help prints. A command named after it is described on its own, with the flags it takes. The word generators lists every value this build can fill a field with and says where each one can be produced.

qadg help generators

Flags every command takes

FlagWhat it does
--versionPrint the four version numbers this build speaks.
--licensePrint the licenses of this tool and of everything inside it.
--jsonPrint machine readable output. Supported by --version, --license, validate and generate. One report at a time.
--no-colorTurn color off even when the output is a terminal.
--quietPrint failures only on the log channel.
--verbosePrint progress detail on the log channel.
-h, --helpPrint this text.