You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sdap.apache.org by GitBox <gi...@apache.org> on 2022/12/05 22:19:15 UTC

[GitHub] [incubator-sdap-nexus] skorper commented on a diff in pull request #220: cdmssubset bugfix

skorper commented on code in PR #220:
URL: https://github.com/apache/incubator-sdap-nexus/pull/220#discussion_r1040162217


##########
analysis/webservice/algorithms/doms/subsetter.py:
##########
@@ -309,16 +300,21 @@ def toCsv(self):
             ]
             data_variables = list(set([keys for result in results for keys in result['data'].keys()]))
             data_variables.sort()
+
+            if 'id' in list(set([keys for result in results for keys in result.keys()])):
+                headers.append('id')
+
             headers.extend(data_variables)
             for i, result in enumerate(results):
                 cols = []
 
                 cols.append(result['longitude'])
                 cols.append(result['latitude'])
                 cols.append(datetime.utcfromtimestamp(result['time']).strftime('%Y-%m-%dT%H:%M:%SZ'))
+                cols.append(result.get('id'))

Review Comment:
   Thanks Riley, I actually made that change locally but never pushed it! I split the id from the default header because there are some cases where "id" is not present and some where there aren't



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sdap.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org