cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Genie agent hyperlink creation

koosha
Visitor

I have created a dasboard about a ticketing system, the business user use this dashboard with the genie agent integrated to this dashboard, sometimes they need to ask genie to create a table which contains the ticket id with the link of the related incident by hyperlink (exactly like the action that you can add a url in a dashboard to a visualisation), for a while I could get the result by adding an extra column to the base table as url and asking genie to show the ticket id as hyperlink in the related table comment, it was working for a while but now is not working properly. I wanted to know if there is any solid way to get this result in genie one or genie agent.

3 REPLIES 3

data_pulse
New Contributor II

@koosha 

I tested this with a small Genie Agent example using a table with:

ticket_id - display value the user should click, for example INC001.
incident_url - Actual URL for that ticket, like:

https://example.com/incidents/INC001

Returning those as separate columns did not make ticket_id clickable:

data_pulse_0-1790256241768.png

But constructing a Markdown style link did work:

SELECT
  ticket_id,
  concat('[', ticket_id, '](', incident_url, ')') AS ticket_link
FROM ticket_demo;

I saved that as an example query, using the question โ€œShow all tickets as clickable linksโ€ with above SQL and Genie rendered the ticket IDs as clickable links in the response.

data_pulse_1-1790256502674.png

So this looks like practical workaround in Genie. It appears to rely on response/Markdown rendering rather than the dashboard table Link action, so keep the actual URL as a separate source column and use an example/instruction to make Genie generate the link.

 

thanks for the suggestion but unfortunately it just works with the text but not in the tables, if you ask genie to create a list I would like to see the incidents visualised as hyperlinks.

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @koosha,

Tried replicating this in my sandbox, on a small tickets and incidents dataset in a Genie space, and here is what I observed.

When you ask Genie to show the ticket ID as a markdown link, it does put the right value in the cell. Whether the result grid displays that value as a clickable link or as the literal text `[TKT-5001](https://...)` depends on how Genie renders the response, and that rendering is best-effort rather than guaranteed behaviour. In the same space and with the same data, I got both outcomes in two runs a few minutes apart.

One run returned the ticket ID as raw text.

Ashwin_DSA_0-1790264280700.png

Another run, worded slightly differently, rendered the same markdown as a clickable link.

Ashwin_DSA_1-1790264334295.png

So the markdown approach is not wrong, and if it worked for you (and @data_pulse), that was genuine. The issue is that it is not stable. Since the rendering is not a documented contract, a workspace or product update can change it without notice, which lines up with the original report of it working and then stopping. I would not put a business facing flow on it.

For a link that renders every time, move it to the dashboard layer. In an AI/BI table visualisation you open the column settings, turn on the Link action, and point the URL template at a column holding the incident URL such as `{{ incident_url }}`, while the cell still shows the ticket id. Genie returns the data and the dashboard draws the clickable cell. This held on every refresh in my testing, and Databricks documents it under Table and pivot table visualizations.

Ashwin_DSA_2-1790264443415.png

Couple of points to note. Keep the actual URL as its own column, either computed in a view with something like `concat('https://your-itsm/incident/', incident_id) as incident_url` or already present in the source, so the link target stays clean. Define the primary and foreign keys in Unity Catalog so Genie joins tickets to incidents reliably, which is covered in Constraints on Databricks. You can register the query as an example in the space as well, described in Set up and manage a Genie space, though in my testing that changed which query Genie ran rather than whether the grid rendered the link.

If you read the results inside your own app instead of the Genie chat, pull the structured result through the Conversation API and render your own anchor from the URL column. That takes the grid rendering out of the picture.

One question so I can point you at the right fix. When it last worked, was the link showing in the live Genie chat answer or in a table pinned onto a dashboard, and did anything change around the time it stopped. If it was a pinned dashboard table, the Link action above gives you the stable version of what you already had.

 

 

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***