ClaudioV's avatar
ClaudioV
New Member
5 months ago
Status:
New

SQL: Add OUTER UNION CORR–like operator (union by column name with automatic null padding)

In SAS PROC SQL, the OUTER UNION CORR operator allows vertically concatenating tables with different schemas by aligning columns by name and automatically creating missing columns filled with NULLs.

In Microsoft Fabric (Warehouse / SQL analytics endpoint / Spark SQL), this functionality is missing. Users must manually normalize schemas by explicitly adding NULL AS column_name in each SELECT, which becomes error‑prone and hard to maintain when unioning many heterogeneous datasets.

This feature is particularly important for:

  • migrations from SAS to Fabric
  • data lake / lakehouse ingestion patterns
  • append‑only fact tables from heterogeneous sources

    Adding an operator or syntax variant such as:

     

    SELECT * FROM A
    OUTER UNION BY NAME
    SELECT * FROM B
     
    would significantly reduce friction and improve competitiveness with other analytics platforms.



No CommentsBe the first to comment

Recent ideas