Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Materialize storage driver package #421

Merged
merged 1 commit into from
May 16, 2024

Conversation

andresgutgon
Copy link
Contributor

@andresgutgon andresgutgon commented May 14, 2024

Describe your changes

When reading with DuckDB the parquet files from materialized queries we need a way of knowing where those queries are stored. We want to allow different ways of storing these parquet files. In this commit we start implementing the driver and the disk implementation that will be used almost always in development

Issue ticket number and link

#369

Checklist before requesting a review

  • Implement disk driver
  • Pass materialize storage to sourceManager in apps/server
  • Get materialized file from storage in Materialize connector
  • Fail when file is not in materialize storage

Copy link

changeset-bot bot commented May 14, 2024

🦋 Changeset detected

Latest commit: f847403

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 Minor
@latitude-data/server 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/materialized-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

@andresgutgon andresgutgon force-pushed the feature/materialize-storage-driver-package branch 4 times, most recently from 4fdb2b0 to 0416f49 Compare May 15, 2024 10:56
@andresgutgon andresgutgon removed the WIP label May 15, 2024
@andresgutgon andresgutgon force-pushed the feature/materialize-storage-driver-package branch 3 times, most recently from 4e63867 to 0f645b1 Compare May 16, 2024 14:18
@@ -26,6 +28,10 @@ describe('materializedRef function', async () => {
'query.sql': sql,
},
},
[MATERIALIZE_QUERIES_DIR]: {
'c669ba7574cadcfd9527e449feeb6a3fe8c23e23d0fef0893d3011c85ac88624.parquet':
Copy link
Contributor

Choose a reason for hiding this comment

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

save this custom id to a variable and use that instead

@@ -41,7 +47,46 @@ describe('materializedRef function', async () => {
sql,
},
})
expect(compiled.sql).toBe('SELECT * FROM (SELECT * FROM users)')
expect(compiled.sql).toBe(
`SELECT * FROM (read_parquet('${MATERIALIZE_QUERIES_DIR}/c669ba7574cadcfd9527e449feeb6a3fe8c23e23d0fef0893d3011c85ac88624.parquet'))`,
Copy link
Contributor

Choose a reason for hiding this comment

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

☝️ ditto here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like to have hardcoded strings in the tests. This way I can't lie to myself by setting the wrong value in a variable. Now each time the result changes for any reason this test will fail. Which is what I want

@andresgutgon andresgutgon force-pushed the feature/materialize-storage-driver-package branch from 0f645b1 to fa82bca Compare May 16, 2024 14:26
When reading with DuckDB the parquet files from materialized queries we
need a way of knowing where those queries are stored. We want to allow
different ways of storing these parquet files. In this commit we start
implementing the driver and the disk implementation that will be used
almost always in development
@andresgutgon andresgutgon force-pushed the feature/materialize-storage-driver-package branch from fa82bca to f847403 Compare May 16, 2024 14:37
@andresgutgon andresgutgon merged commit aab4a4e into canary May 16, 2024
4 checks passed
@andresgutgon andresgutgon deleted the feature/materialize-storage-driver-package branch May 16, 2024 14:48
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants