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

chore: Update Rockset—switching out rockset for rockset-sqlalchemy #24649

Merged
merged 4 commits into from
Jul 12, 2023
Merged

chore: Update Rockset—switching out rockset for rockset-sqlalchemy #24649

merged 4 commits into from
Jul 12, 2023

Conversation

gadhagod
Copy link
Contributor

@gadhagod gadhagod commented Jul 10, 2023

chore: bump rockset
docs: update Rockset usage (include virtual instance configuration)

SUMMARY

superset used a very old version of rockset (0.8.10). The latest version is 2.0.0. However, SQLAlchemy support no longer comes with rockset and has been separated into its own package, rockset-sqlalchemy. I have updated setup.py to reference this new package. This change should be completely backward compatible.

This new package comes with the ability to target specific virtual instances through the SQLAlchemy connection URI. I have updated the docs to show this new feature.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screenshot 2023-07-10 at 11 23 55 AM

After:
Screenshot 2023-07-10 at 11 24 05 AM

TESTING INSTRUCTIONS

  1. Create a Rockset collection (you can use one of the Rockset public datasets).
  2. Start the superset server and connect to the Rockset database.
  3. Create a dataset from the collection.
  4. Test that chart creation works.
  5. Test that SQL lab works.

ADDITIONAL INFORMATION

  • Has associated issue: SQLAlchemy dialect? rockset/rockset-python-client#3
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@gadhagod gadhagod marked this pull request as ready for review July 10, 2023 21:06
@gadhagod gadhagod changed the title Update Rockset dependency chore/docs: Update Rockset dependency Jul 10, 2023
setup.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #24649 (1aa3fba) into master (38df1a8) will decrease coverage by 0.03%.
The diff coverage is 60.48%.

❗ Current head 1aa3fba differs from pull request most recent head b54716c. Consider uploading reports for the commit b54716c to get more accurate results

@@            Coverage Diff             @@
##           master   #24649      +/-   ##
==========================================
- Coverage   69.08%   69.05%   -0.03%     
==========================================
  Files        1906     1908       +2     
  Lines       74114    74173      +59     
  Branches     8155     8178      +23     
==========================================
+ Hits        51200    51219      +19     
- Misses      20795    20833      +38     
- Partials     2119     2121       +2     
Flag Coverage Δ
hive 54.12% <41.90%> (+0.19%) ⬆️
mysql 79.42% <74.68%> (+0.02%) ⬆️
postgres 79.51% <74.68%> (+0.02%) ⬆️
presto 54.02% <41.90%> (+0.19%) ⬆️
python 83.49% <78.42%> (+<0.01%) ⬆️
sqlite 78.07% <65.97%> (+0.03%) ⬆️
unit 54.81% <46.05%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...et-ui-chart-controls/src/components/labelUtils.tsx 100.00% <ø> (ø)
...plugins/legacy-plugin-chart-heatmap/src/Heatmap.js 0.00% <ø> (ø)
.../legacy-plugin-chart-heatmap/src/transformProps.js 0.00% <0.00%> (ø)
...gins/legacy-plugin-chart-world-map/src/WorldMap.js 0.00% <ø> (ø)
...egacy-plugin-chart-world-map/src/transformProps.js 0.00% <0.00%> (ø)
...rts/src/BigNumber/BigNumberTotal/transformProps.ts 0.00% <ø> (ø)
...BigNumber/BigNumberWithTrendline/transformProps.ts 48.57% <ø> (ø)
.../plugin-chart-echarts/src/Funnel/transformProps.ts 73.46% <ø> (ø)
...s/plugin-chart-echarts/src/Gauge/transformProps.ts 78.57% <ø> (ø)
...ins/plugin-chart-echarts/src/Pie/transformProps.ts 56.33% <ø> (ø)
... and 107 more

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@gadhagod gadhagod requested a review from john-bodley July 11, 2023 17:21
@john-bodley john-bodley changed the title chore/docs: Update Rockset dependency chore: Update Rockset dependency—switching out rockset for rockset-sqlalchemy Jul 11, 2023
@john-bodley john-bodley changed the title chore: Update Rockset dependency—switching out rockset for rockset-sqlalchemy chore: Update Rockset—switching out rockset for rockset-sqlalchemy Jul 11, 2023
@john-bodley
Copy link
Member

john-bodley commented Jul 11, 2023

@gadhagod would you also mind adding a line item to this alphabetically ordered (somehow Trino is in the wrong place) document?

@gadhagod
Copy link
Contributor Author

@john-bodley

| [SAP Hana](/docs/databases/hana) | `pip install hdbcli sqlalchemy-hana or pip install apache-superset[hana]` | `hana://{username}:{password}@{host}:{port}` |
| [StarRocks](/docs/databases/starrocks) | `pip install starrocks` | `starrocks://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>` |
| [Snowflake](/docs/databases/snowflake) | `pip install snowflake-sqlalchemy` | `snowflake://{user}:{password}@{account}.{region}/{database}?role={role}&warehouse={warehouse}` |
| SQLite | No additional library needed | `sqlite://` |
| [SQL Server](/docs/databases/sql-server) | `pip install pymssql` | `mssql+pymssql://` |
| [Teradata](/docs/databases/teradata) | `pip install teradatasqlalchemy` | `teradatasql://{user}:{password}@{host}` |
| [TimescaleDB](/docs/databases/timescaledb) | `pip install psycopg2` | `postgresql://<UserName>:<DBPassword>@<Database Host>:<Port>/<Database Name>` |
| [Trino](/docs/databases/trino) | `pip install trino` | `trino://{username}:{password}@{hostname}:{port}/{catalog}` |
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for making this ABC.

@rusackas rusackas merged commit ea968e4 into apache:master Jul 12, 2023
@gadhagod gadhagod mentioned this pull request Jul 12, 2023
9 tasks
@eschutho
Copy link
Member

@john-bodley or @betodealmeida is this going to be a breaking change? For people who use rockset, they'll need to change the driver that they use. Even though the driver itself is backward compatible, the import of the old driver will no longer work given the new requirements in Superset.

@eschutho eschutho added the risk:breaking-change Issues or PRs that will introduce breaking changes label Jul 12, 2023
@john-bodley
Copy link
Member

@eschutho I'm not sure. The SQLAlchemy URI is unchanged as far as I'm can tell and thus it's no more breaking than other changes which bump an eligible version of a package.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels risk:breaking-change Issues or PRs that will introduce breaking changes size/S 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants