How can I successfully start the apache airflow db

66 views Asked by At

I have been trying to install the apache airflow on my machine using the pip installation command. I successfully installed the airflow in a virtual environment. When I tried running the "airflow standalone" or "airflow db migrate" it keeps giving me an error saying

  File "/usr/local/bin/airflow", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/airflow/__main__.py", line 57, in main
    args.func(args)
  File "/usr/local/lib/python3.10/site-packages/airflow/cli/cli_config.py", line 49, in command
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/airflow/cli/commands/standalone_command.py", line 53, in entrypoint
    StandaloneCommand().run()
  File "/usr/local/lib/python3.10/site-packages/airflow/utils/providers_configuration_loader.py", line 54, in wrapped_function
    ProvidersManager().initialize_providers_configuration()
  File "/usr/local/lib/python3.10/site-packages/airflow/providers_manager.py", line 376, in wrapped_function
    func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/airflow/providers_manager.py", line 555, in initialize_providers_configuration
    self._initialize_providers_configuration()
  File "/usr/local/lib/python3.10/site-packages/airflow/providers_manager.py", line 568, in _initialize_providers_configuration
    self.initialize_providers_list()
  File "/usr/local/lib/python3.10/site-packages/airflow/providers_manager.py", line 376, in wrapped_function
    func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/airflow/providers_manager.py", line 483, in initialize_providers_list
    self._discover_all_providers_from_packages()
  File "/usr/local/lib/python3.10/site-packages/airflow/providers_manager.py", line 604, in _discover_all_providers_from_packages
    self._provider_schema_validator.validate(provider_info)
  File "/usr/local/lib/python3.10/site-packages/jsonschema/validators.py", line 435, in validate
    raise error
jsonschema.exceptions.ValidationError: Additional properties are not allowed ('class-names' was unexpected)

Failed validating 'additionalProperties' in schema['properties']['triggers']['items']:
    {'additionalProperties': False,
     'properties': {'integration-name': {'description': 'Integration name. '
                                                        'It must have a '
                                                        'matching item in '
                                                        "the 'integration' "
                                                        'section of any '
                                                        'provider.',
                                         'type': 'string'},
                    'python-modules': {'description': 'List of Python '
                                                      'modules containing '
                                                      'the triggers.',
                                       'items': {'type': 'string'},
                                       'type': 'array'}},
     'required': ['integration-name', 'python-modules'],
     'type': 'object'}

On instance['triggers'][0]:
    {'class-names': ['airflow.providers.google.cloud.triggers.bigquery_dts.BigQueryDataTransferRunTrigger'],
     'integration-name': 'Google BigQuery Data Transfer Service'}

I tried running the airflow using "airflow standalone" expecting the airflow to start u, but I'm having errors.

1

There are 1 answers

0
Stsh4lson On

This is a late response but it is some problem with apache-airflow-providers-google.

If you are running airflow locally, not in Google Cloud, your best bet is to just remove this integration with pip uninstall apache-airflow-providers-google. Otherwise, update it, it works fine with the newest version with pip install --upgrade apache-airflow-providers-google.