Skip to content
Snippets Groups Projects
Commit fa8c3a4b authored by Chieh Lin's avatar Chieh Lin
Browse files

Extract Event and Measurement table

parent c4066854
No related branches found
No related tags found
No related merge requests found
Pipeline #370873 failed
No preview for this file type
This diff is collapsed.
No preview for this file type
...@@ -4,9 +4,10 @@ import re ...@@ -4,9 +4,10 @@ import re
class Observation_Spec: class Observation_Spec:
def __init__(self, type:str, label:str, features_name:list = None): def __init__(self, tablename:str, type:str, label:list[str], features_name:list = None):
self.tablename = tablename
self.type = type # 'event' or 'measurement' self.type = type # 'event' or 'measurement'
self.label = label self.label = label # (self-define or from column, column name, column value orself-define label)
self.features_name = features_name if features_name else [] self.features_name = features_name if features_name else []
def add_feature(self, name): def add_feature(self, name):
...@@ -17,6 +18,7 @@ class Observation_Spec: ...@@ -17,6 +18,7 @@ class Observation_Spec:
def to_dict(self): def to_dict(self):
return { return {
'tablename': self.tablename,
'type': self.type, 'type': self.type,
'label': self.label, 'label': self.label,
'features_name': self.features_name 'features_name': self.features_name
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment