diff --git a/openquake/engine/engine.py b/openquake/engine/engine.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/engine.py
+++ b/openquake/engine/engine.py
@@ -146,6 +146,8 @@ def expose_outputs(dstore, owner=getpass.getuser(), status='complete'):
     if oq.conditional_loss_poes:  # expose loss_maps outputs
         if 'loss_curves-stats' in dstore:
             dskeys.add('loss_maps-stats')
+    if len(dstore['csm_info/sg_data']) == 1:  # do not export a single group
+        dskeys.remove('sourcegroups')
     if 'all_loss_ratios' in dskeys:
         dskeys.remove('all_loss_ratios')  # export only specific IDs
     if 'ruptures' in dskeys and 'scenario' in calcmode:
Do not export sourcegroups if there is only one of them [skip hazardlib][demos]


Former-commit-id: e<I>eeeb7fabd<I>c<I>bb<I>e<I>