|
|
||
|---|---|---|
| .. | ||
| test | ||
| .bazelrc | ||
| BUILD.bazel | ||
| DataDep.java | ||
| GenerateConfigure.java | ||
| GenerateExecute.java | ||
| job_lookup.py | ||
| JobConfig.java | ||
| MODULE.bazel | ||
| MODULE.bazel.lock | ||
| README.md | ||
| SumConfigure.java | ||
| SumExecute.java | ||
Basic Graph - Random Number Generator
This example demonstrates a databuild_job that generates a random number seeded based on the partition ref.
Multiple Configs
We can generate numbers for any partition provided (written to /tmp/databuild_test/examples/basic_graph), and so we have
a config per partition for demonstration purposes:
$ bazel run //:generate_number_job.cfg pippin salem sadie
{"outputs":["pippin"],"inputs":[],"args":["pippin"],"env":{}}
{"outputs":["salem"],"inputs":[],"args":["salem"],"env":{}}
{"outputs":["sadie"],"inputs":[],"args":["sadie"],"env":{}}
Execute
Generates a random number based on the hash of the partition ref and writes it to the output file.
bazel run //:sum_job.cfg pippin_salem_sadie | bazel run //:sum_job