azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Issue with Invoke-AzOperationalInsightsQuery Returning Incorrect Data Types

Open hinault opened this issue 1 year ago • 1 comments

Description

I am encountering an issue with the Invoke-AzOperationalInsightsQuery command while attempting to retrieve the schema of a table. This schema is subsequently used to create a copy of the table. However, there appears to be a discrepancy in the data types returned by the command.

For columns of type GUID, the command returns String as type.

For exemple here is the schema of the source table :

image

The columns TestGuid1 and TestGuid2, which are of type GUID, are being returned as type String.

image

Thanks

Issue script & Debug output

Invoke-AzOperationalInsightsQuery -WorkspaceId MyLAWID -Query "TestDemoTable_CL | getschema | project ColumnName, ColumnType"

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.22621.3880
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.3880
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     3.0.1      Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzCont...
Script     3.2.1      Az.OperationalInsights              {Disable-AzOperationalInsightsIISLogCollection, ...

Error output

No response

hinault avatar Jul 11 '24 17:07 hinault

Can you share the debug log with us? Run $debugPreference = 'Continue' before the cmdlet to enable it.

isra-fel avatar Aug 26 '24 03:08 isra-fel

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!