wimlewis-amazon opened a new issue, #48374:
URL: https://github.com/apache/airflow/issues/48374

   ### What do you see as an issue?
   
   In `docs/core-concepts/operators.rst`, there is the mention:
   
   > You can also pass in a callable instead when Python is more readable than 
a Jinja template. The callable must accept two named arguments context and 
jinja_env:
   
   However, there's no mention of what the `context` argument *is*. I can make 
a few guesses based on the subsequent examples, but that's not really enough to 
use it (unless I'm just copying an example). I looked elsewhere in the docs to 
see if "task instance context" was a widely used concept, but no dice.
   
   ### Solving the problem
   
   On the first mention of the context argument, it should describe what it is:
   * The object's type (to whatever extent that's public — is it an actual 
dict, or should I just think of it as an abstract mapping?). A `typing`-style 
declaration in the example would be a super froody detail as well.
   * What I can expect to do with it. Index it with strings? Does it have any 
attributes or methods? Can I mutate it?
   * What are its contents. Apparently it has items named `"task"` and `"ti"` 
... what are their types and significance? Anything else in there?
   
   As an alternative, if this information does already exist elsewhere in the 
documentation, include a link to it.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]

Reply via email to