You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/03 20:11:11 UTC
[GitHub] [airflow] briansorahan opened a new issue #8105: Set variable from
stdin
briansorahan opened a new issue #8105: Set variable from stdin
URL: https://github.com/apache/airflow/issues/8105
**Description**
Would like to be able to do this:
```
cat FILE | airflow variables -s KEY -
```
**Use case / motivation**
Less error-prone than reading the file into a variable and interpolating the variable into a shell command.
**Related Issues**
I searched the github issues for "stdin" and "input" but didn't find anything that looked like it matched.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj edited a comment on issue #8105: Set variable
from stdin
Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #8105: Set variable from stdin
URL: https://github.com/apache/airflow/issues/8105#issuecomment-608645084
This should work. This is not ideal, but you can temporarily use it.
```bash
airflow variables -s KEY "<(cat FILE)"
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] boring-cyborg[bot] commented on issue #8105: Set variable
from stdin
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8105: Set variable from stdin
URL: https://github.com/apache/airflow/issues/8105#issuecomment-608636151
Thanks for opening your first issue here! Be sure to follow the issue template!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj commented on issue #8105: Set variable from stdin
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #8105: Set variable from stdin
URL: https://github.com/apache/airflow/issues/8105#issuecomment-608645084
This should work.
```bash
airflow variables -s KEY "<(cat FILE)"
```
or
```bash
cat FILE | xargs -I {} airflow variables -s KEY "{}"
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj edited a comment on issue #8105: Set variable
from stdin
Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #8105: Set variable from stdin
URL: https://github.com/apache/airflow/issues/8105#issuecomment-608645084
This should work. This is not ideal, but you can temporarily use it.
```bash
airflow variables -s KEY "$(cat FILE)"
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj edited a comment on issue #8105: Set variable
from stdin
Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #8105: Set variable from stdin
URL: https://github.com/apache/airflow/issues/8105#issuecomment-608645084
This should work.
```bash
airflow variables -s KEY "<(cat FILE)"
```
or
```bash
cat FILE | xargs -I {} airflow variables -s KEY '{}'
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj edited a comment on issue #8105: Set variable
from stdin
Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #8105: Set variable from stdin
URL: https://github.com/apache/airflow/issues/8105#issuecomment-608645084
This should work.
```bash
airflow variables -s KEY "<(cat FILE)"
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services