Skip to content

Instantly share code, notes, and snippets.

@jimathyp
Last active September 27, 2022 21:23
Show Gist options
  • Save jimathyp/a804ea416d6aa698067c75b45c4c2eaa to your computer and use it in GitHub Desktop.
Save jimathyp/a804ea416d6aa698067c75b45c4c2eaa to your computer and use it in GitHub Desktop.

Running Airflow locally

sqlite No such table job

sqlite3.OperationalError: no such table: job

[SQL: INSERT INTO job (dag_id, state, job_type, start_date, end_date, latest_heartbeat, executor_class, hostname, unixname) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)]
[parameters: (None, <TaskInstanceState.RUNNING: 'running'>, 'SchedulerJob', '2022-09-27 21:11:16.907255', None, '2022-09-27 21:11:16.907265', 'SequentialExecutor', 'XXXXXX', 'XXXX')]
  • Bizarre, because it had been running minutes before.
  • Had just changed PYTHONPATH to add a local package
  • ran airflow db init
  • now complaining of airflow.cfg issue (had a comment after a value - but this has been like this for days)
  • removed in line comment - moved to new line
  • airflow db init works this time

Possibly AIRFLOW_HOME was unset or pointing elsewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment