diff --git a/weed/admin/view/app/iceberg_catalog.templ b/weed/admin/view/app/iceberg_catalog.templ index 2f799d41c..85fb4a52e 100644 --- a/weed/admin/view/app/iceberg_catalog.templ +++ b/weed/admin/view/app/iceberg_catalog.templ @@ -180,33 +180,33 @@ templ IcebergCatalog(data dash.IcebergCatalogData) {
-- Install and load Iceberg extension
+ { `-- Install and load Iceberg extension
INSTALL iceberg;
LOAD iceberg;
-- Create a catalog connection
CREATE SECRET (
TYPE ICEBERG,
- ENDPOINT 'http://localhost:{ fmt.Sprintf("%d", data.IcebergPort) }',
+ ENDPOINT 'http://localhost:` + fmt.Sprintf("%d", data.IcebergPort) + `',
SCOPE 's3://my-table-bucket/'
);
-- Query tables
-SELECT * FROM iceberg_scan('s3://my-table-bucket/my-namespace/my-table');
+SELECT * FROM iceberg_scan('s3://my-table-bucket/my-namespace/my-table');` }
from pyiceberg.catalog import load_catalog
+ { `from pyiceberg.catalog import load_catalog
catalog = load_catalog(
name="seaweedfs",
- **{"{"}
+ **{
"type": "rest",
- "uri": "http://localhost:{ fmt.Sprintf("%d", data.IcebergPort) }",
- {"}"}
+ "uri": "http://localhost:` + fmt.Sprintf("%d", data.IcebergPort) + `",
+ }
)
# List namespaces
-namespaces = catalog.list_namespaces()
+namespaces = catalog.list_namespaces()` }
-- Install and load Iceberg extension INSTALL iceberg; LOAD iceberg; -- Create a catalog connection CREATE SECRET ( TYPE ICEBERG, ENDPOINT 'http://localhost:")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.IcebergPort))
+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(`-- Install and load Iceberg extension
+INSTALL iceberg;
+LOAD iceberg;
+
+-- Create a catalog connection
+CREATE SECRET (
+ TYPE ICEBERG,
+ ENDPOINT 'http://localhost:` + fmt.Sprintf("%d", data.IcebergPort) + `',
+ SCOPE 's3://my-table-bucket/'
+);
+
+-- Query tables
+SELECT * FROM iceberg_scan('s3://my-table-bucket/my-namespace/my-table');`)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 190, Col: 68}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 195, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "', SCOPE 's3://my-table-bucket/' ); -- Query tables SELECT * FROM iceberg_scan('s3://my-table-bucket/my-namespace/my-table');from pyiceberg.catalog import load_catalog catalog = load_catalog( name=\"seaweedfs\", **")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs("{")
+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(`from pyiceberg.catalog import load_catalog
+
+catalog = load_catalog(
+ name="seaweedfs",
+ **{
+ "type": "rest",
+ "uri": "http://localhost:` + fmt.Sprintf("%d", data.IcebergPort) + `",
+ }
+)
+
+# List namespaces
+namespaces = catalog.list_namespaces()`)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 202, Col: 10}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 209, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, " \"type\": \"rest\", \"uri\": \"http://localhost:")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var14 string
- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.IcebergPort))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 204, Col: 70}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\", ")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var15 string
- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs("}")
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 205, Col: 8}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, " ) # List namespaces namespaces = catalog.list_namespaces()