Skip to content

Commit f227c31

Browse files
committed
Add readme steps for private_key secret provider
1 parent 960d1e1 commit f227c31

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

docs/pages/index.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ CREATE SECRET (
3939
PROVIDER access_token,
4040
TOKEN '<your_token>'
4141
);
42+
43+
-- OR create a non-expiring JSON secret with your Google API private key
44+
-- (This enables use in non-interactive workflows like data pipelines)
45+
-- (see "Getting a Google API Access Private Key" below)
46+
CREATE SECRET (
47+
TYPE gsheet,
48+
PROVIDER private_key,
49+
FILENAME '<path_to_JSON_file_with_private_key>'
50+
);
4251
```
4352

4453
### Read
@@ -107,10 +116,14 @@ This token will periodically expire - you can re-run the above command again to
107116

108117
Follow steps 1-9 above to get a JSON file with your private key inside.
109118

110-
Use the value in the `"private_key"` field as the `SECRET` parameter.
111-
It will be in the format `-----BEGIN PRIVATE KEY-----\n ... -----END PRIVATE KEY-----\n`
119+
Include the path to the file as the `FILENAME` parameter when creating a secret.
120+
The recommendation is to use an absolute path, not a relative one, and to store it in the `~/.duckdb` folder.
121+
You will need to be able to access this file while querying GSheets (its content are not persisted. Later versions of this extension may enable that.)
122+
Ex: `CREATE SECRET (TYPE gsheet, PROVIDER private_key, FILENAME '<path_to_JSON_file_with_private_key>');`
123+
124+
You can skip steps 10, 11, and 12 since this extension will convert from your JSON file to a token on your behalf!
112125

113-
Folow steps 13 and 14.
126+
Follow steps 13 and 14.
114127

115128
This private key by default will not expire. Use caution with it.
116129

0 commit comments

Comments
 (0)