Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sispub
datapool
Commits
60f05665
Commit
60f05665
authored
May 23, 2019
by
schmittu
🍺
Browse files
WIP: backup
parent
f1342e13
Changes
1
Hide whitespace changes
Inline
Side-by-side
datapool/instance/db_objects.py
View file @
60f05665
...
...
@@ -54,6 +54,21 @@ class SignalSignalQualityAssociation(Base):
signal_quality
=
relationship
(
"SignalQualityDbo"
,
back_populates
=
"signals"
)
class
Signal2dDbo
(
Base
):
"""(formerly known as fact table)
Contains the measured value of a given parameter taken a at a specific time, site
"""
__tablename__
=
"signal_2d"
signal_2d_id
=
Column
(
Integer
(),
primary_key
=
True
)
x
=
Column
(
Float
(),
nullable
=
False
)
y
=
Column
(
Float
(),
nullable
=
True
)
value
=
Column
(
Float
(),
nullable
=
False
)
signal_id
=
Column
(
ForeignKey
(
"signal.signal_id"
),
nullable
=
True
)
class
SignalDbo
(
Base
):
"""(formerly known as fact table)
Contains the measured value of a given parameter taken a at a specific time, site
...
...
@@ -77,6 +92,8 @@ class SignalDbo(Base):
source
=
relationship
(
"SourceDbo"
)
parameter
=
relationship
(
"ParameterDbo"
)
signal_2d
=
relationship
(
"Signal2dDbo"
)
comments
=
relationship
(
"SignalCommentAssociation"
,
back_populates
=
"signal"
,
...
...
@@ -95,14 +112,16 @@ class SignalDbo(Base):
"coord_z"
,
"site_id"
,
"parameter_id"
,
"source_id"
,
"source_id"
,
"signal_2d_id"
,
),
)
def
__str__
(
self
):
return
(
"<SourceDbo signal_id={signal_id}, parameter_id={parameter_id}, "
"value={value}, timestamp={timestamp}, site={site_id}>"
"value={value}, timestamp={timestamp}, site={site_id}, "
"signal_2d_id={signal_2d_id}>"
).
format
(
**
vars
(
self
))
def
resolved_columns
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment