Skip to content

Commit

Permalink
fix(firestore-bigquery-export): import script params format
Browse files Browse the repository at this point in the history
  • Loading branch information
jauntybrain committed Jan 12, 2024
1 parent da58e79 commit dec8a70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ program
"Firebase Project ID for project containing Cloud Firestore database."
)
.option(
"-B, --bigquery-project <bigquery-project>",
"-B, --big-query-project <big-query-project>",
"Google Cloud Project ID for BigQuery."
)
.option(
Expand Down
9 changes: 5 additions & 4 deletions firestore-bigquery-export/scripts/import/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const questions = [
message: "What is your BigQuery project ID?",
name: "bigQueryProject",
type: "input",
default: process.env.PROJECT_ID,
validate: (value) =>
validateInput(
value,
Expand Down Expand Up @@ -185,7 +186,7 @@ export async function parseConfig(): Promise<CliConfig | CliConfigError> {
if (program.project === undefined) {
errors.push("Project is not specified.");
}
if (program.bigqueryProject === undefined) {
if (program.bigQueryProject === undefined) {
errors.push("BigQuery Project is not specified.");
}
if (program.sourceCollectionPath === undefined) {
Expand Down Expand Up @@ -226,7 +227,7 @@ export async function parseConfig(): Promise<CliConfig | CliConfigError> {
return {
kind: "CONFIG",
projectId: program.project,
bigQueryProjectId: program.bigqueryProject,
bigQueryProjectId: program.bigQueryProject,
sourceCollectionPath: program.sourceCollectionPath,
datasetId: program.dataset,
tableId: program.tableNamePrefix,
Expand All @@ -243,7 +244,7 @@ export async function parseConfig(): Promise<CliConfig | CliConfigError> {
const {
project,
sourceCollectionPath,
bigqueryProject,
bigQueryProject,
dataset,
table,
batchSize,
Expand All @@ -265,7 +266,7 @@ export async function parseConfig(): Promise<CliConfig | CliConfigError> {
return {
kind: "CONFIG",
projectId: project,
bigQueryProjectId: bigqueryProject,
bigQueryProjectId: bigQueryProject,
sourceCollectionPath: sourceCollectionPath,
datasetId: dataset,
tableId: table,
Expand Down
4 changes: 4 additions & 0 deletions firestore-bigquery-export/scripts/import/src/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const getCLIOptions = () => {
"-P, --project <project>",
"Firebase Project ID for project containing the Cloud Firestore database."
)
.option(
"-B, --big-query-project <big-query-project>",
"Google Cloud Project ID for BigQuery."
)
.option(
"-q, --query-collection-group [true|false]",
"Use 'true' for a collection group query, otherwise a collection query is performed."
Expand Down

0 comments on commit dec8a70

Please sign in to comment.