You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Stan van Heumen
76c50a41c6
|
8 years ago | |
---|---|---|
.. | ||
functions | 8 years ago | |
README.md | 8 years ago |
README.md
Import Data to Big Query
This template shows how to copy data from the Realtime Database (such as logs being written there) to Google Cloud's BigQuery.
Function Code
See file functions/index.js for the code.
The dependencies are listed in functions/package.json.
Sample Database Structure
As an example we'll be using a simple logs database structure:
/functions-project-12345
/logs
/key-123456
text: "User signed in."
/key-123457
text: "Error: Could not connect to Database"
Setting up the sample
Set the bigquery.datasetName
and bigquery.tableName
Google Cloud environment variables to match the Dataset name and the Table name where you want the logs written to. For this use:
firebase functions:config:set bigquery.datasetName="bar" bigquery.tableName="baz"