Developer forum

Forum » CMS - Standard features » CREATE TABLE in firehose - Something went wrong

CREATE TABLE in firehose - Something went wrong

Kim Søjborg Pedersen
Reply

Hi 

Its a DW10 cloud hosted solution and i need to create some tables, is firehose the way to go?

It fails with "Something went wrong" when trying to do a create table


Replies

 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply

Hi Kim,

I think it is the way to go, but I am not sure what agreements you have with your cloud solution (I am just a developer) :)

Maybe your syntax is wrong, or the table already exists?

I have no problem creating tables via the Firehose by doing this:

CREATE TABLE MSS_TEST (
    [Id] [int] IDENTITY(1,1) NOT NULL,
[Column1] [int] NULL,
[Column2] [nvarchar](255) NULL,
);
BR
Matthias Sort
 
Kim Søjborg Pedersen
Reply

Hi

I can create your table to, but not this. It works in MSSMS so maybe dw firehose has some limitations

CREATE TABLE SalesOrders123 (
    Id NVARCHAR(50),
    Number NVARCHAR(MAX),
    ExternalDocumentNumber NVARCHAR(MAX),
    OrderDate DATE,
    PostingDate DATE,
    CustomerId NVARCHAR(50),
    CustomerNumber NVARCHAR(MAX),
    CustomerName NVARCHAR(MAX),
    BillToName NVARCHAR(MAX),
    BillToCustomerId NVARCHAR(50),
    BillToCustomerNumber NVARCHAR(MAX),
    ShipToName NVARCHAR(MAX),
    ShipToContact NVARCHAR(MAX),
    SellToAddressLine1 NVARCHAR(MAX),
    SellToAddressLine2 NVARCHAR(MAX),
    SellToCity NVARCHAR(MAX),
    SellToCountry NVARCHAR(MAX),
    SellToState NVARCHAR(MAX),
    SellToPostCode NVARCHAR(MAX),
    BillToAddressLine1 NVARCHAR(MAX),
    BillToAddressLine2 NVARCHAR(MAX),
    BillToCity NVARCHAR(MAX),
    BillToCountry NVARCHAR(MAX),
    BillToState NVARCHAR(MAX),
    BillToPostCode NVARCHAR(MAX),
    ShipToAddressLine1 NVARCHAR(MAX),
    ShipToAddressLine2 NVARCHAR(MAX),
    ShipToCity NVARCHAR(MAX),
    ShipToCountry NVARCHAR(MAX),
    ShipToState NVARCHAR(MAX),
    ShipToPostCode NVARCHAR(MAX),
    ShortcutDimension1Code NVARCHAR(MAX),
    ShortcutDimension2Code NVARCHAR(MAX),
    CurrencyId NVARCHAR(50),
    CurrencyCode NVARCHAR(MAX),
    PricesIncludeTax BIT,
    PaymentTermsId NVARCHAR(50),
    ShipmentMethodId NVARCHAR(50),
    Salesperson NVARCHAR(MAX),
    PartialShipping BIT,
    RequestedDeliveryDate DATE,
    DiscountAmount FLOAT,
    DiscountAppliedBeforeTax BIT,
    TotalAmountExcludingTax FLOAT,
    TotalTaxAmount FLOAT,
    TotalAmountIncludingTax FLOAT,
    FullyShipped BIT,
    Status NVARCHAR(MAX),
    LastModifiedDateTime DATETIME,
    PhoneNumber NVARCHAR(MAX),
    Email NVARCHAR(MAX)
);

 

Screenshot_2025-06-26_085511.png
 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply

Hi

Yeah i get the same error, when trying with your table.

I've tried to remove some columns from your table, and was able to create it with this many columns:

CREATE TABLE _SalesOrders123 (
    Id NVARCHAR(50),
    Number NVARCHAR(MAX),
    ExternalDocumentNumber NVARCHAR(MAX),
    OrderDate DATE,
    PostingDate DATE,
    SellToCountry NVARCHAR(MAX),
    SellToState NVARCHAR(MAX),
    SellToPostCode NVARCHAR(MAX),
    BillToAddressLine1 NVARCHAR(MAX),
    BillToAddressLine2 NVARCHAR(MAX),
    BillToCity NVARCHAR(MAX),
    BillToCountry NVARCHAR(MAX),
    BillToState NVARCHAR(MAX),
    BillToPostCode NVARCHAR(MAX),
    ShipToAddressLine1 NVARCHAR(MAX),
    ShipToAddressLine2 NVARCHAR(MAX),
    ShipToCity NVARCHAR(MAX),
    ShipToCountry NVARCHAR(MAX),
    ShipToState NVARCHAR(MAX),
    ShipToPostCode NVARCHAR(MAX),
    ShortcutDimension1Code NVARCHAR(MAX),
    ShortcutDimension2Code NVARCHAR(MAX),
    CurrencyId NVARCHAR(50),
    CurrencyCode NVARCHAR(MAX),
    PricesIncludeTax BIT,
    PaymentTermsId NVARCHAR(50),
    ShipmentMethodId NVARCHAR(50),
    Salesperson NVARCHAR(MAX),
    PartialShipping BIT,
    RequestedDeliveryDate DATE,
    DiscountAmount FLOAT,
    DiscountAppliedBeforeTax BIT,
    TotalAmountExcludingTax FLOAT,
    TotalTaxAmount FLOAT,
    TotalAmountIncludingTax FLOAT,
    FullyShipped BIT,
    Status NVARCHAR(MAX),
    LastModifiedDateTime DATETIME,
    PhoneNumber NVARCHAR(MAX),
    Email NVARCHAR(MAX)
);
 
Yeah the columns looks funny in the navigation-tree to the left, so I will try and debug the limit and why the tree are not showing the correct stuff.
you'll hear from me again soon :)
 
 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply

Hi Kim,

When I tried to do it locally, I had no problems creating your table, I've tried version 10.18 (our master branch), but when I did it on a released testsite (also a 10.18 version) then I was able to reproduce it, as I wrote before.

I've spoken with my tech-lead, his idea is that the IIS has some limits for both your cloud-solution and the testsite I've testet on.

A solution for now could be that you create the table partially, then do an alter table to add the last columns should loke like this (2 different "Fire")

CREATE TABLE SalesOrders123 (
    Id NVARCHAR(50),
    Number NVARCHAR(MAX),
    ExternalDocumentNumber NVARCHAR(MAX),
    OrderDate DATE,
    PostingDate DATE,
    CustomerId NVARCHAR(50),
    CustomerNumber NVARCHAR(MAX),
    CustomerName NVARCHAR(MAX),
    BillToName NVARCHAR(MAX),
    BillToCustomerId NVARCHAR(50),
    BillToCustomerNumber NVARCHAR(MAX),
    ShipToName NVARCHAR(MAX),
    ShipToContact NVARCHAR(MAX),
    SellToAddressLine1 NVARCHAR(MAX),
    SellToAddressLine2 NVARCHAR(MAX),
    SellToCity NVARCHAR(MAX),
    SellToCountry NVARCHAR(MAX),
    SellToState NVARCHAR(MAX),
    SellToPostCode NVARCHAR(MAX),
    BillToAddressLine1 NVARCHAR(MAX),
    BillToAddressLine2 NVARCHAR(MAX),
    BillToCity NVARCHAR(MAX),
    BillToCountry NVARCHAR(MAX),
    BillToState NVARCHAR(MAX),
    BillToPostCode NVARCHAR(MAX),
    ShipToAddressLine1 NVARCHAR(MAX),
    ShipToAddressLine2 NVARCHAR(MAX),
    ShipToCity NVARCHAR(MAX),
    ShipToCountry NVARCHAR(MAX),
    ShipToState NVARCHAR(MAX),
    ShipToPostCode NVARCHAR(MAX),
    ShortcutDimension1Code NVARCHAR(MAX),
    ShortcutDimension2Code NVARCHAR(MAX),
    CurrencyId NVARCHAR(50),
    CurrencyCode NVARCHAR(MAX),
    PricesIncludeTax BIT,
    PaymentTermsId NVARCHAR(50),
    ShipmentMethodId NVARCHAR(50),
    Salesperson NVARCHAR(MAX)
);

 

ALTER TABLE SalesOrders123 
ADD PartialShipping BIT,
    RequestedDeliveryDate DATE,
    DiscountAmount FLOAT,
    DiscountAppliedBeforeTax BIT,
    TotalAmountExcludingTax FLOAT,
    TotalTaxAmount FLOAT,
    TotalAmountIncludingTax FLOAT,
    FullyShipped BIT,
    Status NVARCHAR(MAX),
    LastModifiedDateTime DATETIME,
    PhoneNumber NVARCHAR(MAX),
    Email NVARCHAR(MAX);

My tech-lead did say that we do have the Firehose in the spotlight, about this matter, but not sure when this will be fixed, so I hope this solution/work-around can help you for now.

BR

Matthias Sort

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

If the solution is an upgrade, it can be a database level is set too low. Ensure it is set to 150.

You can run this SQL to test it: SELECT compatibility_level FROM sys.databases WHERE name=DB_NAME()

Next release of Dynamicweb 10 has this as a general health check in insights.

 
Kim Søjborg Pedersen
Reply

It works to divide them into 2, so that's how I'll proceed.

 

You must be logged in to post in the forum