Skip to Content

Unable to activate a table

Hi All,

I am getting the Parse error for table definition when I try to activate the database table. Here is the full error text: "Repository: CheckObjects failed for at least one object; Parse error for table definition: Syntax error: Extension are only allowed with the list itself.; row: 5 column: 0"

Here is the code that I have.....

table.schemaName = "cs_first";

table.tableType = COLUMNSTORE;

table.description = "Workshop order Header";

table.columns = {

{ name = "OrderId"; sqlType = NVARCHAR; nullable = false; length = 10; },

{ name = "CreatedBy"; sqlType = NVARCHAR; nullable = false; length = 10; },

{ name = "CreatedAt"; sqlType = DATE; nullable = false; },

{ name = "Currency"; sqlType = NVARCHAR; nullable = false; length = 5; },

{ name = "GrossAmount"; sqlType = DECIMAL; nullable = false; precision = 15; scale = 2; defaultValue = "0"; },

};

table.primarykey.pkcolumns = ["OrderId"];

Thank you in advance,

Chandra

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 09, 2015 at 05:26 AM

    Hello Chandra,

    there are several errors in your file:

    • the list of table.columns has to be enclosed in square brackets, not in curly brackets
    • the comma after the last column (GrossAmount) is not right
    • table.primarkey is not right, it is called table.primaryKey

    Here is the corrected syntax:

    table.schemaName = "cs_first";
    table.tableType = COLUMNSTORE;
    table.description = "Workshop order Header";
    table.columns = [
    { name = "OrderId"; sqlType = NVARCHAR; nullable = false; length = 10;   },
    { name = "CreatedBy"; sqlType = NVARCHAR; nullable = false; length = 10; },
    { name = "CreatedAt"; sqlType = DATE; nullable = false;                  },
    { name = "Currency"; sqlType = NVARCHAR; nullable = false; length = 5;   },
    { name = "GrossAmount"; sqlType = DECIMAL; nullable = false; precision = 15; scale = 2; defaultValue = "0";  }
    ];
    table.primaryKey.pkcolumns = ["OrderId"];
    
    
    

    Please check also if your schema "cs_first" is really written in lower case.

    Best Regards,

    Florian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 09, 2015 at 05:14 AM

    Hi Chandra for the Amount value try Default value 0.00

    Regards

    Arden

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.