Code Monkey home page Code Monkey logo

Comments (3)

phanikumv avatar phanikumv commented on May 29, 2024

This is now implemented as part of the unit test for the serialization method for each of the async trigger.
Refer to a sample implementationn below for the snowflake trigger.

def test_snowflake_trigger_serialization():
"""
Asserts that the SnowflakeTrigger correctly serializes its arguments
and classpath.
"""
trigger = SnowflakeTrigger(
task_id=TASK_ID,
polling_period_seconds=POLLING_PERIOD_SECONDS,
query_ids=[],
snowflake_conn_id="test_conn",
)
classpath, kwargs = trigger.serialize()
assert classpath == "astronomer_operators.snowflake.triggers.snowflake_trigger.SnowflakeTrigger"
assert kwargs == {
"task_id": TASK_ID,
"polling_period_seconds": 1.0,
"query_ids": [],
"snowflake_conn_id": "test_conn",
}

from astronomer-providers.

rajaths010494 avatar rajaths010494 commented on May 29, 2024

Traceback (most recent call last):

File "/usr/local/lib/python3.9/site-packages/***/utils/module_loading.py", line 35, in import_string
return getattr(module, class_name)

AttributeError: module 'astronomer.providers.microsoft.azure.triggers.data_factory' has no attribute 'WasbToSynpaseTrigger'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/lib/python3.9/site-packages/***/jobs/triggerer_job.py", line 406, in update_triggers
trigger_class = self.get_trigger_by_classpath(new_triggers[new_id].classpath)

File "/usr/local/lib/python3.9/site-packages/***/jobs/triggerer_job.py", line 423, in get_trigger_by_classpath
self.trigger_cache[classpath] = import_string(classpath)

File "/usr/local/lib/python3.9/site-packages/***/utils/module_loading.py", line 37, in import_string
raise ImportError(f'Module "{module_path}" does not define a "{class_name}" attribute/class')

ImportError: Module "astronomer.providers.microsoft.azure.triggers.data_factory" does not define a "WasbToSynpaseTrigger" attribute/class

from astronomer-providers.

rajaths010494 avatar rajaths010494 commented on May 29, 2024

in airflow trigger now sends the error message with import error mentioned in the above comment,

from astronomer-providers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.