Skip to content

Commit

Permalink
feat: Make most fields in big query diagnostic schema as optional #404
Browse files Browse the repository at this point in the history
* start using new schema for diagnostic data
  • Loading branch information
Pritam Ghanghas committed Jul 27, 2022
1 parent 67acaf7 commit 6a2404d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions bigquery/diag_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,37 @@
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "BN",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "ID",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "BA",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "FR",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "FW",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "VA",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "serial_number",
"type": "STRING"
},
Expand All @@ -65,17 +65,17 @@
"type": "BOOLEAN"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "PK",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "OK",
"type": "STRING"
},
{
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "AN",
"type": "STRING"
},
Expand Down
20 changes: 10 additions & 10 deletions hw_diag/diagnostics/bigquery_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ class DiagnosticDataModel(BaseModel):
last_updated: str
E0: Optional[str]
W0: Optional[str]
BN: str
ID: str
BA: str
FR: str
FW: str
VA: str
serial_number: str
BN: Optional[str]
ID: Optional[str]
BA: Optional[str]
FR: Optional[str]
FW: Optional[str]
VA: Optional[str]
serial_number: Optional[str]
ECC: Optional[bool]
LOR: Optional[bool]
PK: str
OK: str
AN: str
PK: Optional[str]
OK: Optional[str]
AN: Optional[str]
MC: Optional[bool]
MD: Optional[bool]
MH: Optional[int]
Expand Down

0 comments on commit 6a2404d

Please sign in to comment.