以下文章详细介绍了将 Eventstream 同步到 GitHub 或 Azure Devops 存储库后的文件结构。
文件夹结构
将工作区同步到存储库后,会看到工作区的顶级文件夹,以及已同步的每个项目的子文件夹。 每个子文件夹的格式都带有 项名称。项目类型
在事件流的文件夹内,可以看到以下文件:
- 平台:定义平台结构的值,例如显示名称和描述。
- 属性:定义项特定的值。
下面是文件夹结构的外观示例:
存储库
- 工作区 A
- Item_A.Eventstream
- 平台中添加用户。
- EventstreamProperties.json
- Item_A.Eventstream
- 工作区 B
- Item_C.Eventstream
- 平台中添加用户。
- EventstreamProperties.json
- Item_C.Eventstream
事件流文件
事件流文件夹中包含以下文件:
平台
该文件使用以下架构来定义事件流:
{ "$schema": "https://developer.microsoft.com/json-schemas/fabric/gitIntegration/platformProperties/2.0.0/schema.json", "metadata": { "type": "Eventstream", "displayName": "", "description": "" }, "config": { "version": "2.0", "logicalId": "" } }EventstreamProperties.json
该文件允许你为事件流项配置平台级设置。 下面是一个示例文件:
{ "sources": [ { "name": "AzureEventHubSource", "type": "AzureEventHub", "properties": { "dataConnectionId": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb", "consumerGroupName": "$Default", "inputSerialization": { "type": "Json", "properties": { "encoding": "UTF8" } } } }, { "name": "AzureIoTHubSource", "type": "AzureIoTHub", "properties": { "dataConnectionId": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb", "consumerGroupName": "$Default", "inputSerialization": { "type": "Json", "properties": { "encoding": "UTF8" } } } } ], "destinations": [ { "name": "CustomEndpointDestination", "type": "CustomEndpoint", "properties": {}, "inputNodes": [ { "name": "myEventstream-stream" } ] }, { "name": "LakehouseDestination", "type": "Lakehouse", "properties": { "workspaceId": "00000000-0000-0000-0000-000000000000", "itemId": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb", "schema": "dbo", "deltaTable": "deltaTable", "minimumRows": 100000, "maximumDurationInSeconds": 120, "inputSerialization": { "type": "Json", "properties": { "encoding": "UTF8" } } }, "inputNodes": [ { "name": "myEventstream-stream" } ] } ], "streams": [ { "name": "myEventstream-stream", "type": "DefaultStream", "properties": {}, "inputNodes": [ { "name": "sourceName" } ] }, { "name": "DerivedStreamName", "type": "DerivedStream", "properties": { "inputSerialization": { "type": "Json", "properties": { "encoding": "UTF8" } } }, "inputNodes": [ { "name": "FilterName" } ] } ], "operators": [ { "name": "FilterName", "type": "Filter", "inputNodes": [ { "name": "myEventstream-stream" } ], "properties": { "conditions": [ { "column": { "node": null, "columnName": "BikepointID", "columnPath": null, "expressionType": "ColumnReference" }, "operatorType": "NotEquals", "value": { "dataType": "Nvarchar(max)", "value": "0", "expressionType": "Literal" } } ] } } ], "compatibilityLevel": "1.0" }
有关包含所有类型的源、目标和运算符的完整示例,请参阅 eventstream-definition.json。