A property in the result type T of KustoQuery<T> or KustoStreamingQuery<T> is not included in the | project statement of the .kusto file.
When creating Kusto queries that return typed results, it's best practice to project all properties defined in the result contract type. If a property is defined in the contract but not projected, it will have its default value (null, 0, etc.) at runtime, which may not be the intended behavior.
This is an informational rule because missing projections don't cause runtime errors - they simply result in default values.
This rule only applies when:
- The class inherits from
KustoQuery<T>orKustoStreamingQuery<T> - The
.kustofile ends with a| projectstatement (final projection)
Either add the missing field to the projection or remove the property from the result type:
- Add the property to the
| projectstatement - Or remove the unnecessary property from the result type
// Customer.cs
public record Customer(
long CustomerKey,
string FirstName,
string LastName,
string Email); // ATCK307: 'Email' not projected// CustomersQuery.kusto
Customers
| project
CustomerKey,
FirstName,
LastName
// Email is missing - will be null at runtimeProblem: Email is defined in Customer but not projected.
// Customer.cs
public record Customer(
long CustomerKey,
string FirstName,
string LastName,
string Email);// CustomersQuery.kusto
Customers
| project
CustomerKey,
FirstName,
LastName,
EmailSuccess: All contract properties are projected.
You may suppress this warning if:
- The property intentionally uses a default value in certain scenarios
- The property is populated by a custom
ReadResultimplementation - You're deliberately using a larger contract type across multiple queries
Since this is an informational diagnostic, suppressing it is acceptable in appropriate scenarios.