html-data-app-runtime

Execute Malloy queries from JavaScript to build interactive HTML data applications.

95|24|Updated Sep 16, 2024
One-click install
npx skills add https://github.com/malloydata/publisher --skill html-data-app-runtime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: html-data-app-runtime
Source: https://github.com/malloydata/publisher/tree/main/skills/html-data-app-runtime
Command: npx skills add https://github.com/malloydata/publisher --skill html-data-app-runtime

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill empowers developers to write JavaScript for in-package HTML data apps, leveraging Publisher's Malloy models to execute queries, manage state, and handle results and errors.

Core Features & Use Cases

  • JavaScript Integration: Write custom JavaScript to drive data apps, utilizing Publisher.query for query execution.
  • Query Building: Construct queries based on filter state, enabling dynamic data fetching.
  • Result Handling: Manage data rendering, errors, and state changes in an app's frontend.
  • Use Case: For instance, a web dashboard could use this Skill to dynamically update charts and tables with real-time data from a Malloy model.

Quick Start

Use the html-data-app-runtime skill to execute a query against the 'carriers.malloy' model, retrieving data for the 'by_letter' view.

Frequently Asked Questions about html-data-app-runtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build interactive HTML data apps with Malloy models?

To build interactive HTML data apps with Malloy models, you write custom JavaScript to drive UI components and use Publisher.js to execute Malloy queries and manage data state. This runtime provides the framework for query execution and result handling.

What is Publisher.js used for in JavaScript data applications?

Publisher.js is used in JavaScript data applications to execute Malloy queries dynamically. It handles query building based on filter state, fetches real-time data from Malloy models, and manages the results and errors for frontend rendering.

Can I execute Malloy queries directly from frontend JavaScript?

Yes, you can execute Malloy queries directly from frontend JavaScript by utilizing the Publisher.query API. This allows your web dashboard to dynamically update charts and tables with real-time data fetched from a specified Malloy model.

Do I need JavaScript knowledge to use the html-data-app-runtime?

Yes, JavaScript knowledge is required to use the html-data-app-runtime because it relies on custom JavaScript to drive data apps. You must write frontend code to handle query execution, state management, and data rendering.

How does query building work with filter state in Malloy data apps?

Query building with filter state in Malloy data apps works by constructing dynamic queries through JavaScript based on user interactions. The framework enables fetching updated data from Malloy models and managing subsequent state changes in the app's frontend.

What is the best way to handle errors and results when executing Malloy queries?

The best way to handle errors and results when executing Malloy queries is through the html-data-app-runtime framework, which manages data rendering and error handling directly within the app's frontend JavaScript logic.