You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here I'll describe what is necessary to allow ETLocal to accept a Derived dataset as a parent of a dataset. And which inputs/values should be added to ETLocal.
1. Allowing Derived datasets as parents
We need to make a few tweaks to the code in ETLocal and set up new validations for who can be a parent.
Currently, instead of a parent, datasets have a country. In Dataset we should update the attribute into being called country. For example:
- validates :country, presence: true- validates_each :country, allow_nil: true do |record, _attr, value|- unless Etsource.available_countries.include?(value.downcase)- record.errors.add(value.downcase, 'must be in ETsource')- end- end+ validates :parent, inclusion: {in: Etsource.available_countries}
Create a migration to change the column name
Update the word country to parent throughout the app
Review validations: e.g. update Etsource.available_countries to Etsource.available_datasets, where all datasets will now be elegible
Adjust specs
2. Attributes to be checked
The Atlas::Dataset.attribute_set
In the Dataset in Atlas we define all area attributes needed to initialise a dataset. Let's make sure we have a correspondent input for each of them.
Check alignment of Atlas's attributes on Dataset with ETLocal inputs
ETLocal works as follows: if an input or attribute is not specified in ETLocal, it looks at the value represented in ETSource.
This value that is in ETSource might be the result of a sparse graph query, or copied from the parent set upon export from etlocal to etsource. Meaning: 1) a dataset in etlocal does not have to be complete and 2) changes in a parent within the etocal environment will not change anything in the children until export to ETSource.
This last point could be a plus, but I can imagine you'd like to see the effect of parent changes on the children immediately, and not only after export. @mabijkerk let's discuss this part in our brainstorm.
Curves
To ensure the future of parenting, we should make sure a full curve set is required for root ancestors. As in Atlas we currently still enforce a Full dataset as root ancestor, this is not yet necessary at this point, but it would be nice to take some time to design the passing on of curves through Transformer.
The text was updated successfully, but these errors were encountered:
This issue is the ETLocal counterpart of quintel/atlas#171.
Here I'll describe what is necessary to allow ETLocal to accept a
Derived
dataset as a parent of a dataset. And which inputs/values should be added to ETLocal.1. Allowing
Derived
datasets as parentsWe need to make a few tweaks to the code in ETLocal and set up new validations for who can be a parent.
Currently, instead of a
parent
, datasets have acountry
. InDataset
we should update the attribute into being calledcountry
. For example:country
toparent
throughout the appEtsource.available_countries
toEtsource.available_datasets
, where all datasets will now be elegible2. Attributes to be checked
The
Atlas::Dataset.attribute_set
In the
Dataset
in Atlas we define all area attributes needed to initialise a dataset. Let's make sure we have a correspondent input for each of them.ETLocal works as follows: if an input or attribute is not specified in ETLocal, it looks at the value represented in ETSource.
This value that is in ETSource might be the result of a sparse graph query, or copied from the parent set upon export from etlocal to etsource. Meaning: 1) a dataset in etlocal does not have to be complete and 2) changes in a parent within the etocal environment will not change anything in the children until export to ETSource.
This last point could be a plus, but I can imagine you'd like to see the effect of parent changes on the children immediately, and not only after export. @mabijkerk let's discuss this part in our brainstorm.
Curves
To ensure the future of parenting, we should make sure a full curve set is required for root ancestors. As in Atlas we currently still enforce a
Full
dataset as root ancestor, this is not yet necessary at this point, but it would be nice to take some time to design the passing on of curves through Transformer.The text was updated successfully, but these errors were encountered: