Skip to main content
Version: Next

Sample Configuration File

The following is a complete example of a data client's appsettings.json file, showing a single data source with a source-specific linkage map sink, and a general receive-all linkage map sink.

{
"LinXmartDataClient": {
"ApiBaseAddress": "https://baseurl/api/v1.0/",
"ApiKey": "",
"HttpRequestTimeout": "00:05:00",
"DatabaseFilePath": "%APPDATA%\\dataclient.db",
"Proxy": {
"UseProxy": "False",
"ProxyAddress": "https://myproxy.local",
"CredentialsName": ""
},
"ClientCertificate": {
"CertificateName": "LinXmart Data Client Cert"
},
"EncryptionCertificate": {
"CertificateName": "LinXmart Data Client Encryption",
"ValidityDays": 90
},
"DataSources": [
{
"Name": "Example Data Source",
"Type": "Microsoft SQL Server",
"Properties": {
"ConnectionString": "Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=True;App=LinXmart Client; ",
"CredentialsName": "",
"Table": "dbo.TableName"
},
"Columns": [
{
"Name": "Record_Id",
"Ordinal": "1",
"Type": "Int32"
},
{
"Name": "Group_Id",
"Ordinal": "2",
"Type": "String"
},
{
"Name": "Grouping",
"Ordinal": "3",
"Type": "String"
},
{
"Name": "Given_Name",
"Ordinal": "4",
"Type": "String"
},
{
"Name": "Middle_Name",
"Ordinal": "5",
"Type": "String"
},
{
"Name": "Family_Name",
"Ordinal": "6",
"Type": "String"
},
{
"Name": "Date_Of_Birth",
"Ordinal": "7",
"Type": "String"
},
{
"Name": "Sex",
"Ordinal": "8",
"Type": "String"
},
{
"Name": "Address",
"Ordinal": "9",
"Type": "String"
},
{
"Name": "Suburb",
"Ordinal": "10",
"Type": "String"
},
{
"Name": "Postcode",
"Ordinal": "11",
"Type": "String"
},
{
"Name": "State",
"Ordinal": "12",
"Type": "Int16"
}
],
"ModifiedDateColumn": "LastModifiedOn",
"LinkageMapSink": {
"Type": "Microsoft SQL Server",
"Properties": {
"ConnectionString": "Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=True;",
"CredentialsName": "",
"Table": "ExtractionResults",
"AppendProjectCodeToTable": "True",
"CreateTableIfRequired": "True",
"DeleteExisting": "True"
},
"ColumnMapping": {
"ProjectCode": "ProjectCode",
"EventTypeCode": "EventTypeCode",
"SourceUniqueId": "SourceUniqueId",
"SourcePersonId": "SourcePersonId",
"PersonKey": "PersonKey",
"ExtractionProjectId": "ExtractionProjectId",
"LinkedProjectPersonKey": "LinkedProjectPersonKey"
}
}
}
],
"LinkageMapSink": {
"Type": "Microsoft SQL Server",
"Properties": {
"ConnectionString": "Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=True;",
"CredentialsName": "",
"Table": "AllExtractionResults",
"AppendProjectCodeToTable": "False",
"CreateTableIfRequired": "True",
"DeleteExisting": "True"
},
"ColumnMapping": {
"ProjectCode": "ProjectCode",
"EventTypeCode": "EventTypeCode",
"SourceUniqueId": "SourceUniqueId",
"SourcePersonId": "SourcePersonId",
"PersonKey": "PersonKey",
"ExtractionProjectId": "ExtractionProjectId",
"LinkedProjectPersonKey": "LinkedProjectPersonKey"
}
},
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Polly": "Error",
"Microsoft": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate": "{Timestamp:HH:mm:ss.fff} [{ThreadId}] [{Level:u4}] {SourceContext} - {Message}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/dataclient_.log",
"outputTemplate": "{Timestamp:HH:mm:ss.fff} [{ThreadId}] [{Level:u4}] {SourceContext} - {Message}{NewLine}{Exception}",
"retainedFileCountLimit": 30,
"rollOnFileSizeLimit": true,
"rollingInterval": "Day"
}
}
],
"Enrich": [ "WithThreadId" ],
"Destructure": [
{
"Name": "ToMaximumDepth",
"Args": { "maximumDestructuringDepth": 4 }
},
{
"Name": "ToMaximumStringLength",
"Args": { "maximumStringLength": 100 }
},
{
"Name": "ToMaximumCollectionCount",
"Args": { "maximumCollectionCount": 10 }
}
]
}
}
}