Routine name "firestoreArray" missing dataset while no default dataset is set in the request.
See original GitHub issue[REQUIRED] Step 2: Describe your configuration
- Extension name: _ BigQuery Export extension
- Extension version: _ 0.1.5
- Configuration values (redact info where appropriate):
npx @firebaseextensions/fs-bq-schema-views --non-interactive --project=${param:my_project_id} --dataset=${param:my_dataset} --table-name-prefix=${param:my_table_name} --schema-files=./ordenes-schema-view.json
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
I have tried out the schema-view export but I got an error.
This is my Firebase document schema that I want to generate a view for.
{
"cart": [{
"cantidad": 1,
"descripcion": "Sandwich # 1",
"nombreProducto": "Sandwich #1",
"precio": 200,
"productId": 5,
"productImage": "img_url"
}],
"comentario": "sin lechuga",
"comercioImagen": "IMG",
"comercioName": "My awesome shop",
"comision": 0.03,
"deliveryPrice": 40,
"demora": "20-40 min",
"direccionEntrega": "25 de julio",
"metodoPago": 0,
"shopId": "sFzYBG3E2I3XcAju9Cvm",
"status": 4,
"statusMsg": "Terminado",
"timestamp": {
"_seconds": 1590713690,
"_nanoseconds": 134000000
},
"total": 240,
"uid": "itCdltn8DFY8dZ1vj2",
"userName": "Gastón Saillén",
"userPhone": "phoneNum",
"userPhoto": "photo",
"wantDelivery": true
}
Here is how I generated my JSON script Note that I just generate the script for some fields, not all of them. (Which I expect null for the rest of them)
ordenes-schema-view.json
{
"fields": [
{
"name": "uid",
"type": "string"
},
{
"name":"comercioName",
"type": "string"
},
{
"name": "timestamp",
"type": "timestamp"
},
{
"name": "comision",
"type": "number"
},
{
"name": "metodoPago",
"type": "number"
},
{
"name": "shopId",
"type": "string"
},
{
"name": "status",
"type": "number"
},
{
"name": "total",
"type": "number"
},
{
"name": "userName",
"type": "string"
},
{
"name": "userPhone",
"type": "string"
},
{
"name": "wantDelivery",
"type": "boolean"
},
{
"name": "cart",
"type": "array"
}
]
}
And here is the error it throws when I try to generate this view with the npx command above
{
"errors": [{
"reason": "invalid",
"location": "..firestoreArray",
"message": "Routine name \"firestoreArray\" missing dataset while no default dataset is set in the request."
}],
"response": {
"kind": "bigquery#job",
"etag": "ETAG",
"id": "MY_PROJECT_ID",
"selfLink": "BQ_LINK",
"user_email": "MY_EMAIL",
"configuration": {
"query": {
"query": "CREATE FUNCTION IF NOT EXISTS `..firestoreArray`(json STRING) RETURNS ARRAY < STRING > LANGUAGE js AS \"\"\"\n return json ? JSON.parse(json).map(x => JSON.stringify(x)) : [];\n \"\"\";",
"priority": "INTERACTIVE",
"useLegacySql": false
},
"jobType": "QUERY"
},
"jobReference": {
"projectId": "MY_PROJECT_ID",
"jobId": "d86eff6d-9ff7-4806-8ab5-57c3dfc8ece1",
"location": "US"
},
"statistics": {
"creationTime": "1590764833465",
"startTime": "1590764833855",
"endTime": "1590764833855"
},
"status": {
"errorResult": {
"reason": "invalid",
"location": "..firestoreArray",
"message": "Routine name \"firestoreArray\" missing dataset while no default dataset is set in the request."
},
"errors": [{
"reason": "invalid",
"location": "..firestoreArray",
"message": "Routine name \"firestoreArray\" missing dataset while no default dataset is set in the request."
}],
"state": "DONE"
}
},
"message": "Routine name \"firestoreArray\" missing dataset while no default dataset is set in the request."
}
I have changed sensitive information in the above error, but the thing is that I cant generate a view for this document json type.
Is there anything wrong from my side ?
Expected result
Generate the view with the current script
Actual result
Error for firebaseArray is thrown, cant find any documentation on it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
BigQuery: Table name missing dataset while no default ...
I know this query is missing a dataset name, so the error "Table name "my_table" missing dataset while no default dataset is set...
Read more >BigQuery error using SQL Variables: "missing dataset while ...
ExceptionInfo, :error "Table name \"engineers\" missing dataset while no default dataset is set in the request.
Read more >Untitled
Big Query Missing Dataset While No Default Dataset Is Set In The Request But this ... use when making requests:-X, --request - The...
Read more >How Do You Troubleshoot the GCP BigQuery Error 'Table ...
But you get a pop-up message that says 'Table name "mockdata" missing dataset while no default dataset is set in the request.'.
Read more >Survival guide: how to migrate from the Firebase Realtime ...
It turns out that the database actually used to be a chat service. ... I'll set/update their name , email , and photoUrl...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @russellwheatley, It was a mistake from my side. Instead of entering “–dataset=firestore_export”, I entered “–dataset=${param:firestore_export}” and ${param:firestore_export} was empty.
Hi. try this
npx @firebaseextensions/fs-bq-schema-views
–non-interactive
–project project-test
–dataset dataset-test
–table-name-prefix tables-test
–schema-files=file.json
And replace these variables with those of your project (project-test , dataset-test , tables-test)