Skip to content

Parameters set in the clientRequestProperties are not sanitized to "dynamic" when needed #132

@johnib

Description

@johnib

Hey,

Could not find the place where the parameters are converted to their kusto types, as described here.

For example, if I specify a date parameter:

clientRequestProperties.setParameter('startTime', new Date().toISOString());

Then something in your package will wrap the value with datetime(<value>).
However, if I provide an array of values:

clientRequestProperties.setParameter('ids', [1,2,3]);

The package will not sanitize it to dynamic(<value>).

Tried looking for the actual code doing this sanitization, however I couldn't find it.

toJson() {
const json: { Options?: { [option: string]: any }, Parameters?: { [option: string]: any } } = {};
if (Object.keys(this._options).length !== 0) {
json.Options = this._options;
if (json.Options.servertimeout) {
json.Options.servertimeout = this._msToTimespan(json.Options.servertimeout);
}
}
if (Object.keys(this._parameters).length !== 0) {
json.Parameters = this._parameters;
}
return Object.keys(json).length !== 0 ? json : null;
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions