Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query across multiple workspaces #220

Open
chinwobble opened this issue Sep 2, 2024 · 6 comments
Open

Query across multiple workspaces #220

chinwobble opened this issue Sep 2, 2024 · 6 comments

Comments

@chinwobble
Copy link

Hi there,

I want to know is it psosible to query across multiple workspaces?

My project has strict data privacy requirements.
I want to two workspaces.

  • raw data workspace where dynamic data masking is applied and users only have "Viewer" permissions
  • A prod data workspace that contains all the cleaned and transformed and data

I want my dbt project to read from raw data workspace and write to the prod workspace. Is that possible?

@M4Al
Copy link

M4Al commented Sep 2, 2024

In the current fabric implementation you cannot do this via the SQL Endpoints that DBT uses.

You could use the 'shortcut' feature of Fabric if your data lives in a Lakehouse maybe?

@chinwobble
Copy link
Author

@M4Al thanks for your response.
The 'shortcut' feature works with Fabric lakehouse.
Does that mean I can achieve this with the dbt-fabricpark dbt adapter instead?
https://github.com/microsoft/dbt-fabricspark

@ThomsenS
Copy link

ThomsenS commented Sep 3, 2024

You can access shortcuts in a lakehouse from your warehouse as long as they are in the same workspace using 3 part naming. In your query include the lakehouse name, e.g. select * from lakehouse_name.schema_name.shortcut_name.

We define them as sources in our projects. The source macro will then automatically create queries using 3 part naming.

version: 2

sources:
- name: source_name
  database: lakehouse_name
  schema: schema_name
  tables:
    - name: table_name/shortcut_name

@TheBishop-98
Copy link

If this capability isn't on the roadmap, it should be. My company has used the 'shortcut' method, but we shouldn't have to. We should be able to read across WS and still write to the same DW, if the user has access to those workspaces. I imagine we would have to define a fabric specific workspace property to further define and link to read those LH/DW.

@prdpsvs
Copy link
Collaborator

prdpsvs commented Sep 4, 2024

Shortcut capability is in the roadmap to the DW as well. Currently, the only way to access data from other workspace is to create a shortcut from LH or duplicate data.

With DW shortcut capability, the tables from other DW's in the same/across workspaces can be accessed in the same DW, similar to LH. Once this feature is enabled by the platform, the adapter will support shortcut sources from different workspaces.

@prdpsvs
Copy link
Collaborator

prdpsvs commented Sep 4, 2024

@M4Al thanks for your response. The 'shortcut' feature works with Fabric lakehouse. Does that mean I can achieve this with the dbt-fabricpark dbt adapter instead? https://github.com/microsoft/dbt-fabricspark

Yes, dbt-fabricspark creates shortcuts for you to access data from other LHs in the same or different workspaces and then access data. This is not currently possible with DW though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants