https://dagster.io/ logo
#ask-ai
Title
# ask-ai
s

Selim Raboudi

02/23/2024, 4:06 PM
@Scout can I specify a name for my workspace that is different from the package name ? (in workspace.yaml)
s

Scout

02/23/2024, 4:06 PM
In the context of Dagster's
workspace.yaml
, the purpose of the file is to specify how to load repositories and code locations, not to assign a "name" to the workspace itself. The
workspace.yaml
file allows you to define code locations using various keys such as
python_file
,
python_module
, and
python_package
, among others. You can also specify an
executable_path
to indicate which Python environment should be used to load each code location. The
location_name
key within a code location entry in
workspace.yaml
is used to give a unique name to that code location, which is displayed in the UI and used to disambiguate definitions with the same name across multiple code locations. However, this is not the same as naming the workspace itself. For example, a
workspace.yaml
entry using a
python_package
might look like this:
Copy code
yaml load_from:   - python_package:       executable_path: "/path/to/venvs/dagster-dev-3.7.6/bin/python"       package_name: dagster_examples       location_name: dagster_examples
In this example,
dagster_examples
is the name of the Python package being loaded, and
location_name
is used to name the code location within the workspace. The
workspace.yaml
file does not provide a direct way to assign a distinct "name" to the workspace as a whole; it is primarily concerned with how to load the repositories within it. If you are looking to customize the display or identification of your Dagster instance in some way, such as through the UI, this would not typically be done through the
workspace.yaml
file. The documentation does not provide a method for naming the workspace differently from the package or module names used to load code locations.
2 Views