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
Copy file name to clipboardExpand all lines: website/docs/engine-flink/ddl/index.md
-249Lines changed: 0 additions & 249 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -406,252 +406,3 @@ WITH (
406
406
- Only continuous refresh mode is supported
407
407
- Schema is automatically derived from the query
408
408
- Materialized tables are stored as regular Fluss tables with special metadata
409
-
410
-
## Procedures
411
-
412
-
Fluss provides stored procedures to perform administrative and management operations through Flink SQL. All procedures are located in the `sys` namespace and can be invoked using the `CALL` statement.
413
-
414
-
### Available Procedures
415
-
416
-
You can list all available procedures using:
417
-
418
-
```sql title="Flink SQL"
419
-
SHOW PROCEDURES;
420
-
```
421
-
422
-
### Access Control Procedures
423
-
424
-
Fluss provides procedures to manage Access Control Lists (ACLs) for security and authorization.
425
-
426
-
#### add_acl
427
-
428
-
Add an ACL entry to grant permissions to a principal.
429
-
430
-
**Syntax:**
431
-
432
-
```sql
433
-
CALL [catalog_name.]sys.add_acl(
434
-
resource =>'STRING',
435
-
permission =>'STRING',
436
-
principal =>'STRING',
437
-
operation =>'STRING',
438
-
host =>'STRING'-- optional, defaults to '*'
439
-
)
440
-
```
441
-
442
-
**Parameters:**
443
-
444
-
-`resource` (required): The resource to grant permissions on. Can be `'CLUSTER'` for cluster-level permissions or a specific resource name (e.g., database or table name).
445
-
-`permission` (required): The permission type to grant. Valid values are `'ALLOW'` or `'DENY'`.
446
-
-`principal` (required): The principal to grant permissions to, in the format `'Type:Name'` (e.g., `'User:Alice'`).
447
-
-`operation` (required): The operation type to grant. Valid values include `'READ'`, `'WRITE'`, `'CREATE'`, `'DELETE'`, `'ALTER'`, `'DESCRIBE'`, `'CLUSTER_ACTION'`, `'IDEMPOTENT_WRITE'`.
448
-
-`host` (optional): The host from which the principal can access the resource. Defaults to `'*'` (all hosts).
449
-
450
-
**Example:**
451
-
452
-
```sql title="Flink SQL"
453
-
-- Use the Fluss catalog (replace 'fluss_catalog' with your catalog name if different)
454
-
USE fluss_catalog;
455
-
456
-
-- Grant read permission to user Alice from any host
457
-
CALL sys.add_acl(
458
-
resource =>'CLUSTER',
459
-
permission =>'ALLOW',
460
-
principal =>'User:Alice',
461
-
operation =>'READ',
462
-
host =>'*'
463
-
);
464
-
465
-
-- Grant write permission to user Bob from a specific host
466
-
CALL sys.add_acl(
467
-
resource =>'my_database.my_table',
468
-
permission =>'ALLOW',
469
-
principal =>'User:Bob',
470
-
operation =>'WRITE',
471
-
host =>'192.168.1.100'
472
-
);
473
-
```
474
-
475
-
#### drop_acl
476
-
477
-
Remove an ACL entry to revoke permissions.
478
-
479
-
**Syntax:**
480
-
481
-
```sql
482
-
CALL [catalog_name.]sys.drop_acl(
483
-
resource =>'STRING',
484
-
permission =>'STRING',
485
-
principal =>'STRING',
486
-
operation =>'STRING',
487
-
host =>'STRING'-- optional, defaults to '*'
488
-
)
489
-
```
490
-
491
-
**Parameters:**
492
-
493
-
All parameters accept the same values as `add_acl`. You can use `'ANY'` as a wildcard value to match multiple entries for batch deletion.
494
-
495
-
**Example:**
496
-
497
-
```sql title="Flink SQL"
498
-
-- Use the Fluss catalog (replace 'fluss_catalog' with your catalog name if different)
499
-
USE fluss_catalog;
500
-
501
-
-- Remove a specific ACL entry
502
-
CALL sys.drop_acl(
503
-
resource =>'CLUSTER',
504
-
permission =>'ALLOW',
505
-
principal =>'User:Alice',
506
-
operation =>'READ',
507
-
host =>'*'
508
-
);
509
-
510
-
-- Remove all ACL entries for a specific user
511
-
CALL sys.drop_acl(
512
-
resource =>'ANY',
513
-
permission =>'ANY',
514
-
principal =>'User:Alice',
515
-
operation =>'ANY',
516
-
host =>'ANY'
517
-
);
518
-
```
519
-
520
-
#### list_acl
521
-
522
-
List ACL entries matching the specified filters.
523
-
524
-
**Syntax:**
525
-
526
-
```sql
527
-
CALL [catalog_name.]sys.list_acl(
528
-
resource =>'STRING',
529
-
permission =>'STRING', -- optional, defaults to 'ANY'
530
-
principal =>'STRING', -- optional, defaults to 'ANY'
531
-
operation =>'STRING', -- optional, defaults to 'ANY'
532
-
host =>'STRING'-- optional, defaults to 'ANY'
533
-
)
534
-
```
535
-
536
-
**Parameters:**
537
-
538
-
All parameters accept the same values as `add_acl`. Use `'ANY'` as a wildcard to match all values for that parameter.
539
-
540
-
**Returns:** An array of strings, each representing an ACL entry in the format: `resource="...";permission="...";principal="...";operation="...";host="..."`
541
-
542
-
**Example:**
543
-
544
-
```sql title="Flink SQL"
545
-
-- Use the Fluss catalog (replace 'fluss_catalog' with your catalog name if different)
546
-
USE fluss_catalog;
547
-
548
-
-- List all ACL entries
549
-
CALL sys.list_acl(resource =>'ANY');
550
-
551
-
-- List all ACL entries for a specific user
552
-
CALL sys.list_acl(
553
-
resource =>'ANY',
554
-
principal =>'User:Alice'
555
-
);
556
-
557
-
-- List all read permissions
558
-
CALL sys.list_acl(
559
-
resource =>'ANY',
560
-
operation =>'READ'
561
-
);
562
-
```
563
-
564
-
### Cluster Configuration Procedures
565
-
566
-
Fluss provides procedures to dynamically manage cluster configurations without requiring a server restart.
0 commit comments