Fusion Tables Drive Export
Export Google Fusion Tables to Google Drive.
Make sure you have the following tools installed:
After cloning the repository, install all dependencies:
yarn # install dependencies
Install the Google Cloud SDK and initialize it by running:
Setup the gcloud to your project ID like this:
gcloud config set project my-project-id
Define the visualizer url in an environment variable called
VISUALIZER_BASE_URI like this:
Setup Google Analytics and store your key in an environment variable called
Define a secret key
SECRET_KEY to create secure hashes for the log and progress:
Define two cookie keys
COOKIE_KEY_2 to create secure cookies:
export COOKIE_KEY_1="my-secret-key" export COOKIE_KEY_2="my-secret-key"
To help with environment variable handling on a project level, check out direnv.
Various APIs are needed for this project to run. Enable the Fusion Tables API, the Drive API and the Sheets API in your Google Cloud Console. Those are needed to read Fusiontables from a user account and to store the export in Google Drive including an index sheet listing all exports. StackDriver needs to be activated for Error Reporting in the same Google Cloud Project.
You’ll need some credentials for OAuth2. Go to the Credentials page in your Google Cloud Project in the Google Cloud Console. Create some server side credentials with
https://YOUR_DOMAIN/auth/callback as the authorized redirect URIs. Download the credentials as a JSON file and save it as
Also, create some server credentials with the role Owner to use the Datastore during development. Download the corresponding JSON file and save it in the
./server-src/config/ folder. Store the path to that file in an env called
GOOGLE_APPLICATION_CREDENTIALS. To setup the database index, run the following once before starting the project:
yarn run deploy:datastore-indexes
Run the following command to start the server on localhost:
yarn run start:dev # start the server
Run the following command to deploy the application:
yarn run deploy
The project is hosted at AppEngine