You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use this Catalog URI with Iceberg-compatible query engines (Spark, DuckDB, Trino, etc.) to query data as tables.
992
-
Note: You'll need a Cloudflare API token with 'R2 Data Catalog' permission to authenticate your client with this catalog.
993
+
Note: You will need a Cloudflare API token with 'R2 Data Catalog' permission to authenticate your client with this catalog.
993
994
For more details, refer to: https://developers.cloudflare.com/r2/api/s3/tokens/"`
994
995
);
995
996
});
@@ -1058,12 +1059,12 @@ For more details, refer to: https://developers.cloudflare.com/r2/api/s3/tokens/"
1058
1059
it("should disable R2 catalog for the given bucket",async()=>{
1059
1060
setIsTTY(true);
1060
1061
mockConfirm({
1061
-
text: "Are you sure you want to disable the data catalog for bucket 'testBucket'? This action is irreversible, and you cannot re-enable it on this bucket.",
1062
+
text: "Are you sure you want to disable the data catalog for bucket 'testBucket'?",
"Data catalog is not enabled for bucket 'testBucket'. Please use 'wrangler r2 bucket catalog enable testBucket' to first enable the data catalog on this bucket."
1114
+
`);
1115
+
});
1078
1116
});
1079
1117
1080
1118
describe("get",()=>{
@@ -1133,13 +1171,15 @@ For more details, refer to: https://developers.cloudflare.com/r2/api/s3/tokens/"
1133
1171
awaitrunWrangler("r2 bucket catalog get test-bucket");
it("should inform user if no active warehouse is present for the bucket",async()=>{
1182
+
it("should inform user if the catalog was never enabled for the bucket",async()=>{
1143
1183
msw.use(
1144
1184
http.get(
1145
1185
"*/accounts/:accountId/r2-catalog/:bucketName",
@@ -1167,7 +1207,8 @@ For more details, refer to: https://developers.cloudflare.com/r2/api/s3/tokens/"
1167
1207
awaitrunWrangler("r2 bucket catalog get test-bucket");
1168
1208
expect(std.out).toMatchInlineSnapshot(`
1169
1209
"Getting data catalog status for 'test-bucket'...
1170
-
Data catalog isn't enabled for bucket 'test-bucket'."
1210
+
1211
+
Data catalog is not enabled for bucket 'test-bucket'. Please use 'wrangler r2 bucket catalog enable test-bucket' to first enable the data catalog on this bucket."
`Are you sure you want to disable the data catalog for bucket '${args.bucket}'? This action is irreversible, and you cannot re-enable it on this bucket.`
77
+
`Are you sure you want to disable the data catalog for bucket '${args.bucket}'?`
77
78
);
78
79
if(!confirmedDisable){
79
80
logger.log("Disable cancelled.");
80
81
return;
81
82
}
82
83
83
-
awaitdisableR2Catalog(accountId,args.bucket);
84
+
try{
85
+
awaitdisableR2Catalog(accountId,args.bucket);
84
86
85
-
logger.log(
86
-
`Successfully disabled the data catalog on bucket '${args.bucket}'.`
87
-
);
87
+
logger.log(
88
+
`Successfully disabled the data catalog on bucket '${args.bucket}'.`
89
+
);
90
+
}catch(e){
91
+
// R2 Data Catalog 40401 corresponds to a 404
92
+
if(einstanceofAPIError&&e.code==40401){
93
+
logger.log(
94
+
`Data catalog is not enabled for bucket '${args.bucket}'. Please use 'wrangler r2 bucket catalog enable ${args.bucket}' to first enable the data catalog on this bucket.`
logger.log(`Data catalog isn't enabled for bucket '${args.bucket}'.`);
145
+
logger.log(
146
+
`Data catalog is not enabled for bucket '${args.bucket}'. Please use 'wrangler r2 bucket catalog enable ${args.bucket}' to first enable the data catalog on this bucket.`
0 commit comments