| //// |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| http://www.apache.org/licenses/LICENSE-2.0 |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| //// |
| |
| :documentationPath: /vfs/ |
| :language: en_US |
| |
| = Google Cloud Storage VFS |
| |
| == Scheme |
| |
| The scheme you can use to access your files in Google Cloud Storage is |
| |
| `**gs://**` |
| |
| == Configuration |
| |
| You need to generate a key file for a service account to make it work. Go to the Google Cloud console to do this. Once you have a key file for your service account, with permissions to access your GCP storage, point to it with either a system environment variable called `GOOGLE_APPLICATION_CREDENTIALS` (standard Google way of doing this) or in the Options dialog in the 'Google Cloud' tab. You can also use `hop-conf`: |
| |
| [source,shell script] |
| ---- |
| -gck, --google-cloud-service-account-key-file=<serviceAccountKeyFile> |
| Configure the path to a Google Cloud service account JSON key file |
| ---- |
| |
| Once done you will see a `googleCloud` entry in the central `hop-config.json` file: |
| |
| [source,json] |
| ---- |
| { |
| "googleCloud" : { |
| "serviceAccountKeyFile" : "/path/to/your/google-key.json" |
| } |
| } |
| ---- |
| |
| == Usage and testing |
| |
| To test if the configuration works type use File/Open in the GUI and type in googledrive:// as a file location. Then hit enter (or click the refresh button). Browse to a CSV, JSON or text file you uploaded and open it. If all is configured correctly you should be able to see the content in the Hop GUI. |
| |
| |