Last active
August 31, 2022 21:18
-
-
Save Mark-McCracken/a58b22e1f503dd6faeb55dee49be3a9e to your computer and use it in GitHub Desktop.
example json schema
This file contains hidden or 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
{ | |
"$id": "file://json_schema/table_definition.schema.json", | |
"type": "object", | |
"properties": { | |
"tableName": { | |
"type": "string", | |
"minLength": 1, | |
"maxLength": 300, | |
"pattern": "^[a-zA-Z_](?:[a-zA-Z0-9_])*$" | |
}, | |
"tableType": { | |
"type": "string", | |
"enum": [ | |
"transactional fact" | |
] | |
}, | |
"dataset": { "type": "string" }, | |
"description": { | |
"type": "string", | |
"minLength": 1 | |
}, | |
"labels": { | |
"type": "object", | |
"additionalProperties": { "type": "string" } | |
}, | |
"clusteringColumns": { | |
"type": "array", | |
"items": { "type": "string" } | |
}, | |
"columns": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"minLength": 1, | |
"maxLength": 300, | |
"pattern": "^[a-zA-Z_](?:[a-zA-Z0-9_])*$" | |
}, | |
"type": { | |
"type": "string", | |
"enum": [ | |
"STRING", | |
"NUMERIC", | |
"INTEGER", | |
"DATE", | |
"DATETIME", | |
"TIMESTAMP", | |
"BOOL" | |
] | |
}, | |
"mode": { | |
"type": "string", | |
"enum": ["REQUIRED", "NULLABLE"] | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"piiCategory": { | |
"type": "string", | |
"enum": [ | |
"Address", | |
"Name", | |
"AnyPII", | |
"CustomerNumber", | |
"DateTime", | |
"EmailAddress", | |
"Number", | |
"TaxPayerNumber", | |
"TelephoneNumber" | |
] | |
} | |
}, | |
"required": [ | |
"name", | |
"type", | |
"mode", | |
"description" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"tableName", | |
"tableType", | |
"dataset", | |
"description", | |
"labels", | |
"clusteringColumns", | |
"columns" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment