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

Save a DB_Table as a data link #11295

Closed
radeusgd opened this issue Oct 10, 2024 · 4 comments · Fixed by #11371
Closed

Save a DB_Table as a data link #11295

radeusgd opened this issue Oct 10, 2024 · 4 comments · Fixed by #11371
Assignees
Labels
-libs Libraries: New libraries to be implemented l-cloud-integration Enso Cloud integration work l-db-read Libraries: database reader

Comments

@radeusgd
Copy link
Member

Similarly to #11294, we want to be able to save a specific DB_Table as a data link.

This should create a data link that will connect to the same database and then read the query that the DB_Table.to_sql returns, and reconstruct the DB_Table view (although it will have a different underlying structure - instead of all the IR used to construct the query it will just contain the SQL code using From_Spec.Query).

This behaves essentially like storing a VIEW for the query represented by the DB_Table.

If the underlying connection does not support saving as data link (e.g. SQLite), it should raise a user-friendly error.

@radeusgd radeusgd added -libs Libraries: New libraries to be implemented l-db-read Libraries: database reader l-cloud-integration Enso Cloud integration work labels Oct 10, 2024
@enso-bot
Copy link

enso-bot bot commented Oct 18, 2024

Radosław Waśko reports a new STANDUP for yesterday (2024-10-17):

Progress: Working on saving queries. Thinking what to do with prepared statement interpolations. Implemented serialization of SQL_Statement and tests for it. Updated datalink schema. It should be finished by 2024-10-21.

Next Day: Next day I will be working on the same task. Add logic for constructing a table from SQL Statement, deserializing tables in data links. Add tests.

@enso-bot
Copy link

enso-bot bot commented Oct 21, 2024

Radosław Waśko reports a new STANDUP for the provided date (2024-10-18):

Progress: Working on constructing table from SQL and integrating that with datalinks (parsing etc.). Simplifying datalink logic to single constructor. It should be finished by 2024-10-21.

Next Day: Next day I will be working on the same task. Add tests for Postgres, update other datalinks too and enable tests.

@enso-bot
Copy link

enso-bot bot commented Oct 21, 2024

Radosław Waśko reports a new STANDUP for today (2024-10-21):

Progress: Added tests, finished implementation. Added feature detecting temporary tables in data link and warning about them. Put up the PR. It should be finished by 2024-10-21.

Next Day: Next day I will be working on the #9812 task. Switch to types work for a bit.

@enso-bot
Copy link

enso-bot bot commented Oct 23, 2024

Radosław Waśko reports a new STANDUP for yesterday (2024-10-22):

Progress: Fixing some remaining test failures on the PR. Reviews. Picking up work on types. It should be finished by 2024-10-22.

Next Day: Next day I will be working on the #9812 task. Investigate not resolved extension methods.

@mergify mergify bot closed this as completed in #11371 Oct 24, 2024
@mergify mergify bot closed this as completed in ca9df70 Oct 24, 2024
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-libs Libraries: New libraries to be implemented l-cloud-integration Enso Cloud integration work l-db-read Libraries: database reader
Projects
Status: 🟢 Accepted
Development

Successfully merging a pull request may close this issue.

2 participants