Search code examples
azureazure-data-explorerkqladx

ADX: Update policy cross database


Is it possible to create an update policy across databases? I mean like table_1 in db_1 should send data via update policy to table_2 in db_2.

If not, why does it not work?

And: What about functions? Can i select data across dbs?


Solution

  • Is it possible to create an update policy across databases?

    as mentioned in the documentation, this is not currently supported:

    The policy-related query can invoke stored functions, but can't access data external to the database. specifically:

    • It can't perform cross-database queries
    • It can't perform cross-cluster queries ...

    If not, why does it not work?

    this is currently blocked due to security considerations. it may be supported in the future using managed identities.

    What about functions? Can i select data across dbs?

    stored functions are allowed to include cross-database references.

    for example:

    .create function MyFunction() {
        database("MyOtherDatabase").MyTable
        | summarize max(Timestamp)
    }