Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

How to: Add Table with Tabular Editor with ObjectType "Dual" and Source "M"

Hi all, 

 

I started to work with tabular editor and if I open one of our existing Power BI Models the table properties are set like this: 

TableSettings

The partition properties look like this: 

PartitionSettings

Now I have the need to rebuild such a configuration from scratch. So I did the following scripting in a new created model with tabular editor 2: 

Model.AddTable("Test2").AddMPartition();

 The partition created looks fine after changing the mode to "dual" manually:

PartitionFromScratch

But the table does not have the intended properties and I can not change them manually:

TableFromScratch

This seems to happen because a standard partition is also created from the script. After deleting this second partition it also looks good. 

 

Now my questions: 

How can I code the script in a way, that my properties will be set in the right way from scratch?

I did some investigation on TOM and Tabular Editor 2. And tried some syntax. But it did not worked out.

Maybe someone can show me the link to the Appendix A mentioned here:  Advanced Scripting | Tabular Editor Documentation

and give me some hints, how the syntax is working. I even do not find out how to delete the automatically created - but not needed - default partition using a script. 

 

Best regards

Thias

 

2 Replies