microsoft / microsoft/DataFactory.MCP

Query Experience - Export Query Results

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement query-experience
Dominant language
C#
Stars
42
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Issue: Add export_query_results tool

Labels: enhancement, query-experience, priority:medium

Problem: Query results are returned as JSON/Arrow in-memory only. Users who want to persist results to files (CSV, Parquet, Excel) must manually extract and transform the data outside the MCP toolset. This breaks the workflow and requires additional tooling.

Proposed Solution: Export tool that takes query results and writes them to a specified format and location.

Acceptance Criteria:

  • Tool accepts: workspaceId, dataflowId, queryName, customMashupDocument, outputFormat (csv | parquet | xlsx | json), outputPath (optional - defaults to OneLake or local download)
  • Executes query and streams results directly to file (avoids loading full dataset into memory for large exports)
  • Returns: file path/URL, row count, file size
  • Supports optional parameters: delimiter for CSV, compression for Parquet
  • For OneLake destinations: writes to user-specified Lakehouse Files section

Alternative Consideration: Could be two tools:

  1. export_query_to_file — execute + export in one call
  2. save_results_to_file — takes cached results from prior execute_query call (requires result caching mechanism)

Use Cases:

  • Ad-hoc data extracts for analysts
  • Scheduled exports via automation
  • Data handoff to systems that consume flat files

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the existing execute_query tool and its result-handling path, then resolve whether export is one tool or two and how formats, destinations, streaming, and metadata should work. Done means the agreed export behavior is implemented and verified for the specified formats and outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend-api-design, data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.