-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add structural rules to YML schema (#118)
Added a new section `structural_rules` to the YML schema to enforce rules related to the structure of the CSV file. These rules ensure that the columns in CSV files strictly follow the order specified in the schema and disallow extra columns not specified in the schema.
- Loading branch information
Showing
23 changed files
with
611 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# JBZoo Toolbox - Csv-Blueprint. | ||
# | ||
# This file is part of the JBZoo Toolbox project. | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# | ||
# @license MIT | ||
# @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
# @see https://github.com/JBZoo/Csv-Blueprint | ||
# | ||
|
||
name: Simple CSV Schema | ||
filename_pattern: /my-favorite-csv-\d+\.csv$/i | ||
csv: | ||
delimiter: ';' | ||
|
||
columns: | ||
- name: id | ||
rules: | ||
not_empty: true | ||
is_int: true | ||
aggregate_rules: | ||
is_unique: true | ||
sorted: [ asc, numeric ] | ||
|
||
- name: name | ||
rules: | ||
length_min: 3 | ||
aggregate_rules: | ||
count: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.