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

output_table control in "aql.transform" #2082

Open
9 tasks
Andrew-Wichmann opened this issue Dec 23, 2023 · 0 comments
Open
9 tasks

output_table control in "aql.transform" #2082

Andrew-Wichmann opened this issue Dec 23, 2023 · 0 comments
Labels
feature New feature or request

Comments

@Andrew-Wichmann
Copy link

Please describe the feature you'd like to see
I would really like to be able to configure the output_table for the TransformOperator when using the @transform decorator.

Describe the solution you'd like

PRODUCTION_DATABASE = Table(
    name="IMAGE",
    conn_id=SNOWFLAKE_CONN_ID,
)

@dag(
    schedule="@daily",
    start_date=datetime(2023, 12, 12),
)
def fetch_missing_files():
    @aql.transform(output_table=Table(conn_id="some_other_db"))
    def fetch_image(prod_database):
        return """
        SELECT image
        FROM {{prod_database}}
        WHERE <condition>
        """
    fetch_image(PRODUCTION_DATABASE)

Are there any alternatives to this feature?
🤔 I'm not sure. I mean, I could just not use the decorator and initialize the Operator myself, but that's not as fun.

Additional context
Nope. I love the product though. I'm really excited to start using more Airflow =)

Acceptance Criteria

  • All checks and tests in the CI should pass
  • Unit tests (90% code coverage or more, once available)
  • Integration tests (if the feature relates to a new database or external service)
  • Example DAG
  • Docstrings in reStructuredText for each of methods, classes, functions and module-level attributes (including Example DAG on how it should be used)
  • Exception handling in case of errors
  • Logging (are we exposing useful information to the user? e.g. source and destination)
  • Improve the documentation (README, Sphinx, and any other relevant)
  • How to use Guide for the feature (example)
@Andrew-Wichmann Andrew-Wichmann added the feature New feature or request label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant