-
Notifications
You must be signed in to change notification settings - Fork 8
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
malloy-py throwing error every time #144
Comments
I was able to run this successfully (with some fixes/additions to your steps that were omitted). From the error message you're reporting it looks like the malloy-service that does compilation is not being properly spun up and reporting reachable. I would verify that you can just run malloy directly and that the malloy-service binary is not being blocked from executing. My repro steps:
mkdir proj && cd proj
python3 -m venv .venv
source .venv/bin/activate
pip install dagster
dagster project scaffold --name testmalloyp
git clone https://github.com/malloydata/malloy-samples.git
cd testmalloyp
pip install -e ".[dev]"
pip install malloy
pip install numpy
pip install pandas Updated assets.py
import malloy
import os
from pathlib import Path
from malloy.data.duckdb.duckdb_connection import DuckDbConnection
from dagster import asset, asset_check, AssetCheckResult, AssetCheckSpec, Output
async def run_mloy():
with malloy.Runtime() as runtime:
current_directory = os.path.dirname(os.path.abspath(__file__))
home_dir = Path(current_directory, '../../malloy-samples/imdb')
runtime.add_connection(DuckDbConnection(home_dir=home_dir))
return await runtime.load_file(f'{home_dir}/imdb.malloy').run(query='run: people -> { select: primaryName, birthYear }')
asst_spec = AssetCheckSpec(name="my_check", asset="asset1")
@asset(check_specs=[asst_spec])
async def asset1(context):
context.log.info(f"starting generation of asset 1")
data = await run_mloy()
dataframe = data.to_dataframe()
print(dataframe)
yield Output("asset1 output", output_name="result")
yield AssetCheckResult(passed=True, description="Asset check passed...") Run dagster
clicked on assets and then dropdown in the asset1 row and selected materialize |
What happens?
In dagster 1.9.1 (see how to reproduce below)
The following error is thrown every time
despite trying the hacky
error details
To Reproduce
Attempt the simplest example from malloy python docs
off the bat there is an error regarding conflicting versions of protobuf
moving on
# start the dagster web console to start managing assets, usually at http://127.0.0.1:3000 dagster dev
click on the 'assets' link and click 'materialize' to trigger the malloy we just wrote then check for errors
OS:
Fedora 40
Malloy Client:
Python package @ 639dc84
Malloy Client Version:
1.9.1
Database Connection:
DuckDB
The text was updated successfully, but these errors were encountered: