From 648d5f85c373729ded6b4824898d505d32c727b9 Mon Sep 17 00:00:00 2001 From: Manuel Carrer Date: Wed, 25 Sep 2024 15:14:20 +0200 Subject: [PATCH] Update comments --- kdvh_importer/dump.go | 4 ++-- kdvh_importer/import.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kdvh_importer/dump.go b/kdvh_importer/dump.go index 2fdfca84..617061a0 100644 --- a/kdvh_importer/dump.go +++ b/kdvh_importer/dump.go @@ -189,9 +189,9 @@ func getElements(table *TableInstructions, conn *sql.DB) ([]Element, error) { return elements, nil } +// List of columns that are not selected in KDVH queries // TODO: what's the difference between obs_origtime and klobs (they have same paramid)? -// TODO: should they be added here? -// TODO: do we need to exclude other elements? +// Should they be added here? Do we need to exclude other elements? var INVALID_COLUMNS = []string{"dato", "stnr", "typeid", "season"} // Fetch column names for a given table diff --git a/kdvh_importer/import.go b/kdvh_importer/import.go index 10b9b9c7..565aeef0 100644 --- a/kdvh_importer/import.go +++ b/kdvh_importer/import.go @@ -463,7 +463,6 @@ func parseData(handle io.Reader, ts *TimeseriesInfo, table *TableInstructions, c scanner.Scan() } - // TODO: maybe use csv.Reader var data []ObsLARD for scanner.Scan() { cols := strings.Split(scanner.Text(), config.Sep) @@ -473,8 +472,8 @@ func parseData(handle io.Reader, ts *TimeseriesInfo, table *TableInstructions, c return nil, err } - // TODO: not sure why we need this? // only import data between kdvh's defined fromtime and totime + // TODO: not 100% sure why we need this? if ts.Meta != nil { if ts.Meta.FromTime != nil && obsTime.Sub(*ts.Meta.FromTime) < 0 { continue