Comments (11)
In GitLab by @steffenkaminski on Jan 18, 2019, 17:51
changed the description
from spine-database-api.
In GitLab by @steffenkaminski on Jan 18, 2019, 17:52
changed the description
from spine-database-api.
In GitLab by @manuelma on Jan 18, 2019, 21:52
I'm not sure what you mean by parameter class. Can you please take a look at this wiki and see if it helps you clarify?
Chances are that the Spine database API already provides those functions you're describing, or very similar ones.
from spine-database-api.
In GitLab by @manuelma on Jan 19, 2019, 15:15
I guess when you say parameter class you actually refer to the parameter
table, where the definition of a parameter is hold. And when you say parameter you actually refer to the parameter_value
table, which holds the value for a certain combination of parameter and object/relationship.
I believe that confusion is partly our fault. We are discussing about renaming the current parameter
table to parameter_definition
, hopefully to avoid that confusion. Do you think it could help?
Back to the original question, if my guess above is correct, then I believe we have more or less the methods you need:
def parameter_list(self, id_list=None, object_class_id=None, relationship_class_id=None):
"""Return all entries from the `parameter` table, either filtered by a list of parameter ids,
an object class id, or a relationship class id.
"""
def parameter_value_list(self, id_list=None, object_id=None, relationship_id=None):
"""Return all entries from the `parameter_value` table, either filtered by
a list of parameter value ids, an object id, or a relationship id.
"""
Maybe we should add an additional optional argument to parameter_value_list
, called parameter_id
?
from spine-database-api.
In GitLab by @steffenkaminski on Jan 29, 2019, 12:36
Thank for the very quick reply and sorry for the late response. Indeed I meant what you guessed: With parameter value I meant parameter.
In fact this were the two methods I was looking for. By some reasons I haven't found them. Thank you very much for clarification. Adding a parameter_id keyword argument would also be nice feature to have.
from spine-database-api.
In GitLab by @steffenkaminski on Jan 29, 2019, 12:38
closed
from spine-database-api.
In GitLab by @steffenkaminski on Jan 30, 2019, 10:16
reopened
from spine-database-api.
In GitLab by @steffenkaminski on Jan 30, 2019, 10:27
Another thought:
It would also be really helpful to have this functionality accessible in Julia through a convenience function. I know that this would brake a little with the structure, but it would also give some more freedom.
something like:
Parameters(object_class=”unit”) or Parameters(relationship_class=”unit__commodity”)
Returning a list of symbols containing the name of the parameter
What do you think?
I believe that confusion is partly our fault. We are discussing about renaming the current
parameter
table toparameter_definition
, hopefully to avoid that confusion. Do you think it could help?
For me it would be most logically to name "parameter" class to "parameter class". This would align with "object class" and "relationship class" classes. Following "parameter_value" would become "parameter". But I don't have a strong opinion on that. Having a look at the UML diagram gives the user some clarification.
from spine-database-api.
In GitLab by @jkiviluo on Jan 31, 2019, 10:32
@steffenkaminski It's an interesting thought to rename parameter_definition as parameter_class. It probably makes sense from the Spine Model perspective, but on the database side it might be a misnomer, since parameters are not 'objects' or 'entities' there. In the EAV model they are the 'A' - attributes with a Value.
from spine-database-api.
In GitLab by @steffenkaminski on Jan 31, 2019, 12:36
I'm quite far from being a data scientist! Looking at the database using a viewer parameters and parameter_values all seem to be table names. So in my mind all those tables seem to be classes (as in Manuels UML diagram). In this tables the single "objects" seemed to be stored in rows. Those "object" seem to be connected via their ids-"attributes"(?).
But never mind, it is also clear enough with the current names!
from spine-database-api.
In GitLab by @manuelma on Mar 25, 2019, 17:41
closed
from spine-database-api.
Related Issues (20)
- Restablish unique key 'name' for entity_class
- Parameter values as Apache Arrow objects HOT 4
- Can't trust legacy tool/feature/method for compatibility transformations
- Write type information for simple types as well HOT 7
- Rollback purge HOT 1
- Add Toolbox tests to GitHub actions? HOT 3
- Parameter value format documentation is missing index_name
- Wrong results after changing a filter
- Make sure TempId travel safely across the socket (DB server)
- The tool filter only works with 1 tool activated
- No entity can pass its tool filter when there are multiple `tool_feature_method`s HOT 1
- Fix broken example in parameter_value API documentation
- Guidelines on what to import in __init__.py
- Improve parsing performance by accepting only ISO 8601 time stamps HOT 2
- Check that CHANGELOG.md is up-to-date for 0.8-dev HOT 1
- Compatibility transformation should keep working after the first time HOT 1
- Alternative filter does not filter by entity alternatives
- Trying to get a parameter value that does not exist Tracebacks
- Mention the difference between entity_byname and element_name_list in documentation HOT 2
- Support EPS Value in GDX Exporter HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spine-database-api.