0

we want to run "gsutil ls -L gs://bucket/obj1" command to print the information of gcs object. we are using airflow to connect with gcs. can anyone help with syntax to run above command using python callable function

Yug
  • 105
  • 1
  • 9

1 Answers1

0

There is now a GCSListObjectsOperator provided by Google:

I think you can use it for your case with

GCS_Files = GoogleCloudStorageListOperator(
                task_id='List_GCS_files',
                bucket='bucket',
                prefix='obj1',
                gcp_conn_id=google_cloud_conn_id
            )
dsillman2000
  • 976
  • 1
  • 8
  • 20
gdahia
  • 1
  • 2