turbaszek commented on issue #24456: URL: https://github.com/apache/airflow/issues/24456#issuecomment-1163544527
How about creating `@snowpark_task` decorator as we do for `virtualenv` and `docker`? https://github.com/apache/airflow/blob/c3c1f7ea2851377ba913075844a8dde9bfe6376e/airflow/providers/docker/decorators/docker.py#L135-L139 https://github.com/apache/airflow/blob/c3c1f7ea2851377ba913075844a8dde9bfe6376e/airflow/decorators/python_virtualenv.py#L71-L75 Of course such operator would have to provide session: ```py @snowpark_task def count_user(session: Session): # session is required parameter session.sql(...) ``` Personally I found this more friendly than instantiating hooks or using operators. Apart from that should we consider implementing custom XCom backend based on reading query results using query-id? This can be a really nice addition to Snowpark + Airflow combo. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
