Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract unique data for each scenario #2

Open
amabdallah opened this issue Dec 29, 2018 · 0 comments
Open

Extract unique data for each scenario #2

amabdallah opened this issue Dec 29, 2018 · 0 comments

Comments

@amabdallah
Copy link
Member

HydraPlatform requires unique data for each scenario

The logic exist in code that compares the scenarios

Find a way to update HydraPlatform scenarios to have a parent id that relates the children scenarios with their parent.
It has to happen in two steps, upload the base scenario. Then call Hydra to look up the base scenario id, then use that id as the parent id for each scenario

SELECT  DISTINCT ScenarioMappings.MappingID,ScenarioMappings.ScenarioID,ScenarioName
FROM "ResourceTypes" 
Left JOIN "ObjectTypes" ON "ObjectTypes"."ResourceTypeID"="ResourceTypes"."ResourceTypeID" 
Left JOIN "Attributes" ON "Attributes"."ObjectTypeID"="ObjectTypes"."ObjectTypeID" 
Left JOIN "Mappings" ON "Mappings"."AttributeID"= "Attributes"."AttributeID" 
Left JOIN "ValuesMapper" ON "ValuesMapper"."ValuesMapperID"="Mappings"."ValuesMapperID" 
Left JOIN "ScenarioMappings" ON "ScenarioMappings"."MappingID"="Mappings"."MappingID" 
Left JOIN "Scenarios" ON "Scenarios"."ScenarioID"="ScenarioMappings"."ScenarioID" 
Left JOIN "MasterNetworks" ON "MasterNetworks"."MasterNetworkID"="Scenarios"."MasterNetworkID" 
Left JOIN "Methods" ON "Methods"."MethodID"="Mappings"."MethodID" 
Left JOIN "Sources" ON "Sources"."SourceID"="Mappings"."SourceID" 
Left JOIN "Instances" ON "Instances"."InstanceID"="Mappings"."InstanceID" 
ORDER BY ScenarioName,ScenarioMappings.MappingID ASC 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant