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

Run dbt on WebAssembly using Pyodide #5803

Closed
wants to merge 3 commits into from
Closed

Run dbt on WebAssembly using Pyodide #5803

wants to merge 3 commits into from

Conversation

arieldbt
Copy link

@arieldbt arieldbt commented Sep 9, 2022

Description

Changes needed to run dbt in the browser (using WebAssembly via Pyodide). For more context on the rationale see the discussion in github and our community slack. Here is a demo of the jaffle shop example project using sqlite and dbt in the browser:

https://s3.amazonaws.com/com.getdbt.cloud.wasm/index.html

To enable running dbt on WebAssembly I needed to refactor two parts of the codebase into clients since they behave differently in a browser compared to a normal operating system:

  1. HTTP requests
  2. Parallel processing

Checklist

@arieldbt arieldbt requested a review from a team as a code owner September 9, 2022 19:47
@arieldbt arieldbt requested a review from a team September 9, 2022 19:47
@arieldbt arieldbt requested review from a team as code owners September 9, 2022 19:47
@cla-bot
Copy link

cla-bot bot commented Sep 9, 2022

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, don't hesitate to ping @drewbanin.

CLA has not been signed by users: @arieldbt

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2022

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@cla-bot
Copy link

cla-bot bot commented Sep 9, 2022

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, don't hesitate to ping @drewbanin.

CLA has not been signed by users: @arieldbt

@cla-bot
Copy link

cla-bot bot commented Sep 9, 2022

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, don't hesitate to ping @drewbanin.

CLA has not been signed by users: @arieldbt

@jtcohen6
Copy link
Contributor

@cla-bot check

@cla-bot cla-bot bot added the cla:yes label Sep 12, 2022
@cla-bot
Copy link

cla-bot bot commented Sep 12, 2022

The cla-bot has been summoned, and re-checked this pull request!

@ChenyuLInx
Copy link
Contributor

@arieldbt looks great! I probably will have more time to play with it in October!

core/setup.py Outdated
Comment on lines 55 to 59
if "DBT_WASM_BUILD" in os.environ and int(os.environ["DBT_WASM_BUILD"]) == 1:
# binary dependency not supported in pyodide
pass
else:
_install_requires.insert(14, "dbt-extractor~=0.4.1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any cleaner way for us to manage this? Would this add another point of complexity that would prevent us from moving to pyproject.toml in the future? (#4674)

@gshank
Copy link
Contributor

gshank commented Sep 21, 2022

Ariel has moved on, so unless he wants to contribute to this as an external contributor...

I've run pre-commit on it, and there are a number of complaints from mypy. I didn't look closely at all of them, but I think the code in flags.py for Pyodide should probably go somewhere else at least.

@ajmarcus
Copy link

👋 - been a bit busy but happy to see if I can help with the pre-commit / code-quality checks.

Probably should have had the pre-commit hooks already set up on my machine. My bad.

@arieldbt arieldbt mentioned this pull request Oct 26, 2022
6 tasks
@jtcohen6
Copy link
Contributor

Closing in favor of #6146

@jtcohen6 jtcohen6 closed this Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants