Skip to content

Commit

Permalink
Don't insert KDVHFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
Lun4m committed Oct 28, 2024
1 parent 73aeaf2 commit b124169
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion db/flags.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS flags.kdvh (
obstime TIMESTAMPTZ NOT NULL,
controlinfo TEXT NULL,
useinfo TEXT NULL,
-- kvdhflags TEXT NULL, -- What is this and should we store it?
-- kdvhflag TEXT NULL,
CONSTRAINT unique_kdvh_timeseries_obstime UNIQUE (timeseries, obstime)
);

Expand Down
6 changes: 0 additions & 6 deletions migrations/kdvh/import_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ func makeDataPage(obs Obs) (lard.Obs, error) {
NonScalarData: nonscalar,
KVFlagUseInfo: useinfo,
KVFlagControlInfo: controlinfo,
KDVHFlag: obs.Flags,
}, nil
}

Expand Down Expand Up @@ -318,7 +317,6 @@ func makeDataPageEdata(obs Obs) (lard.Obs, error) {
Data: valPtr,
KVFlagUseInfo: useinfo,
KVFlagControlInfo: controlinfo,
KDVHFlag: obs.Flags,
}, nil
}

Expand Down Expand Up @@ -375,7 +373,6 @@ func makeDataPagePdata(obs Obs) (lard.Obs, error) {
Data: valPtr,
KVFlagUseInfo: useinfo,
KVFlagControlInfo: controlinfo,
KDVHFlag: obs.Flags,
}, nil
}

Expand Down Expand Up @@ -442,7 +439,6 @@ func makeDataPageNdata(obs Obs) (lard.Obs, error) {
Data: valPtr,
KVFlagUseInfo: useinfo,
KVFlagControlInfo: controlinfo,
KDVHFlag: obs.Flags,
}, nil
}

Expand Down Expand Up @@ -488,7 +484,6 @@ func makeDataPageVdata(obs Obs) (lard.Obs, error) {
Data: valPtr,
KVFlagUseInfo: useinfo,
KVFlagControlInfo: controlinfo,
KDVHFlag: obs.Flags,
}, nil
}

Expand All @@ -504,7 +499,6 @@ func makeDataPageDiurnalInterpolated(obs Obs) (lard.Obs, error) {
Data: &val,
KVFlagUseInfo: DIURNAL_INTERPOLATED_USEINFO,
KVFlagControlInfo: VALUE_MANUALLY_INTERPOLATED,
KDVHFlag: obs.Flags,
}, nil
}

Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions migrations/lard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ type Obs struct {
KVFlagControlInfo string
// Flag encoding quality control status
KVFlagUseInfo string
// Subset of 5 digits of KVFlagUseInfo stored in KDVH
KDVHFlag string

// 5 digit flag stored in KDVH
// TODO: these are the first 5 digits in KVFlagUseInfo
// I don't see a point in storing them separately?
// KDVHFlag string

// Comma separated value listing checks that failed during quality control
// KVCheckFailed string
}

0 comments on commit b124169

Please sign in to comment.