You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,19 @@ count:
64
64
separator: ,
65
65
fetch:
66
66
page_size: 100
67
+
validate:
68
+
methods:
69
+
- schema # checks that payloads conform to the Swagger definitions from the API
70
+
- descriptors # checks that descriptor values are either locally-defined or exist in the remote API
71
+
- uniqueness # checks that local payloads are unique by the required property values
72
+
- references # checks that references resolve, either locally or in the remote API
73
+
# or `methods: "*"`
74
+
references:
75
+
selector:
76
+
- studentAssessments.studentReference
77
+
- studentSchoolAssociations.schoolReference
78
+
behavior: exclude # or `include`
79
+
remote: False # default=True
67
80
force_delete: True
68
81
log_level: INFO
69
82
show_stacktrace: True
@@ -94,6 +107,7 @@ show_stacktrace: True
94
107
* (optional) Whether to `verify_ssl`. The default is `True`. Set to `False` when working with `localhost` APIs or to live dangerously.
95
108
* (optional) for [`lightbeam count`](#count), optionally change the `separator` between `Records` and `Endpoint`. The default is a "tab" character.
96
109
* (optional) for [`lightbeam fetch`](#fetch), optionally specify the number of records (`page_size`) to GET at a time. The default is 100, but if you're trying to extract lots of data from an API increase this to the largest allowed (which depends on the API, but is often 500 or even 5000).
110
+
* (optional) for [`lightbeam validate`](#validate), optionally specify the list of validation `methods` to run (from `schema`, `descriptors`, `uniqueness`, and `references`). If validating `references`, specify a list of `selector`s to either `include` or `exclude` (`behavior`) when validating. Also optionally disable `remote` referece validation (enabled by default).
97
111
* (optional) Skip the interactive confirmation prompt (for programmatic use) when using the [`delete`](#delete) command. The default is `False` (prompt).
98
112
* (optional) Specify a `log_level` for output. Possible values are
99
113
- `ERROR`: only output errors like missing required sources, invalid references, invalid [YAML configuration](#yaml-configuration), etc.
@@ -217,6 +231,17 @@ Running the `truncate` command will prompt you to type "yes" to confirm. This co
217
231
218
232
`truncate`is a convenience command which should be used sparingly, as it can generate large numbers of `deletes` records and cause performance issues when pulling from `deletes` endpoints. If you want to wipe an entire Ed-Fi ODS, a better approach may be to drop and recreate the database (and re-send Descriptors and other default resources as needed).
Creates a skeleton of an [`earthmover`](https://edanalytics.github.io/earthmover/) project for _creating_ JSONL Ed-Fi data which one can then `lightbeam send` to an Ed-Fi API. It uses the Ed-Fi API's [OpenAPI specification](https://spec.openapis.org/oas/latest.html) to determine the schema of the endpoints you select (`lightbeam create` should usually be used with the `-s` [selector](#selectors)). Then, in the current directory, it:
239
+
* creates (if it doesn't already exist, otherwise adds/overwrites) a partial `earthmover.yml` configuration file with empty `sources` and `transformations` but `destinations` for each selected endpoint, plus comments indicating what column names and data types/values are required, and the required grain of the table (based on `isIdentity` flags in the OpenAPI definitions)
240
+
* creates (or overwrites) `templates/*.jsont` for each selected endpoint, with skeleton Jinja-JSON that includes all the required fields (including nested ones), optional fields wrapped in conditionals, and comments with some of the property metadata from OpenAPI definitions, such as `type`, `description`, `isIdentity`, etc.
241
+
242
+
The purpose of `lightbeam create` is to save developers time if they want to use `earthmover` to create Ed-Fi-shaped data from other data sources. See the [`earthmover` documentation](https://edanalytics.github.io/earthmover/) for more information.
243
+
244
+
220
245
## Other options
221
246
See a help message with
222
247
```bash
@@ -230,6 +255,14 @@ lightbeam -v
230
255
lightbeam --version
231
256
```
232
257
258
+
Override specific configurations in `lightbeam.yml` from the command-line using the `--set` flag
0 commit comments