File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ CREATE SECRET (
39
39
PROVIDER access_token,
40
40
TOKEN ' <your_token>'
41
41
);
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
+ );
42
51
```
43
52
44
53
### Read
@@ -107,10 +116,14 @@ This token will periodically expire - you can re-run the above command again to
107
116
108
117
Follow steps 1-9 above to get a JSON file with your private key inside.
109
118
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!
112
125
113
- Folow steps 13 and 14.
126
+ Follow steps 13 and 14.
114
127
115
128
This private key by default will not expire. Use caution with it.
116
129
You can’t perform that action at this time.
0 commit comments