Visual studio change automatically columns data type in a SSAS tabular project, how to disable this?

Dos Santos, MoisesX 1 Reputation point
2022-09-19T21:02:30.86+00:00

I have a SSAS tabular project well defined with proper data types in existing columns.
When adding a new column into the existing table Visual Studio changes automatically the data type for the existing columns.
I don't want this behavior because visual studio is guessing incorrectly the data types.
Is there any way to prevent this behavior?

Thanks in advance.

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,245 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,566 Reputation points
    2022-09-20T06:09:55.837+00:00

    Hi @Dos Santos, MoisesX
    Do you mean the model designer changes the Data Type of column that existed before when updating a column in Table?
    When you add data to a model, the model designer checks the columns of data to see what data types each column contains. Please make sure that the Data Type of the column in your Table is not Auto().
    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Dos Santos, MoisesX 1 Reputation point
    2022-09-20T14:03:40.98+00:00

    Hi Joy,
    I have a table with 5 columns and each column has its own data type set different than Auto().
    When I add later a new column to the table then visual studio changes the data type automatically for one or two existing columns.
    Ex:

    • Table1 is created with Column1 data type set to "text" automatically, I changed manually Column1 data type to "whole number".
    • Later I add Column2 to the same table and then visual studio automatically changes the data type for Column1 back to "text".
    0 comments No comments