Description
Since the new version of GCSHook.list implements the match_glob parameter, it would be possible to implement a new GCS sensor that checks if a file that matches a given glob exists in a GCS bucket.
The new sensor could be called GCSObjectsMatchingGlobExistenceSensor and would have a similar signature to GCSObjectsWithPrefixExistenceSensor, changing in the __init__ function the prefix parameter with a glob parameter.
Use case/motivation
This will be a new sensor, useful to check if inside a Google Cloud Storage bucket a file that matches a certain blob is available.
For example:
GCSObjectsMatchingGlobExistenceSensor(
task_id="gcs_file_sensor",
bucket="test_bucket",
glob="*.csv"
)
will find all csv files in the bucket test_bucket.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Description
Since the new version of
GCSHook.listimplements thematch_globparameter, it would be possible to implement a new GCS sensor that checks if a file that matches a given glob exists in a GCS bucket.The new sensor could be called
GCSObjectsMatchingGlobExistenceSensorand would have a similar signature toGCSObjectsWithPrefixExistenceSensor, changing in the__init__function theprefixparameter with aglobparameter.Use case/motivation
This will be a new sensor, useful to check if inside a Google Cloud Storage bucket a file that matches a certain blob is available.
For example:
will find all csv files in the bucket
test_bucket.Related issues
No response
Are you willing to submit a PR?
Code of Conduct