You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2019/11/14 21:59:00 UTC

[jira] [Comment Edited] (AIRAVATA-3211) Assign wildcard matches to OutputDataObjectType instead of creating new ones

    [ https://issues.apache.org/jira/browse/AIRAVATA-3211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974633#comment-16974633 ] 

Marcus Christie edited comment on AIRAVATA-3211 at 11/14/19 9:58 PM:
---------------------------------------------------------------------

Query for app outputs that are type URI and have a wildcard pattern:
{code:sql}
select i.INTERFACE_ID, i.APPLICATION_NAME, i.GATEWAY_ID, OUTPUT_KEY, OUTPUT_VALUE, DATA_TYPE from APPLICATION_OUTPUT o inner join APPLICATION_INTERFACE i on i.INTERFACE_ID = o.INTERFACE_ID where OUTPUT_VALUE like '%*%' and DATA_TYPE = 'URI_COLLECTION';
{code}

Query to update them
{code:sql}
begin;
update APPLICATION_OUTPUT set DATA_TYPE = 'URI_COLLECTION' where OUTPUT_VALUE like '%*%' and DATA_TYPE = 'URI';
commit;
{code}


was (Author: marcuschristie):
Query for app outputs that are type URI and have a wildcard pattern:
{code:sql}
select OUTPUT_KEY, OUTPUT_VALUE, DATA_TYPE, (select GATEWAY_ID from APPLICATION_INTERFACE i where i.INTERFACE_ID = o.INTERFACE_ID) as GATEWAY_ID from APPLICATION_OUTPUT o where OUTPUT_VALUE like '%*%' and DATA_TYPE = 'URI';
{code}

Query to update them
{code:sql}
begin;
update APPLICATION_OUTPUT set DATA_TYPE = 'URI_COLLECTION' where OUTPUT_VALUE like '%*%' and DATA_TYPE = 'URI';
commit;
{code}

> Assign wildcard matches to OutputDataObjectType instead of creating new ones
> ----------------------------------------------------------------------------
>
>                 Key: AIRAVATA-3211
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3211
>             Project: Airavata
>          Issue Type: Bug
>          Components: helix implementation
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> Currently the OutputDataStagingTask handles wildcard matches by adding additional OutputDataObjectTypes to the Experiment model. The problem with this is that this breaks the association between the name of the original OutputDataObjectType and these newly created ones. The output view providers (AIRAVATA-3029) functionality in the Django portal uses this association to be able to register custom output view providers as metadata of the OutputDataObjectType in the Application Interface and have those applied to experiments that completed before the custom output view provider was registered (the experiments will have a copy of the OutputDataObjectType metadata for their outputs, but won't get any updates to metadata so portal code looks at the original Application Interface to see if there are any other output view providers registered).
> Instead I propose:
> * if the output type is URI, then take the first wildcard match, create DataProduct and set the data product URI as the value of the output. This will overwrite the wildcard pattern in the value field, but that should be okay since the wildcard pattern is no longer needed.
> * if the output type is a URI_COLLECTION, then create DataProducts for all matching files and set the value to a comma delimited string out data product URIs.
> h5. TODO
> * [ ] Test wildcard matches with multiple matches and URI_COLLECTION type
> * [ ] Any wildcard matches that were intended to match multiple files should be switched to URI_COLLECTION type



--
This message was sent by Atlassian Jira
(v8.3.4#803005)