Replies: 7 comments 4 replies
-
|
Thanks for creating this issue! Can you tell me a bit more about your desired functionality? Are you looking for each statement ID to be written to XComs? Added to logs? Tell me more. |
Beta Was this translation helpful? Give feedback.
-
|
In general, I would like to have a better integration between Snowflake <-> Airflow. Most of all for debugging purposes. For example, in Snowflake you can't see the query results of queries that are not your own. So, it would be nice to have it in Airflow. I feel the UX for that would be a plugin that can connects to Snowsight, or have a panel like Astro showed for their guides in 3.1. But I'm not going to daydream with it, and since I don't want to use >AF3, I was thinking I could get the query ids to at least do some counts on them, having at the end of all atomic blocks some From my POV, those queries ids should be available as a parameter for anyone to use them as they like. Having them in the XCOM? I suppose it makes sense since right now is outputting the parent_id, but with it, you would need to call to Snowflake again to know the childs IDs, so I'm trying to avoid this query. |
Beta Was this translation helpful? Give feedback.
-
Just to make it clear - I doubt any effort from the Airflow dev community will be put in adding new things in Airflow 2 since we are only fixing critical and security issues in Airflow 2. Also the support of future releases of Snowflake provider will end in April 2026, so maybe a good idea to switch and to develop it for Airflow 3 (just saying) . PRs as usual are most welcome. |
Beta Was this translation helpful? Give feedback.
-
|
Yep, but as I was talking with the Astro people while doing the demo, there were too many things missing. Like that I couldn't opt out of the dag versioning, and I couldn't rerun a dagrun with different code was crazy. After a while seemed it was possible, but only see/change the version using the top right panel on the Graph view, but I normally use the accordion menu (where you can expand and collapse task groups). In general, felt it was an unfinished project. Also, the button to clear all the tasks inside a task group was removed, they told me that would be added in 3.1, but my trust is already broken. I prefer to wait until it has been polish a bit more. I have too much these months. And I mostly only use it for Snowflake, so I can update the providers version and keep using 2.11 or whatever is not >=3.0. |
Beta Was this translation helpful? Give feedback.
-
|
I'd echo what @potiuk is saying. @set92, please feel free to open up a PR if this is functionality that is absolutely essential for your workflow. Or, you could author your own custom Operators if needed. |
Beta Was this translation helpful? Give feedback.
-
Sure, you can wait with upgrade - but this also mean that unless you implement it yourself in your copy with your plugin (And we won't really even need to accept it community), this is highly unlikely somoene will ever do it for Airflow 2. But you still can of course - for yourself if you want to use the old plugin mechanisms. They were designed for extensions and there is absolutely nothing wrong with you implementing that plugin for yourself. Converting it into a discussion - it's hhighly unlikely this turns into something that the community would do |
Beta Was this translation helpful? Give feedback.
-
|
@potiuk From my point of view, what we are talking is a bug, since not all the mechanisms work in the same way. The conversation if I'm going to use it or not is another thing. The problem at hand is:
2.1. What I'm requesting is that the SnowflakeSqlApiOperator works in the same way. It doesn't need to be for Airflow 2, only improve the product that is Airflow for anyone to use it. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Apache Airflow version
Other Airflow 2/3 version (please specify below)
If "Other Airflow 2/3 version" selected, which one?
2.10.3
What happened?
When calling the .execute, and retrieve the query_ids I get the parent ID, but if I'm running multiple queries I want to know all the queries IDs to retrieve results for any of them.
On the logs, I can see the API response, but I don't see a method to get it.
While checking the code I see it calls to the Hook, and on the hook I can see
So, seeing this I would say in the Hook is correct, because if it has
statementHandlesit returns it. Although I would say that is not totally right, because you may want/need both. The parent id that is the statementHandle, and the IDs of the children (statementHandles).But the Operator only returns the parent ID, even so when in the resp I can see everything. I think is because it calls to check_query_output() which only logs the json response, but doesn't return it, and the hook uses get_sql_api_query_status that parses it correctly?
I also think that the poll_queries would be a nice method to have exposed to the hook, since now the hook I think it runs the query and forget about it.
What you think should happen instead?
No response
How to reproduce
I don't have a basic example since I'm debugging production code, but it should be
sql_statement = """
ALTER SESSION SET TRANSACTION_ABORT_ON_ERROR = TRUE;
BEGIN TRANSACTION;
SELECT 4 as "number of rows inserted";
SELECT 2 as "number of rows updated";
COMMIT;
"""
Operating System
AWS MWAA
Versions of Apache Airflow Providers
Providers
Common IO ProviderDeployment
Amazon (AWS) MWAA
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions