<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: SAP Datasphere - SQL Views as SQL Script – Automatic... in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14316515#M4935929</link>
    <description>&lt;P&gt;From a developer’s perspective, SAP Datasphere should &lt;STRONG&gt;explicitly support a Code-First modeling approach&lt;/STRONG&gt; — not as a replacement for the UI, but as a &lt;STRONG&gt;first-class, equal alternative&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have only started working with SAP Datasphere &lt;STRONG&gt;since last week&lt;/STRONG&gt;, and this was &lt;STRONG&gt;the very first limitation&lt;/STRONG&gt; my colleague and I noticed. The inability to fully define models in code immediately stood out in our daily development work.&lt;/P&gt;&lt;P&gt;For professional developers, it is essential to be able to &lt;STRONG&gt;define models entirely in code&lt;/STRONG&gt;. This includes the ability to declare a structured output schema directly in &lt;STRONG&gt;SQLScript&lt;/STRONG&gt;, such as a header with column names, data types, and semantics (similar to &lt;CODE&gt;RETURNS TABLE&lt;/CODE&gt; or declarative column definitions).&lt;BR /&gt;Today, this metadata must be maintained manually in the UI, which becomes extremely time-consuming and error-prone for complex or frequently changing queries.&lt;/P&gt;&lt;P&gt;A &lt;STRONG&gt;Code-First approach&lt;/STRONG&gt; would provide significant advantages:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Versioning and Traceability&lt;/STRONG&gt;&lt;BR /&gt;Fully declarative models can be cleanly versioned in Git, reviewed via diffs, and reproduced reliably. UI-managed metadata cannot offer the same level of transparency.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Maintainability and Scalability&lt;/STRONG&gt;&lt;BR /&gt;Large SQL models with many columns are difficult to refactor and maintain through the UI. Code is inherently better suited for restructuring, reuse, and long-term maintenance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Reduction of Manual Errors&lt;/STRONG&gt;&lt;BR /&gt;Maintaining logic in SQL and semantics in the UI creates duplication and inconsistency. A declarative schema in code would establish a &lt;STRONG&gt;single source of truth&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Developer Adoption and Productivity&lt;/STRONG&gt;&lt;BR /&gt;Many Datasphere users come from HANA, SQL, and data engineering backgrounds. A UI-only modeling approach creates friction and limits Datasphere’s adoption as a true enterprise-grade platform.&lt;/P&gt;&lt;P&gt;Importantly, &lt;STRONG&gt;Code-First does not exclude UI-First&lt;/STRONG&gt;.&lt;BR /&gt;Business users can continue to benefit from graphical modeling, while developers gain the flexibility to define everything in code — including structure, semantics, and output schema.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;If SAP Datasphere aims to position itself as a &lt;STRONG&gt;modern, developer-friendly data platform&lt;/STRONG&gt;, &lt;STRONG&gt;Code-First modeling is not a nice-to-have — it is a necessity&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;I strongly encourage SAP to consider this capability and to provide a clear roadmap in this direction.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jan 2026 08:33:36 GMT</pubDate>
    <dc:creator>anna_sch-25</dc:creator>
    <dc:date>2026-01-28T08:33:36Z</dc:date>
    <item>
      <title>SAP Datasphere - SQL Views as SQL Script – Automatic generation of columns in the left side pane</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaq-p/14315801</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am working with &lt;STRONG&gt;SQL Views using SQLScript (Table Function)&lt;/STRONG&gt; in &lt;STRONG&gt;SAP Datasphere&lt;/STRONG&gt; and noticed that the &lt;STRONG&gt;output columns must always be created manually&lt;/STRONG&gt; in the &lt;EM&gt;Model Properties → Columns&lt;/EM&gt; section before the SQLScript can be validated or deployed.&lt;/P&gt;&lt;P&gt;Even when the SQLScript contains a simple &lt;CODE&gt;RETURN SELECT ...&lt;/CODE&gt; statement, Datasphere does &lt;STRONG&gt;not&lt;/STRONG&gt; automatically generate the column definitions based on the SQL result. As far as I can see, this is different from standard SQL views, where column inference works automatically.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;My questions:&lt;/STRONG&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Is there any way to automatically generate the output columns&lt;/STRONG&gt; in the left side panel when using SQLScript (Table Function) in SAP Datasphere?&lt;/LI&gt;&lt;LI&gt;If not:&lt;UL&gt;&lt;LI&gt;Is this a current technical limitation?&lt;/LI&gt;&lt;LI&gt;Is there any roadmap indicating that automatic column generation will be supported in the future?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;&lt;STRONG&gt;Context / What I tried:&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;SQLScript with &lt;CODE&gt;RETURN SELECT ...&lt;/CODE&gt;&lt;/LI&gt;&lt;LI&gt;SQLScript with table variables&lt;/LI&gt;&lt;LI&gt;Validation to trigger auto‑generation&lt;/LI&gt;&lt;LI&gt;Switching between SQL Standard and SQLScript&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In all cases, Datasphere requires me to manually maintain the business/technical names and data types in the Model Properties panel before validation succeeds.&lt;/P&gt;&lt;P&gt;Example SQLScript:&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;return

with "cte_customers" as (
    select
        "id",
        "name"
    from "customers"
)

, "cte_customers_ranked" as (
    select
        "id",
        "name",
        1 as "rank_number"
    from "cte_customers"
)

select
    "id",
    "name",
    "rank_number"
from "cte_customers_ranked";&lt;/LI-CODE&gt;&lt;H3&gt;&lt;STRONG&gt;Expected behavior (wish):&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;Some way to auto‑populate the column list based on the SQLScript output (similar to SQL Standard views).&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;Actual behavior:&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;Columns must be fully defined manually, otherwise validation fails.&lt;/P&gt;&lt;P&gt;If anyone has additional insight, workaround ideas, or official SAP statements regarding this behavior, I would really appreciate it.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;Anna&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Clicking &lt;STRONG&gt;Validate&lt;/STRONG&gt; for the following statement &lt;STRONG&gt;automatically generates&lt;/STRONG&gt; the column &lt;EM&gt;ID&lt;/EM&gt;:&lt;/DIV&gt;&lt;LI-CODE lang="sql"&gt;tab =
select
    "id" AS ID
from "customers";

return
select ID from :tab;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Clicking &lt;STRONG&gt;Validate&lt;/STRONG&gt; for the following statement &lt;STRONG&gt;does not automatically generate&lt;/STRONG&gt; the column &lt;EM&gt;ID&lt;/EM&gt;:&lt;/DIV&gt;&lt;LI-CODE lang="sql"&gt;tab = with "cte1" (ID) as (
    select
        "id" AS ID
    from "customers"
)
select ID from "cte1";

return
select ID from :tab;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Is there an issue with the &lt;CODE&gt;WITH&lt;/CODE&gt; clause?&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Jan 2026 15:28:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaq-p/14315801</guid>
      <dc:creator>anna_sch-25</dc:creator>
      <dc:date>2026-01-27T15:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Datasphere - SQL Views as SQL Script – Automatic...</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14315876#M4935872</link>
      <description>&lt;P&gt;Hey Anna,&lt;/P&gt;&lt;P&gt;The short answer is that the SQL editor is very - ehm - simple (but I'm sure it has a great personality).&lt;BR /&gt;The Editor will try to derive the columns from whatever it finds immediately after the "Return" statement.&amp;nbsp;&lt;BR /&gt;It will put no effort into it, and any logic between the output and the source will break it.&amp;nbsp;&lt;/P&gt;&lt;H4&gt;An example:&lt;/H4&gt;&lt;P&gt;&lt;EM&gt;Any&lt;/EM&gt; kind of&amp;nbsp;obfuscation between the editor and the source tables will result in the editor throwing it's hands in the air.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a really basic example with a simple temp table between the source and the output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CLTGravesen_0-1769524830026.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/365858i5D6B9E4A0105FC12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CLTGravesen_0-1769524830026.png" alt="CLTGravesen_0-1769524830026.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Even this simple script confuses the poor things.&amp;nbsp;&lt;BR /&gt;It does derive the columns, but everything is cast as a string(100).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CLTGravesen_1-1769524924768.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/365860i260993C664B54B4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CLTGravesen_1-1769524924768.png" alt="CLTGravesen_1-1769524924768.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Adding a new "Ranking" column, which is clearly an integer, will still result in a string(100).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CLTGravesen_2-1769525072421.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/365862iF5820B0740EFC20F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CLTGravesen_2-1769525072421.png" alt="CLTGravesen_2-1769525072421.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;H4&gt;A workaround (not really).&lt;/H4&gt;&lt;P&gt;If you already have an object with the structure you want; one thing that makes it less-awful, it to add a&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;return select * from source&lt;/LI-CODE&gt;&lt;P&gt;And validate. That will generate the structure and derive the schema correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can then write your script on top, and replace the "Return" statement later.&lt;BR /&gt;This is shaky at best, but it's the least awful way I found.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 15:22:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14315876#M4935872</guid>
      <dc:creator>CLTGravesen</dc:creator>
      <dc:date>2026-01-27T15:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Datasphere - SQL Views as SQL Script – Automatic...</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14315902#M4935875</link>
      <description>return select * from source is not a workaround for complex sql queries with multiple joins.</description>
      <pubDate>Tue, 27 Jan 2026 16:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14315902#M4935875</guid>
      <dc:creator>anna_sch-25</dc:creator>
      <dc:date>2026-01-27T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Datasphere - SQL Views as SQL Script – Automatic...</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14315904#M4935876</link>
      <description>Thank you for your reply. I know the not-really-a-workaround with "return select * from source" for simple queries. It's not working with complex SQL queries with multiple joins and same column names in different tables. Do you know where this feature could be requested?</description>
      <pubDate>Tue, 27 Jan 2026 16:07:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14315904#M4935876</guid>
      <dc:creator>anna_sch-25</dc:creator>
      <dc:date>2026-01-27T16:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Datasphere - SQL Views as SQL Script – Automatic...</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14316483#M4935926</link>
      <description>I couldn't agree more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 28 Jan 2026 08:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14316483#M4935926</guid>
      <dc:creator>CLTGravesen</dc:creator>
      <dc:date>2026-01-28T08:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Datasphere - SQL Views as SQL Script – Automatic...</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14316515#M4935929</link>
      <description>&lt;P&gt;From a developer’s perspective, SAP Datasphere should &lt;STRONG&gt;explicitly support a Code-First modeling approach&lt;/STRONG&gt; — not as a replacement for the UI, but as a &lt;STRONG&gt;first-class, equal alternative&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have only started working with SAP Datasphere &lt;STRONG&gt;since last week&lt;/STRONG&gt;, and this was &lt;STRONG&gt;the very first limitation&lt;/STRONG&gt; my colleague and I noticed. The inability to fully define models in code immediately stood out in our daily development work.&lt;/P&gt;&lt;P&gt;For professional developers, it is essential to be able to &lt;STRONG&gt;define models entirely in code&lt;/STRONG&gt;. This includes the ability to declare a structured output schema directly in &lt;STRONG&gt;SQLScript&lt;/STRONG&gt;, such as a header with column names, data types, and semantics (similar to &lt;CODE&gt;RETURNS TABLE&lt;/CODE&gt; or declarative column definitions).&lt;BR /&gt;Today, this metadata must be maintained manually in the UI, which becomes extremely time-consuming and error-prone for complex or frequently changing queries.&lt;/P&gt;&lt;P&gt;A &lt;STRONG&gt;Code-First approach&lt;/STRONG&gt; would provide significant advantages:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Versioning and Traceability&lt;/STRONG&gt;&lt;BR /&gt;Fully declarative models can be cleanly versioned in Git, reviewed via diffs, and reproduced reliably. UI-managed metadata cannot offer the same level of transparency.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Maintainability and Scalability&lt;/STRONG&gt;&lt;BR /&gt;Large SQL models with many columns are difficult to refactor and maintain through the UI. Code is inherently better suited for restructuring, reuse, and long-term maintenance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Reduction of Manual Errors&lt;/STRONG&gt;&lt;BR /&gt;Maintaining logic in SQL and semantics in the UI creates duplication and inconsistency. A declarative schema in code would establish a &lt;STRONG&gt;single source of truth&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;• Developer Adoption and Productivity&lt;/STRONG&gt;&lt;BR /&gt;Many Datasphere users come from HANA, SQL, and data engineering backgrounds. A UI-only modeling approach creates friction and limits Datasphere’s adoption as a true enterprise-grade platform.&lt;/P&gt;&lt;P&gt;Importantly, &lt;STRONG&gt;Code-First does not exclude UI-First&lt;/STRONG&gt;.&lt;BR /&gt;Business users can continue to benefit from graphical modeling, while developers gain the flexibility to define everything in code — including structure, semantics, and output schema.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;If SAP Datasphere aims to position itself as a &lt;STRONG&gt;modern, developer-friendly data platform&lt;/STRONG&gt;, &lt;STRONG&gt;Code-First modeling is not a nice-to-have — it is a necessity&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;I strongly encourage SAP to consider this capability and to provide a clear roadmap in this direction.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2026 08:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datasphere-sql-views-as-sql-script-automatic-generation-of-columns-in/qaa-p/14316515#M4935929</guid>
      <dc:creator>anna_sch-25</dc:creator>
      <dc:date>2026-01-28T08:33:36Z</dc:date>
    </item>
  </channel>
</rss>

