The morph_project.yml file is a configuration file used when running the Morph framework. When you create a Morph project using the morph new command, a file with default values is automatically generated.

# Profile Section in `~/.morph/credentials`
profile: default

# Project ID
project_id: xxxxxx-xxxxx-xxxx-xxxxx

# Connection
default_connection: DUCKDB

# Source Directory
source_paths:
- src

# Result Cache (seconds)
result_cache_ttl: 0

# Python Package Manager
package_manager: pip

Parameters

profile
string
default:
"default"

Specifies the profile to be used. Selects which profile from ~/.morph/credentials configured using the morph config command should be utilized.

project_id
string
default:
"null"

Specifies the ID of the project created in the Morph cloud. This is mandatory when using cloud connectors or performing deployments.

You can retrieve the project ID from the individual project page on the Morph cloud.

default_connection
string
default:
"DUCKDB"

Sets the default database connection. If no connection is explicitly defined in the config function of an SQL file, this default connection will be used.

Reserved Words

The following reserved words can be used without defining a connection:

  • DUCKDB: DuckDB is used as the database engine.
  • MORPH_BUILTIN_DB: Morph’s built-in PostgreSQL database engine is used.

To configure a custom connection, set the connection name in the config function, consistent with this setting.

source_paths
string
default:
"src"

Specifies the directories to be used as source paths. Files within these directories are recognized as executable source code in Morph.

result_cache_ttl
integer
default:
"0"

Defines the cache expiration time in seconds for data pipeline execution results. If results are available within the specified duration, they will be retrieved from the cache. Setting result_cache_ttl: 0 disables caching. This parameter affects the results cached during the execution of the morph serve command.

package_manager
string
default:
"pip"

Specifies the Python package manager to be used in the project. When creating a project with the morph new command, the selected package manager (either pip or poetry) will be set in this parameter.

Available options:

  • pip
  • poetry