0

What I am trying to achieve is to add tables and columns descriptions programmatically to a Power BI dataset.

For this reason, I use Server Analysis Services to get access to the metadata. I run a simple request:

select *
from $System.TMSCHEMA_PARTITIONS

As a result, I get a table with columns names:

  1. ID
  2. TableID
  3. Name
  4. Description
  5. ....

Now I want to select where the "Description" is empty.

select *
from $System.TMSCHEMA_PARTITIONS 
where Description IS NULL

But I can't, I always get a syntax error:

Query (3, 7) The syntax for 'Description' is incorrect.

SQL reads it as a command and I don't know how to avoid it. I have tried adding quotes and double quotes to the name of the columns, I tried adding a table reference and all of these combined, but nothing helps.

It works for "TableID" for example.

Oleg Kazanskyi
  • 196
  • 2
  • 13

1 Answers1

1

This one works:

select *
from $System.TMSCHEMA_PARTITIONS 
where len([Description]) = 0
Oleg Kazanskyi
  • 196
  • 2
  • 13