Back to plugin list
firestore
Official
Premium

Firestore

The CloudQuery Firestore plugin reads information from your Firestore database and loads it into any supported CloudQuery destinationf

Publisher

cloudquery

Latest version

v4.3.0

Type

Source

Platforms
Date Published

Price per 1M rows

Starting from $15

monthly free quota

1M rows

Set up process #


brew install cloudquery/tap/cloudquery

1. Download CLI and login

See installation options

2. Create source and destination configs

Plugin configuration

cloudquery sync firestore.yml postgresql.yml

3. Run the sync

CloudQuery sync

Overview #

Firestore Source Plugin

The CloudQuery Firestore plugin reads information from your Firestore database and loads it into any supported CloudQuery destination (e.g. PostgreSQL, BigQuery, Snowflake, and more).

Authentication #

The Firestore plugin authenticates using your Application Default Credentials. Available options are all the same options described here in detail:
Local Environment:
  • gcloud auth application-default login (recommended when running locally)
Google Cloud cloud-based development environment:
  • When you run on Cloud Shell or Cloud Code credentials are already available.
Google Cloud containerized environment:
  • Services such as Compute Engine, App Engine and functions supporting attaching a user-managed service account which will CloudQuery will be able to utilize.
On-premises or another cloud provider
  • The suggested way is to use Workload identity federation
  • If not available you can always use service account keys and export the location of the key via GOOGLE_APPLICATION_CREDENTIALS. Highly not recommended as long-lived keys are a security risk

Configuration #

kind: source
spec:
  # Source spec section
  name: firestore
  path: cloudquery/firestore
  registry: cloudquery
  version: "v4.3.0"
  tables: ["*"]
  destinations: ["postgresql"]
  # Learn more about the configuration options at https://cql.ink/firestore_source
  spec:
    # Firestore specific configuration goes here
For more information on downloading, installing and running the CloudQuery CLI, see the Quickstart guide.

Firestore Source Plugin Configuration Reference

Example #

This example connects a single Firestore project to a PostgreSQL destination. The (top level) source spec section is described in the Source Spec Reference.
kind: source
spec:
  # Source spec section
  name: "firestore"
  path: "cloudquery/firestore"
  version: "v4.3.0"
  destinations: ["postgresql"]
  tables: ["*"]
  spec:
    # Firestore Spec section described below
    project_id: "my-project"

Firestore Spec #

This is the (nested) spec used by Firestore Source Plugin
  • project_id ([]string) (optional) (default: auto detect. Will detect the project id from the credentials)
    Specify project id to use when syncing Firestore resources. If not specified, the project id will be auto detected from the credentials. See more about auto detection here
  • service_account_json (string) (optional) (default: empty).
    Firestore service account JSON content. Using service accounts is not recommended, but if it is used it is better to use environment or file variable substitution.
  • use_base64 (boolean) (optional) (default: false). If true, the service account JSON content will treated as base64 encoded, and will be decoded before being used.
  • rows_per_record (integer) (optional) (default: 500)
    Amount of rows to be packed into a single Apache Arrow record to be sent over the wire during sync.
  • max_batch_size (integer) (optional) (default: 50000)
    Maximum batch size for each request when reading Firestore data. You might need to be configure it depending on row data size and system resources.
  • order_by (string) (optional) (default: empty)
    The field(s) to order the results by. If not specified, the results will be ordered by document id. This requires you to add an index on the field(s), which can only be done on the Firebase UI right now. See more here
  • order_direction (string) (optional) (default: empty)
    The direction to order the results by. Only used when order_by is specified. Accepts asc or desc, and if not specified the results will be ordered in ascending order.


Join our mailing list

Subscribe to our newsletter to make sure you don't miss any updates.

Legal

© 2024 CloudQuery, Inc. All rights reserved.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve. You can always opt out later via the link in the footer.