Skip to content

Commit 447bbf5

Browse files
author
Thomas Mahlberg
committed
updated readme
1 parent 7bfcddc commit 447bbf5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,28 @@ A second project "[KustoSchemaToolsAction](https://github.com/github/KustoSchema
99
The `database` object holds all schema related information for a Kusto database. It can be loaded from, or written to a cluster using the `KustoDatabaseHandler` which can be created by the `KustoDatabaseHandlerFactory`.There are several steps involved for loading a all relevant information from a kusto database into the `database` object. These are covered by different plugins, which can be configured for the `KustoDatabaseHandlerFactory`.
1010

1111
```csharp
12+
1213
var dbFactory = new KustoDatabaseHandlerFactory(sp.GetService<ILogger<KustoDatabaseHandler>>())
1314
.WithPlugin<KustoDatabasePrincipalLoader>()
1415
.WithPlugin<KustoDatabaseRetentionAndCacheLoader>()
1516
.WithPlugin<KustoTableBulkLoader>()
1617
.WithPlugin<KustoFunctionBulkLoader>()
1718
.WithPlugin<KustoMaterializedViewBulkLoader>()
1819
.WithPlugin<DatabaseCleanup>()
20+
1921
```
2022

2123

2224
For syncrhonizing it to files, the `YamlDatabaseHandler` and the `YamlDatabaseHandlerFactory` are the right tools. To prevent super large files, there are plugins that handle reading and writing functions, tables and materialized views to separate files and folders. They can be configured for the `YamlDatabaseHandlerFactory`.
2325

2426
```csharp
27+
2528
var yamlFactory = new YamlDatabaseHandlerFactory()
2629
.WithPlugin(new TablePlugin())
2730
.WithPlugin(new FunctionPlugin())
2831
.WithPlugin(new MaterializedViewsPlugin())
2932
.WithPlugin<DatabaseCleanup>();
33+
3034
```
3135

3236
Additional features can be added with custom plugins. A sample for `table groups`, where the some parts of the schema are defined once, but is applied for several tables can be found in [here](https://github.com/github/KustoSchemaToolsAction/blob/main/KustoSchemaCLI/Plugins/TableGroupPlugin.cs).

0 commit comments

Comments
 (0)