NATIVE query equivalent of DRUID SQL JOIN

  • Needed a HELP regarding the native query equivalent of this SQL JOIN query:

  • SELECT “DOWHOD”, groupVsNodeId.groupId,opennms_ip_interfaces.__time, “hasFlows”, “hostName”, “id”, “ifIndex”, “ipAddress”, “isDown”, “isManaged”, “monitoredServiceCount”, opennms_ip_interfaces.nodeId, “snmpInterfaceBitsIn”, “snmpInterfaceBitsOut”, “snmpInterfaceCollect”, “snmpInterfaceCollectFlag”, “snmpInterfaceCollectionUserSpecified”, “snmpInterfaceHasFlows”, “snmpInterfaceId”, “snmpInterfaceIfAdminStatus”, “snmpInterfaceIfDescr”, “snmpInterfaceIfIndex”, “snmpInterfaceIfName”, “snmpInterfaceIfOperStatus”, “snmpInterfaceIfSpeed”, “snmpInterfaceIfType”, “snmpInterfaceLastCapsdPoll”, “snmpInterfacePhysAddr”, “snmpInterfacePoll”, “snmpInterfacePollFlag”, “snmpPrimary” FROM “opennms_ip_interfaces” INNER JOIN groupVsNodeId ON opennms_ip_interfaces.nodeId = groupVsNodeId.nodeId

  • I would be extremely grateful if you can guide

If you are running a Druid version which has web console, you can get the native query for your sql from the Query tab, write you sql query and next to “Run”, select “Explain SQL Query”, it’ll show you the native json query. Let me know if you can’t find it.