Creating runtime fields in Canvas

Hello! I'm new to Canvas and Elasticsearch SQL, and I was wondering if it's possible to create and access runtime fields through queries in Canvas, similar to how you can do so using Elasticsearch DSL?

Hey @mbhakta,

I don't believe it's possible to use runtime fields with Canvas. However, you can effectively create new fields using just SQL. Maybe that would work for your use case. For example:

filters
| essql query="SELECT CONCAT(customer_first_name, CONCAT(' ', customer_last_name)) AS full_name FROM \"kibana_sample_data_ecommerce\" LIMIT 3"
| table
| render

This creates a new field called full_name that's a combination of the first and last name.

Is that helpful?

Brian

Hi Brian,

Yes, that helps! Our use case is multiplying two fields and then sorting by those values, and it looks like it's working now. Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.