<?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>topic Re: Fabric warehouse create table as in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3596987#M1445</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;you are right, I made this work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CREATE table [dbo].test AS
WITH x AS (SELECT n FROM (VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) v(n)),
date_basic as (
SELECT TOP (DATEDIFF(DAY, '1970-01-01', '2099-12-31') + 1)
        ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) - 1 AS N
FROM x ones, x tens, x hundreds, x thousands
ORDER BY 1),
dates as (
SELECT
    CAST(DATEADD(DAY, date_basic.N, '1970-01-01') AS DATE) AS date
FROM date_basic)
select * from dates&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2023 14:08:14 GMT</pubDate>
    <dc:creator>BiJoe</dc:creator>
    <dc:date>2023-12-21T14:08:14Z</dc:date>
    <item>
      <title>Fabric warehouse create table as</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3591362#M1421</link>
      <description>&lt;P&gt;I did not find a Warehouse category, so I'm asking here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a newly created Fabric Warehouse, I want to create a date dimension table from a query. I can't make the CREATE TABLE or INSERT INTO work. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;-- CREATE table [dbo].test AS
WITH date_basic AS (
    SELECT TOP (DATEDIFF(DAY, '1970-01-01', '2099-12-31') + 1)
        ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) - 1 AS N
    FROM sys.all_columns AS AC1
    CROSS JOIN sys.all_columns AS AC2
),
dates as (
SELECT
    CAST(DATEADD(DAY, date_basic.N, '1970-01-01') AS DATE) AS date_test
FROM date_basic)
select * from dates;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Without the create table line, the query works just fine. Commenting in create table leads to error message:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;EM&gt;The query references an object that is not supported in distributed processing mode.&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;EM&gt;Msg 15816, Level 16, State 4, CODE LINE 1&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have also tried creating table from stored procedure. What am I doing wrong?&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Dec 2023 13:34:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3591362#M1421</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2023-12-19T13:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric warehouse create table as</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3591447#M1422</link>
      <description>&lt;P&gt;I tried to add content by editing original post, but the editor wiped out all content due to "invalid HTML" &amp;gt;.&amp;lt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following results in "&lt;SPAN&gt;The query references an object that is not supported in distributed processing mode."&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;WITH date_basic AS (
    SELECT TOP (DATEDIFF(DAY, '1970-01-01', '2099-12-31') + 1)
        ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) - 1 AS N
    FROM sys.all_columns AS AC1
    CROSS JOIN sys.all_columns AS AC2
), 
dates as (
SELECT
    CAST(DATEADD(DAY, date_basic.N, '1970-01-01') AS DATE) AS date_test
FROM date_basic)

insert [dbo].test (date_test)

select * from dates
go&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 14:07:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3591447#M1422</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2023-12-19T14:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric warehouse create table as</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3593577#M1435</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="451446" data-lia-user-login="BiJoe" class="lia-mention lia-mention-user"&gt;BiJoe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;&lt;SPAN&gt;The error&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;The query references an object that is not supported in distributed processing mode&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;indicates that you've used an object or function that can't be used while you query data in Microsoft Fabric Warehouse.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Fabric Warehouse uses distributed processing for performance,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;but some objects and constructs aren't supported in this mode.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The error message indicates that your query references an unsupported object,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;likely&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class=""&gt;sys.all_columns&lt;/CODE&gt;&lt;SPAN&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You can refer to this link for more information: &lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/tsql-surface-area" target="_blank" rel="noopener"&gt;Link1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Please let me know if you have any further questions.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 10:51:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3593577#M1435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-20T10:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric warehouse create table as</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3596987#M1445</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;you are right, I made this work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CREATE table [dbo].test AS
WITH x AS (SELECT n FROM (VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) v(n)),
date_basic as (
SELECT TOP (DATEDIFF(DAY, '1970-01-01', '2099-12-31') + 1)
        ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) - 1 AS N
FROM x ones, x tens, x hundreds, x thousands
ORDER BY 1),
dates as (
SELECT
    CAST(DATEADD(DAY, date_basic.N, '1970-01-01') AS DATE) AS date
FROM date_basic)
select * from dates&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 14:08:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3596987#M1445</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2023-12-21T14:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric warehouse create table as</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3597262#M1446</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="451446" data-lia-user-login="BiJoe" class="lia-mention lia-mention-user"&gt;BiJoe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 16:05:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Fabric-warehouse-create-table-as/m-p/3597262#M1446</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-21T16:05:44Z</dc:date>
    </item>
  </channel>
</rss>

