Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL hooks can't execute #23

Open
edgarrmondragon opened this issue Apr 15, 2021 · 0 comments
Open

SQL hooks can't execute #23

edgarrmondragon opened this issue Apr 15, 2021 · 0 comments

Comments

@edgarrmondragon
Copy link

SQL hooks before_run_sql and after_run_sql fail to execute with the following error message:

Traceback (most recent call last):
  File "/project/.meltano/loaders/target-snowflake/venv/bin/target-snowflake", line 8, in <module>
    sys.exit(cli())
  File "/project/.meltano/loaders/target-snowflake/venv/lib/python3.8/site-packages/target_snowflake/__init__.py", line 57, in cli
    main(args.config)
  File "/project/.meltano/loaders/target-snowflake/venv/lib/python3.8/site-packages/target_snowflake/__init__.py", line 51, in main
    target_tools.main(target)
  File "/project/.meltano/loaders/target-snowflake/venv/lib/python3.8/site-packages/target_postgres/target_tools.py", line 28, in main
    stream_to_target(input_stream, target, config=config)
  File "/project/.meltano/loaders/target-snowflake/venv/lib/python3.8/site-packages/target_postgres/target_tools.py", line 44, in stream_to_target
    _run_sql_hook('before_run_sql', config, target)
  File "/project/.meltano/loaders/target-snowflake/venv/lib/python3.8/site-packages/target_postgres/target_tools.py", line 188, in _run_sql_hook
    with target.conn.cursor() as cur:
AttributeError: 'SnowflakeTarget' object has no attribute 'conn'

Seems to be caused by this target using a different attribute name for the SQLAlchemy connection (self.connection instead of self.conn).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant