microsoft / microsoft/vscode-powerquery

[Enhancement or Issue ??] Error when using command "powerquery.extractDataflowDocument" on file already extracted

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
108
Forks
25
Avg merge
8d 22h
Merged PRs (30d)
2

Description

Not sure where that one sits. Enhancement or Issue? I'll let you decide.

We'd like to automate this command in a git pre-commit hook but the issue is that it throws an error when the JSON file has already been extracted as a .pq in the same folder.

Image

It would be nice to be able to change settings to force the command to overwrite existing files.

I would probably be able to implement some sort of error handling in our pre-commit hook but I think the command should at least ask to overwrite or cancel the command.
Another option would be to extend the setting "Powerquery > Editor: Transform Target" to this command as well but that may screw up the JSON format and make it impossible for other JSON pre-commit hooks to process the file correctly.
A setting to enable or disable automatic overwrite of .pq files when using this command could also be a viable option.

Thanks!

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

Start by locating the powerquery.extractDataflowDocument command and the existing Powerquery > Editor: Transform Target setting. Review how extraction handles an existing .pq file, then determine and document the supported overwrite, prompt, or cancel behavior. Done means repeated extraction no longer fails silently and the chosen behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.