Skip to content

Invoke-FabricKQLCommand function needs alignments to module's pattern #163

@NowinskiK

Description

@NowinskiK

Problem description

Time to fix & adopt this function and make it great again :)
It's also a good opportunity to fix the function, as it doesn't work (log below).

Verbose logs

VERBOSE: Method: POST
VERBOSE: URI: /v1/rest/query
VERBOSE: Body of request: {
  "db": "EH-SQLDay2025",
  "csl": "let x = range x from 1 to 10 step 1; x | summarize count() by x\r\n"
}
VERBOSE: ContentType: application/json
Invoke-RestMethod: Invalid URI: The hostname could not be parsed.
VERBOSE: Result of the Query API: null
InvalidOperation: Cannot index into a null array.

Module Version

develop (0.30)

Suggested solution

  1. Use Invoke-FabricRestMethod and call it only once
  2. One of these parameters should be mandatory: KQLDatabaseName or KQLDatabaseId
  3. Fix misspelled names like $isManamgentCommand
  4. Remove Revision History
  5. Fix the bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstandardizationNo logic changes, but refactoring and alignment to module's patterns

    Type

    Projects

    Status

    📌 Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions