DeepLcom / sql-mock

A Python library to test your SQL models using mocked input data
MIT License
34 stars 5 forks source link

Use sqlglot to replace table reference #21

Closed Somtom closed 10 months ago

Somtom commented 10 months ago

Problem

So far we have been using string replacement to replace the table references in the original query. This can lead to unexpected behaviour and reduces our flexibility for future enhancements (e.g. checking whether all table references have actually been replaced).

What changed

We use sqlglot now to replace the table references.