Skip to content

Conversation

@mike-finopsorg
Copy link
Contributor

For those who need to see our example sql in a different engine type.

This helper enables you to switch the language for any sql blocks in markdown

@mike-finopsorg mike-finopsorg self-assigned this Oct 28, 2025
@mike-finopsorg mike-finopsorg requested a review from a team as a code owner October 28, 2025 20:04
@github-project-automation github-project-automation bot moved this to Submitted in FOCUS WG Oct 28, 2025
@mike-finopsorg
Copy link
Contributor Author

I will open an AI for this today and update the title

@mike-finopsorg mike-finopsorg changed the title Added transpile helper AI #1564: Added transpile helper Oct 28, 2025
@shawnalpay
Copy link
Contributor

Per our discussion yesterday, I propose leaving this out of scope for 1.3 and consider bringing it in for a future release.

@shawnalpay shawnalpay moved this from Submitted to PR Member Review in FOCUS WG Oct 29, 2025
@shawnalpay shawnalpay added this to the v1.4 milestone Oct 29, 2025
Comment on lines +31 to +45
#### Usage

```bash
# Transpile all SQL blocks in markdown files to T-SQL
./sql_transpile.py ../*.md --to tsql

# List all SQL blocks without transpiling
./sql_transpile.py ../*.md --list

# Transpile with dialect preference for detection
./sql_transpile.py ../*.md --to bigquery --prefer trino

# Process specific files
./sql_transpile.py ../file1.md ../file2.md --to postgres
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to consider:

#### Usage

##### Linux / macOS (Bash)

```bash
# List all SQL blocks without transpiling
./sql_transpile.py ../*.md --list

# Transpile all SQL blocks in markdown files to T-SQL
./sql_transpile.py ../*.md --to tsql

# Transpile with dialect preference for detection
./sql_transpile.py ../*.md --to bigquery --prefer trino

# Process specific files
./sql_transpile.py ../file1.md ../file2.md --to postgres
```

##### Windows (PowerShell)

```powershell
# List all SQL blocks without transpiling
python .\sql_transpile.py (Get-ChildItem ..\*.md).FullName --list

# Transpile all SQL blocks in markdown files to T-SQL
python .\sql_transpile.py (Get-ChildItem ..\*.md).FullName --to tsql

# Transpile with dialect preference for detection
python .\sql_transpile.py (Get-ChildItem ..\*.md).FullName --to bigquery --prefer trino

# Process specific files
python .\sql_transpile.py (Get-ChildItem ../file1.md).FullName (Get-ChildItem ../file2.md).FullName --to postgres
```

@mike-finopsorg
Copy link
Contributor Author

List of dialects is with uppercase but script only handles lowercase

Dialect Hints work out which one doesn't break GitHub and then update README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: PR Member Review

Development

Successfully merging this pull request may close these issues.

[AI] Assist readers of the supported features to transpile SQL queries to their chosen engine

4 participants