Validate
The validate
command is used to check your data vault model for any structural or setup problems before you create the final deployment code. It makes sure that your input files are correctly put together and match the required settings.
Validation happens in multiple steps, starting with checking the format of your YAML files. The format validator looks for common YAML errors, like a missing colon after a key. It also verifies that your data vault objects (like hubs) match their expected structure, ensuring, for example, that every hub has a defined name among others
After successfully passing the format validation, the tool then checks the content of your input model. This includes checks as verifying that objects don't contain duplicate entity sources and many others. The final step ensures that all source columns used throughout your model are properly listed in your information schema to secure successfull deployment.
It's important to understand that these validation phases run in a specific order. This means the tool will not proceed to content validation if it finds errors in the file format.
Options
-i, --input DIRECTORY
- (Required) This is the folder where your data vault model files are located.
-u, --url URL
- URL of the Stream2Vault server to connect to. Default: https://s2v.reeeliance.com
s2v validate -i path/to/my-input-folder/
This basic command is sufficient to validate your input model in case the folder structure follows default structure (all configuration files must be a part of the root folder). If that's not the case, S2V lets you specify the exact location of individual files using the following options:
--information-schema-path FILE
- The location of the information schema file used during the validation process.
--data-vault-settings-path FILE
- The location of the file containing specific settings for your data vault.
--source-system-settings-path FILE
- The location of the file with settings specific to your source systems.
s2v validate -i path/to/my-input-folder \
--data-vault-settings-path settings/dv_settings.yaml \
--source-system-settings-path settings/source_settings.yaml \
--information-schema-path settings/inf_schema_files/dev_schema.csv
Consider defining default validate
commands in your Makefile to simplify your work!
By default the validate
command checks everything in your model within the specified folder. However, if you only want to validate certain parts of your model, you can use --include-objects
and --exclude-objects
options. These options expect a list of object names, separated by commas, that you want to include or exclude.
--include-objects TEXT
- Comma-separated list of specific object names to validate.
--exclude-objects TEXT
- Comma-separated list of object names to exclude from validation.
s2v validate -i path/to/my-input-folder \
--include-objects HUB_CUSTOMER,SAT_CUSTOMER
To see all the available options for this command, type s2v validate --help
.