Ask AI

PostgreSQL (dagster-postgres)

dagster_postgres.PostgresEventLogStorage = <class 'dagster_postgres.event_log.event_log.PostgresEventLogStorage'>[source]

Config Schema:
postgres_url (dagster.StringSource, optional):

postgres_db (strict dict, optional):
Config Schema:
username (dagster.StringSource):

password (dagster.StringSource):

hostname (dagster.StringSource):

db_name (dagster.StringSource):

port (dagster.IntSource, optional):

Default Value: 5432

params (permissive dict, optional):
Default Value:
{}
scheme (dagster.StringSource, optional):

Default Value: ‘postgresql’

should_autocreate_tables (Bool, optional):

Default Value: True

Postgres-backed event log storage.

Users should not directly instantiate this class; it is instantiated by internal machinery when dagster-webserver and dagster-graphql load, based on the values in the dagster.yaml file in $DAGSTER_HOME. Configuration of this class should be done by setting values in that file.

To use Postgres for all of the components of your instance storage, you can add the following block to your dagster.yaml:

dagster.yaml
storage:
  postgres:
    postgres_db:
      username: my_username
      password: my_password
      hostname: my_hostname
      db_name: my_database
      port: 5432

If you are configuring the different storage components separately and are specifically configuring your event log storage to use Postgres, you can add a block such as the following to your dagster.yaml:

dagster.yaml
event_log_storage:
  module: dagster_postgres.event_log
  class: PostgresEventLogStorage
  config:
    postgres_db:
      username: { username }
      password: { password }
      hostname: { hostname }
      db_name: { db_name }
      port: { port }

Note that the fields in this config are StringSource and IntSource and can be configured from environment variables.

dagster_postgres.PostgresRunStorage = <class 'dagster_postgres.run_storage.run_storage.PostgresRunStorage'>[source]

Config Schema:
postgres_url (dagster.StringSource, optional):

postgres_db (strict dict, optional):
Config Schema:
username (dagster.StringSource):

password (dagster.StringSource):

hostname (dagster.StringSource):

db_name (dagster.StringSource):

port (dagster.IntSource, optional):

Default Value: 5432

params (permissive dict, optional):
Default Value:
{}
scheme (dagster.StringSource, optional):

Default Value: ‘postgresql’

should_autocreate_tables (Bool, optional):

Default Value: True

Postgres-backed run storage.

Users should not directly instantiate this class; it is instantiated by internal machinery when dagster-webserver and dagster-graphql load, based on the values in the dagster.yaml file in $DAGSTER_HOME. Configuration of this class should be done by setting values in that file.

To use Postgres for all of the components of your instance storage, you can add the following block to your dagster.yaml:

dagster.yaml
storage:
  postgres:
    postgres_db:
      username: my_username
      password: my_password
      hostname: my_hostname
      db_name: my_database
      port: 5432

If you are configuring the different storage components separately and are specifically configuring your run storage to use Postgres, you can add a block such as the following to your dagster.yaml:

dagster.yaml
run_storage:
  module: dagster_postgres.run_storage
  class: PostgresRunStorage
  config:
    postgres_db:
      username: { username }
      password: { password }
      hostname: { hostname }
      db_name: { db_name }
      port: { port }

Note that the fields in this config are StringSource and IntSource and can be configured from environment variables.

dagster_postgres.PostgresScheduleStorage = <class 'dagster_postgres.schedule_storage.schedule_storage.PostgresScheduleStorage'>[source]

Config Schema:
postgres_url (dagster.StringSource, optional):

postgres_db (strict dict, optional):
Config Schema:
username (dagster.StringSource):

password (dagster.StringSource):

hostname (dagster.StringSource):

db_name (dagster.StringSource):

port (dagster.IntSource, optional):

Default Value: 5432

params (permissive dict, optional):
Default Value:
{}
scheme (dagster.StringSource, optional):

Default Value: ‘postgresql’

should_autocreate_tables (Bool, optional):

Default Value: True

Postgres-backed run storage.

Users should not directly instantiate this class; it is instantiated by internal machinery when dagster-webserver and dagster-graphql load, based on the values in the dagster.yaml file in $DAGSTER_HOME. Configuration of this class should be done by setting values in that file.

To use Postgres for all of the components of your instance storage, you can add the following block to your dagster.yaml:

dagster.yaml
storage:
  postgres:
    postgres_db:
      username: my_username
      password: my_password
      hostname: my_hostname
      db_name: my_database
      port: 5432

If you are configuring the different storage components separately and are specifically configuring your schedule storage to use Postgres, you can add a block such as the following to your dagster.yaml:

dagster.yaml
schedule_storage:
  module: dagster_postgres.schedule_storage
  class: PostgresScheduleStorage
  config:
    postgres_db:
      username: { username }
      password: { password }
      hostname: { hostname }
      db_name: { db_name }
      port: { port }

Note that the fields in this config are StringSource and IntSource and can be configured from environment variables.