latitude-dev / latitude

Developer-first embedded analytics
https://latitude.so
GNU Lesser General Public License v3.0
670 stars 26 forks source link

BREAKING CHANGE: Relative queries #416

Closed andresgutgon closed 2 weeks ago

andresgutgon commented 2 weeks ago

Describe your changes

Until now we were requiring users to specify the queries in the ref function from the root of the source folder. Example:

MY_QUERIES
  - my-source
    - source.yml
    - query.sql
    - another_query.sql

Given that folder structure in query.sql

Before 🚫

-- MY_QUERIES/my-source/query.sql
SELECT * FROM {ref('my-source/another_query')}

Now βœ…

-- MY_QUERIES/my-source/query.sql
SELECT * FROM {ref('./another_query')}

Or βœ…

-- MY_QUERIES/my-source/query.sql
SELECT * FROM {ref('another_query')}

Or βœ…

-- MY_QUERIES/my-source/query.sql
SELECT * FROM {ref('/my-source/another_query')}

Issue ticket number and link

https://github.com/latitude-dev/latitude/issues/369

Dependency

https://github.com/latitude-dev/latitude/pull/414/files

TODO

changeset-bot[bot] commented 2 weeks ago

πŸ¦‹ Changeset detected

Latest commit: 8a6b394c83adf4f31bbc0482d4aa162a6315df10

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages | Name | Type | | ----------------------------------- | ----- | | @latitude-data/source-manager | Major | | @latitude-data/server | Major | | @latitude-data/sql-compiler | Patch | | @latitude-data/cli | Patch | | @latitude-data/athena-connector | Patch | | @latitude-data/bigquery-connector | Patch | | @latitude-data/clickhouse-connector | Patch | | @latitude-data/databricks-connector | Patch | | @latitude-data/duckdb-connector | Patch | | @latitude-data/mssql-connector | Patch | | @latitude-data/mysql-connector | Patch | | @latitude-data/postgresql-connector | Patch | | @latitude-data/snowflake-connector | Patch | | @latitude-data/sqlite-connector | Patch | | @latitude-data/test-connector | Patch | | @latitude-data/trino-connector | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR