Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to activate a table

former_member226239
Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

pfefferf
Active Contributor
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Hi Chandra for the Amount value try Default value 0.00

Regards

Arden

0 Kudos

No use, same error.

0 Kudos

Should there be a final comma after the last column you've entered?

pfefferf
Active Contributor
0 Kudos

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