Skip to content

Latest commit

 

History

History
42 lines (39 loc) · 1.18 KB

firestore_document_download.md

File metadata and controls

42 lines (39 loc) · 1.18 KB

FirestoreDocumentDownload

Download a document from Firestore.

Parameters

Parameters Explanation Required Default Remarks
project_id GCP project id Yes None
location GCP location Yes None
credentials.file A service account .json file path No None
credentials.content A dictionary containing service account info in Google format No None
collection Collection name Yes None
document Document name Yes None
dest_dir Destination directory to download the file Yes None If a non-existent directory path is specified, the directory is automatically created.

Examples

- step:
  class: FirestoreDocumentDownload
  arguments:
    project_id: test_gcp
    location: asia-northeast1
    credentials:
      file: /root/gcp_credential.json
    collection: user
    document: john_001
    dest_dir: /user

- step: Embed contents of credentials at scenario.yml
  class: FirestoreDocumentDownload
  arguments:
    project_id: test_gcp
    location: asia-northeast1
    credentials:
      content: |
        {
          "type": "service_account",
          ...
        }
    collection: user
    document: john_001
    dest_dir: /user