none
Can we join using property under CustomDimensions? RRS feed

  • Question

  • requests
    | where operation_Name  == "SetupWorkflow" or operation_Name  == "MoonWorkflow" | project customDimensions.JobId, timestamp, name, success
    | join (customEvents |  where name == 'CodePackage' and customDimensions.FriendlyName == 'ExtractNewsArticles' and timestamp <= now() and timestamp  >= now(-7d) | project customDimensions.JobId) on customDimensions.JobId

    I get

    Syntax Error
    join attributes may be only column entity or equality expressions. Please provide the following information when contacting the Kusto team: ClientRequestId='3972e622-48ab-4921-be35-0b5a69bdda5f', ActivityId='180873d1-e046-4b01-91be-eaab1e370193 Support request id: 4ce55d5b-5582-49a7-9815-8d8e641619d6

    Am I missing anything here? Please let me know if you need more details to help investigate this issue.

    Thanks

    Wednesday, July 27, 2016 7:46 PM

Answers

  • customDimensions are of type object and you have to use casting. So in your case I used a new column, JobId, which get the value of tostring(customDimensions.JobId)

    requests
    | where operation_Name  == "SetupWorkflow" or operation_Name  == "MoonWorkflow" 
    | project JobId= tostring(customDimensions.JobId), timestamp, name, success 
    | join (
        customEvents 
        |  where name == 'CodePackage' and customDimensions.FriendlyName == 'ExtractNewsArticles' and timestamp <= now() and timestamp  >= now(-7d) 
        | project JobId= tostring(customDimensions.JobId)) on JobId

    Best practice would be to first filter by the time range, in both tables. So you's better add timestamp  >= now(-7d) also to the request table. 

    • Marked as answer by Sharanc Wednesday, July 27, 2016 9:00 PM
    Wednesday, July 27, 2016 8:35 PM
  • Sure. Thanks Dan.
    Wednesday, July 27, 2016 9:00 PM

All replies

  • customDimensions are of type object and you have to use casting. So in your case I used a new column, JobId, which get the value of tostring(customDimensions.JobId)

    requests
    | where operation_Name  == "SetupWorkflow" or operation_Name  == "MoonWorkflow" 
    | project JobId= tostring(customDimensions.JobId), timestamp, name, success 
    | join (
        customEvents 
        |  where name == 'CodePackage' and customDimensions.FriendlyName == 'ExtractNewsArticles' and timestamp <= now() and timestamp  >= now(-7d) 
        | project JobId= tostring(customDimensions.JobId)) on JobId

    Best practice would be to first filter by the time range, in both tables. So you's better add timestamp  >= now(-7d) also to the request table. 

    • Marked as answer by Sharanc Wednesday, July 27, 2016 9:00 PM
    Wednesday, July 27, 2016 8:35 PM
  • Sure. Thanks Dan.
    Wednesday, July 27, 2016 9:00 PM