0

(I asked this also on Datalore's forum. There doesn't seem to be much going on there -- so I'm asking here in the hope of a better/quicker response.)

I'm having trouble attaching GCS buckets. The documentation is sparse. All that I could find is here, which simply says:

In the New datasource dialog, fill in the fields and click Save and close.

Here's that dialog and I'm not sure what information to put here.

image

What I tried

GCS datasource name

I believe it's for reference within Datalore, correct? So can I just put anything here? I wrote "patant-data-ors".

bucket

Options I tried:

  1. patent-data-ors (this is the name of the bucket)
  2. storage.googleapis.com/patent-data-ors
  3. patent-data-ors.storage.googleapis.com

Also tried 2 and 3 with https://.

key_file_content

I left it blank. I'm guessing it's for private buckets? Mine is publicly accessible.


What am I doing wrong?

ba_ul
  • 2,049
  • 5
  • 22
  • 35
  • 1
    I do not know the Datalore interface. General tips: 1) To use the storage APIs, authorization is required. 2) Most likely bucket name is `patent-data-ors` or `gs://patent-data-ors`. 3) `key_file_content` is probably the `private_key` from the service account JSON file. Sometimes it is the entire file (sometimes stripped of newlines). 4) Please post an answer once you figure this out. – John Hanley Sep 14 '22 at 23:31
  • I found this link on [GCS bucket mounting](https://blog.jetbrains.com/datalore/2021/11/25/new-in-datalore-r-and-scala-notebooks-google-cloud-bucket-mounting-and-more/#gcs-bucket-mounting). Hope this helps. – Robert G Sep 15 '22 at 00:40

1 Answers1

1

You should paste the whole text from .JSON file. To get this file, follow these steps after you created a bucket in the project:

  1. In the Google Cloud menu, select IAM & Admin.
  2. Go to Service accounts and create a new account.
  3. In the section Grant this service account access to project select the role Storage admin. You can find it by typing in filters.
  4. Open the created account and go to Keys tab. Add a new key as a JSON file. Then open it, copy the text and paste it to GCS key file content field in Datalore.
Antonina
  • 26
  • 2
  • Hi, thanks for this. I believe I was able to sort this out doing what you suggested here. I moved away from Datalore, though. Might revisit again. – ba_ul Jun 09 '23 at 08:40