Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hi,
I've tried to create a primary key for a warehouse table, using this documented sintax, respect two columns:
ALTER TABLE PrimaryKeyTable ADD CONSTRAINT PK_PrimaryKeyTable PRIMARY KEY NONCLUSTERED (c1) NOT ENFORCED;
The query editor underlines in red the ENFORCED keyword. Why?
Moreover, after executing the ALTER TABLE statement I cannot see any primary keys in a visual mode (f.e. by a particular icon): this represents a serious lack for an user.
Any helps to me, please? Thanks
Solved! Go to Solution.
Hi @pmscorca ,
I got a confirmation from internal team that for time being, you can ignore the red unline under ENFORCED keyword. You will be able to execute the query without any issue.
Coming to your second question, at present we don't have any icon notation for primary keys.
However, your suggestion is definitely valuable! We use customer feedback like yours to prioritize future features. The more users who request the ability to customize backgrounds, the higher it moves on our list.
Appreciate if you could share the feedback on our Microsoft Fabric Ideas. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.
I hope this information helps. If you have any further queries please do let us know.
Thanks
I have created primary key on table but looks like it’s not supporting in Fabric warehouse. I have followed fabric documentation while creating primary and foreign key but duplicate records get inserted again and again. Below script used and test.
create table config.test
(c1 int not null ,
c1name varchar(20))
ALTER TABLE config.test ADD CONSTRAINT pk_test
PRIMARY KEY NONCLUSTERED (c1) NOT ENFORCED;
insert into config.test values (1,’test’) --- inserted same records multiple times.
Documentation link:
Primary, foreign, and unique keys - Microsoft Fabric | Microsoft Learn
Hi @pmscorca ,
Thanks for using Fabric Community.
At this time, we are reaching out to the internal team to get some help on this .
We will update you once we hear back from them.
Hi @pmscorca ,
I got a confirmation from internal team that for time being, you can ignore the red unline under ENFORCED keyword. You will be able to execute the query without any issue.
Coming to your second question, at present we don't have any icon notation for primary keys.
However, your suggestion is definitely valuable! We use customer feedback like yours to prioritize future features. The more users who request the ability to customize backgrounds, the higher it moves on our list.
Appreciate if you could share the feedback on our Microsoft Fabric Ideas. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.
I hope this information helps. If you have any further queries please do let us know.
Thanks
Hi, I can see the created primary key using SQL Server Management Studio, a client tool that doesn't represent an integrated experience.
Moreover, when I open the Visual Query Builder I can see the created primary key yet.
In the Data warehouse explorer the primary keys aren't visible; this explorer represents an immediate experience that shows the data types and not the primary keys.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
5 | |
3 | |
3 | |
2 | |
2 |