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

Sources undefined using dagster-powerbi with MotherDuck upstream tables #26547

Open
cmpadden opened this issue Dec 17, 2024 · 0 comments
Open
Assignees
Labels
type: bug Something isn't working

Comments

@cmpadden
Copy link
Contributor

What's the issue?

Sources on PowerBIContentData are undefined, making it so that asset mapping does not occur between dbt models and Power BI semantic models.

data.properties.get("sources", []). # <-- EMPTY

However, table names can be determines through data.properties.get("tables"), and a workaround for specifying deps can be done like so:

    def get_semantic_model_spec(self, data: PowerBIContentData) -> dg.AssetSpec:
        upsteam_table_deps = [
            dg.AssetKey(table.get("name")) for table in data.properties.get("tables", [])
        ]
        return (
            super()
            .get_semantic_model_spec(data)
            .replace_attributes(
                group_name="reporting",
                description=f"Semantic model URL: {_construct_semantic_model_url(data.properties['id'])}",
                deps=upsteam_table_deps,
            )
        )

Initially, it was thought that this was due to legacy vs. scan APIs, however, setting use_workspace_scan=False, on the translator still results in no sources.

What did you expect to happen?

Sources are automatically set to the upstream tables of the semantic model.

How to reproduce?

See the full end-to-end example project that is being created in this pull request.

#26038

This is using the internal Azure environment, please DM me for access if you would like to test further.

Dagster version

dagster, version 1!0+dev

Deployment type

None

Deployment details

No response

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
By submitting this issue, you agree to follow Dagster's Code of Conduct.

@cmpadden cmpadden added the type: bug Something isn't working label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants