hi <@U0667DNC02Y>, i use two code locations for tw...
# ask-ai
p
hi @Scout, i use two code locations for two different projects, and i want to see both in dagster. now i got one asset group which is exactly the same but the API call fetches data using a different api key. currenty dagster UI is not showing both assets for both code locations, even tho i changed the name to be unique. whats the issue here?
s
Based on the documentation, when you have assets defined in different code locations, it's important to ensure that each asset has a unique asset key to avoid collisions. The Dagster UI can show asset lineage that includes source assets, and if different asset definitions in different code locations have the same asset key as a
SourceAsset
and both code locations are loaded into the underlying webserver, the UI can represent the asset lineage across the code locations. This can be accomplished using workspace files. If you are encountering issues with the Dagster UI not showing both assets for both code locations, even though you have changed the name to be unique, there are a few things you might want to check: 1. Unique Asset Keys: Ensure that the asset keys are indeed unique across the code locations. Even if the names are unique, the underlying asset keys must also be unique. 2. Workspace Configuration: Verify that your workspace configuration is correctly set up to include both code locations. This typically involves setting up a
workspace.yaml
file that specifies the paths or Python packages where your code is located. 3. Asset Grouping: If you are using asset groups, remember that an asset can only belong to one asset group. If you have two assets with the same name but different API keys, you might need to place them in different asset groups to avoid confusion in the UI. 4. Code Location Loading: Check that both code locations are properly loaded by the Dagster instance. If there is an issue with loading one of the code locations, its assets will not appear in the UI. 5. Asset Dependencies: Ensure that asset dependencies are correctly defined. If an asset depends on another asset from a different code location, the dependency must be correctly specified using the asset keys. If you've checked all of the above and the issue persists, it might be a bug or a configuration issue that's not covered in the documentation. In such cases, it's helpful to look at the logs for any errors or warnings that might indicate what's going wrong. You can also consider reaching out to the Dagster community or filing an issue on the Dagster GitHub repository for further assistance.