Skip to content

Firestore

Bases: Spout

__init__(output, state, **kwargs)

Initialize the Firestore class.

Parameters:

Name Type Description Default
output BatchOutput

An instance of the BatchOutput class for saving the data.

required
state State

An instance of the State class for maintaining the state.

required
**kwargs

Additional keyword arguments.

{}

Using geniusrise to invoke via command line

genius Firestore rise \
    batch \
        --output_s3_bucket my_bucket \
        --output_s3_folder s3/folder \
    none \
    fetch \
        --args project_id=my-project collection_id=my-collection

Using geniusrise to invoke via YAML file

version: "1"
spouts:
    my_firestore_spout:
        name: "Firestore"
        method: "fetch"
        args:
            project_id: "my-project"
            collection_id: "my-collection"
        output:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/folder"

fetch(project_id, collection_id)

📖 Fetch data from a Firestore collection and save it in batch.

Parameters:

Name Type Description Default
project_id str

The Google Cloud project ID.

required
collection_id str

The Firestore collection ID.

required

Raises:

Type Description
Exception

If unable to connect to the Firestore server or execute the query.