Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JuanMahecha
Helper I
Helper I

Urgent question about Policy update

Hi, I'm trying to implement the medallion architecture in RT, so I was thinking I'd have one KQL DB for bronze, one for silver, and one for gold.

The question is how I can adjust the update policy to bring the bronze transformed data to the silver table that is in its own DB.

Currently it did so as follows:
 
.alter table SilverDataSensores policy update
@'[{"IsEnabled": true, "Source": "Bronce2DataSensores", "Query": "UpdateGoldTable()", "IsTransactional": true}]'
 
So as I mention I want to have a different KQL DB for each layer, how can I reference that SilverDataSensors is in another DB, or in its defense that Soruce and Query are from the bronze DB?
 
Thanks 😄
2 ACCEPTED SOLUTIONS
datacoffee
Super User
Super User

Hi again

 

You can surely read from a different database. if you want to write to a different database, then it is not pissible unless you use an Eventstream or a pipeline.
The KQL functions are built to work locally and with ability to read remote.

I hope you find a solution

 


If you find this reply to help with your problem, please consider hitting the accept button...
----------------
Blog: https://dcode.bi
KQL ref guide: https://aka.bi/kql
LinkedIn: https://aka.bi/follow

View solution in original post

svelde
Advocate II
Advocate II

Hello @JuanMahecha ,

 

For table update policies, check the Azure Data Explorer documentation.

Check the note:

 

The source and target table must be in the same database.

 

But, if we check this documentation it says:

 

The update policy must be configured with a managed identity in the following scenario: When the update policy query references tables in other databases

 

As seen here, using a Managed Identity or a User Identity, the function can read changed in another source database to forward rows in a table living in the same database as the target table lives in.

 

 

View solution in original post

4 REPLIES 4
svelde
Advocate II
Advocate II

Hello @JuanMahecha ,

 

For table update policies, check the Azure Data Explorer documentation.

Check the note:

 

The source and target table must be in the same database.

 

But, if we check this documentation it says:

 

The update policy must be configured with a managed identity in the following scenario: When the update policy query references tables in other databases

 

As seen here, using a Managed Identity or a User Identity, the function can read changed in another source database to forward rows in a table living in the same database as the target table lives in.

 

 

datacoffee
Super User
Super User

Hi again

 

You can surely read from a different database. if you want to write to a different database, then it is not pissible unless you use an Eventstream or a pipeline.
The KQL functions are built to work locally and with ability to read remote.

I hope you find a solution

 


If you find this reply to help with your problem, please consider hitting the accept button...
----------------
Blog: https://dcode.bi
KQL ref guide: https://aka.bi/kql
LinkedIn: https://aka.bi/follow
datacoffee
Super User
Super User

Hi

 

you can alter/create the fundction you are using for the update policy to use cross database query.

 

there is a guide on learn right here

https://learn.microsoft.com/en-us/kusto/query/cross-cluster-or-database-queries?view=microsoft-fabri...

 

😊


If you find this reply to help with your problem, please consider hitting the accept button...
----------------
Blog: https://dcode.bi
KQL ref guide: https://aka.bi/kql
LinkedIn: https://aka.bi/follow

Específicamente quiero que la tabla de destino esté en una base de datos y la tabla de origen esté en otra, esto para no tener en la misma base de datos una mezcla de tablas de bronce y otras en oro, pero leyendo la documentación menciona que esto no es posible, por lo que no se me ocurre qué hacer.
I'm trying to make the policy from the gold queryset, taking the source table as a table that receives data at the same time as the bronze table so that it works as a trigger nothing more, in the transform function I try to call the bronze table like this(database("TestDB"). Bronze2DataSensors), the only thing is that it asks me to configure the policy with managed identity and I'm looking at how to do it and thus test if this works

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

Check out the July 2025 Fabric update to learn about new features.

July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors