extensions icon indicating copy to clipboard operation
extensions copied to clipboard

fs-bq-schema-views fails to add schema view for second table

Open stari4ek opened this issue 6 years ago • 4 comments

[READ] Step 1: Are you in the right place?

yep

[REQUIRED] Step 2: Describe your configuration

  • Extension name: firestore-bigquery-export (fs-bq-schema-views script)
  • Extension version: 0.1.1

[REQUIRED] Step 3: Describe the problem

I have 2 instances of firestore-bigquery-export running, which export 2 different collections from firestore. I've added schema view for 1st instance/collection (firestore* functions and schema view for changelog table). When I'm trying to add 2nd schema view for another collection/table, I'm getting error and no new schema added to dataset.

Steps to reproduce:

$ npx @firebaseextensions/fs-bq-schema-views \
> --non-interactive \
> --project=REDACTED \
> --dataset=firestore_export \
> --table-name-prefix=instances \
> --schema-files=./instances.json
{"code":409,"errors":[{"message":"Already Exists: Routine REDACTED.firestore_export.firestoreArray","domain":"global","reason":"duplicate"}],"message":"Already Exists: Routine REDACTED.firestore_export.firestoreArray"}
Already Exists: Routine REDACTED.firestore_export.firestoreArray
Expected result

new schema view created without any errors

Actual result

Error produced and no new schema view.

As a side-note, I've got same error when was creating first schema view, but all functions and schema view for changelog table were created

stari4ek avatar Feb 27 '20 18:02 stari4ek

I'm also getting this. I'm not sure why this is happening. I deleted firestoreArray, firestoreBoolean, firestoreGeopoints, firestoreNumber, firestoreTimestamp from the BigQuery web UI. Look under Resources > ProjectId > DatasetId in the left sidenav. That solved it for me, and I was able to re-upload the schema.

jhu7235 avatar Mar 09 '20 21:03 jhu7235

Hey, looks like this was fixed in #193 - but the package still needs publishing to NPM - we'll get this looked at, thanks.

Salakar avatar Mar 10 '20 14:03 Salakar

Still broken. Maybe, cause npm has some 0.1.3 version published? (https://www.npmjs.com/package/@firebaseextensions/fs-bq-schema-views/v/0.1.3)

stari4ek avatar Apr 07 '20 09:04 stari4ek

Hi the package has now been published, sorry for the delay.

laurenzlong avatar Apr 08 '20 00:04 laurenzlong