dataflows-authoring-cli

Create, update, and refresh Fabric Dataflows Gen2 via CLI against Fabric REST APIs.

Updated Jul 14, 2026
One-click install
npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill dataflows-authoring-cli-9vantage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dataflows-authoring-cli
Source: https://github.com/9vantage/skills-for-fabric-clone/tree/main/plugins/fabric-authoring/skills/dataflows-authoring-cli
Command: npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill dataflows-authoring-cli-9vantage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Authoring Microsoft Fabric Dataflows Gen2 programmatically requires assembling mashup.pq and queryMetadata.json definition parts, managing connection bindings, and handling long-running operations, which is error-prone when done by hand against the REST API. ## Core Features & Use Cases - End-to-end dataflow authoring: Create dataflows, build mashup.pq + queryMetadata.json definitions, bind connections, and trigger parameterized refreshes via az rest and curl. - Preview-driven authoring loop: Validate candidate Power Query M code with executeQuery before persisting via updateDefinition, catching syntax and credential errors early. - Connection and output destination management: Discover supportedConnectionTypes, create connections, resolve ClusterId, and configure output destinations (Lakehouse, Warehouse, ADX, Azure SQL). - Use Case: You need to automate creation of a Dataflow Gen2 that pulls from a SQL source and writes to a Lakehouse table. The skill guides the agent through connection discovery, definition assembly, preview validation, and the first refresh with ApplyChangesIfNeeded. ## Quick Start Ask the AI to create a new Fabric dataflow in your workspace that loads data from your SQL database into a Lakehouse table using this skill.

Frequently Asked Questions about dataflows-authoring-cli

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

FAQPage Schema
How do I create a Fabric Dataflow Gen2 via the REST API?

Create the dataflow shell with POST /v1/workspaces/{ws}/dataflows, then save the definition via updateDefinition with three base64-encoded parts: mashup.pq, queryMetadata.json, and .platform. Bind connections by resolving the ClusterId through the Power BI gatewayClusterDatasources list endpoint.

How to preview Power Query M code before saving a dataflow?

Call the executeQuery endpoint with a top-level QueryName field and a customMashupDocument containing a full section document. The response is a raw Apache Arrow IPC stream; embedded {"Error":"..."} markers indicate source failures even when HTTP returns 200.

Why does my dataflow refresh fail after updateDefinition?

The first refresh after any definition change must include executeOption ApplyChangesIfNeeded, otherwise Fabric refreshes the previously-applied definition. Also validate that every connectionId in queryMetadata.json resolves via GET /v1/connections/{id} before refreshing.

Can I create OAuth2 connections via the Fabric connections API?

No, POST /v1/connections rejects OAuth2 credential payloads with a 400 InvalidInput error. Use an existing OAuth2 connection authored in the portal, or choose another credential type from the connector's supportedConnectionTypes such as Basic, ServicePrincipal, or WorkspaceIdentity.

What is the difference between dataflows-authoring-cli and dataflows-consumption-cli?

The authoring skill handles write-side operations: creating dataflows, saving definitions, binding connections, and triggering refreshes. The consumption skill handles read-side tasks like executing saved queries, ad-hoc read-only mashup evaluation, and reading refresh status and history.