featurebase/idk/datagen
2022-12-12 09:01:20 -08:00
..
gen Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
testdata Add DAX - full list of squashed commits below 2022-12-12 09:01:20 -08:00
all-field-types.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
bank.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
claim.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
cmd.go Sync from private repo to commit 12d608c80d 2022-12-12 09:01:20 -08:00
common.go staticcheck fixes (#2278) 2022-11-15 11:33:10 -08:00
custom.go Add DAX - full list of squashed commits below 2022-12-12 09:01:20 -08:00
custom_test.go staticcheck fixes (#2278) 2022-11-15 11:33:10 -08:00
customer.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
customer_segmentation.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
customer_segmentation_test.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
equipment.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
equipment.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
example.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
hobbies.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
item.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
kitchen-sink-keyed.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
kitchen-sink.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
locations.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
network.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
README.md Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
shared.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
sites.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
sites.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
sizing.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
skills.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
stringpk.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
timeseries.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
titles.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
transactions.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
transactions_scenario_1.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
uscities.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
warranty.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
zip_codes.data.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00

Datagen Tool

Help Usage

Usage of datagen:
  -c, --concurrency int             Number of concurrent sources and indexing routines to launch. (default 1)
      --dry-run                     Dry run - just flag parsing.
  -e, --end-at uint                 ID at which to stop generating records.
      --kafka.batch-size int        Number of records to generate before sending them to Kafka all at once. Generally, larger means better throughput and more memory usage. (default 1000)
      --kafka.hosts strings         Comma separated list of host:port pairs for Kafka. (default [])
      --kafka.registry-url string   Location of Confluent Schema Registry. Must start with 'https://' if you want to use TLS.
      --kafka.subject string        Kafka schema subject.
      --kafka.topic string          Kafka topic to post to.
      --pilosa.batch-size int       Number of records to read before indexing all of them at once. Generally, larger means better throughput and more memory usage. 1,048,576 might be a good number.
      --pilosa.cache-length uint    Number of batches of ID mappings to cache. (default 64)
      --pilosa.hosts strings        Comma separated list of host:port pairs for Pilosa. (default [])
      --pilosa.index string         Name of Pilosa index.
      --seed int                    Seed to use for any random number generation.
  -s, --source string               Source generator type. Running datagen with no arguments will list the available source types.
  -b, --start-from uint             ID at which to start generating records.
  -t, --target string               Destination for the generated data: [kafka, pilosa]. (default "pilosa")
      --track-progress              Periodically print status updates on how many records have been sourced.

Example Usage

The following command will create 100 records in Pilosa index (starting at ID 0 and ending at ID 99) in the equipment index using the equipment data generator.

datagen --source=equipment --pilosa.index=equipment --end-at=99

Adding New Sources

TODO: redo README (or delete?)

If you're looking to add a new Source to datagen, the best thing to do is use the special "custom" datagen source (datagen --source=custom --custom-config=somefile.yaml) and write a somefile.yaml which describes the data you want to generate. An example can be found in datagen/testdata/custom.yaml, and there are some more in the molecula/technical-validation repo.