firebase / firebase/extensions
[fs-bq-schema-views]: add named database support for Gemini schema generation
- Dominant language
- TypeScript
- Stars
- 979
- Forks
- 433
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 125
Description
## Description
When using Gemini to automatically generate BigQuery schemas, the `gen-schema-view` script only supports the default Firestore database. This feature request proposes adding support for named databases when using Gemini schema generation.
## Use Case
Users with multiple Firestore databases want to use Gemini to automatically generate schema views for collections in named databases. Currently, Gemini-based schema generation is limited to the default database only.
## Proposed Solution
Add `--database-id` option when `--use-gemini` is specified:
- CLI option: `-D, --database-id ` (optional, defaults to `(default)`)
- Interactive prompt: Add database ID selection when Gemini mode is chosen
Example usage:
```bash
npm run gen-schema-views -- --non-interactive \
-P my-project \
-d my-dataset \
-t my_prefix \
--use-gemini my-collection \
-D my-named-database \
--google-ai-key YOUR_KEY
```
Contributor guide
Research direction
Start at the gen-schema-views script and inspect its command-line option handling and the interactive path entered with --use-gemini. Add support for the optional -D/--database-id value, defaulting to (default), and prompt for it in Gemini mode; verify the non-interactive example works with a named database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, google-cloud, typescript
- Domain
- ai, cli, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100