ashish10alex / vscode-dataform-tools

Dataform tools - a vscode extension
https://marketplace.visualstudio.com/items?itemName=ashishalex.dataform-lsp-vscode
MIT License
20 stars 4 forks source link

Incorrect files compiled, run when using ${ref("...", "...")} references #25

Closed langabi closed 2 months ago

langabi commented 2 months ago

Our repository has multiple instances of the same table name (e.g., fact_order) in different datasets (named after legal entities). We use ${ref("...", "...")} syntax to declare dependencies, and schema: "...", lines in the config {} block at the top of each transformation.

Dataform tools is frequently acting on the wrong file, for example:

I'm not sure how it's choosing which version to use, looks plausibly alphabetical.

Thanks for a great tool otherwise!

ashish10alex commented 2 months ago

Hi @langabi Thanks for creating the issue. The issue with possibly wrong file being ran/compiled when there are multiple files with same table names but different dataset might be originating from the logic on how I was verifying which file to run / compile. I have shipped a fix for the issue in the recent release v0.0.52.

Please let me know if it works for you :)

langabi commented 2 months ago

This is amazing! I was just busy creating a test case to help you debug this issue, and you've already solved it! Seems to be working fine now, thanks so much!