We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from sqlalchemy import create_engine from cubes.tutorial.sql import create_table_from_csv
engine = create_engine('sqlite:///data.sqlite')
create_table_from_csv(engine, "data.csv", table_name="irbd_balance", fields=[ ("category", "string"), ("category_label", "string"), ("subcategory", "string"), ("subcategory_label", "string"), ("line_item", "string"), ("year", "integer"), ("amount", "integer")], create_id=True )
from cubes import Workspace
workspace = Workspace() workspace.register_default_store("sql", url="sqlite:///data.sqlite")
workspace.import_model("model.json") browser = workspace.browser("irbd_balance")
result = browser.aggregate()
result.summary["record_count"]
result.summary["amount_sum"]
cell = result.cell
result = browser.aggregate(cell, drilldown=["year"]) for record in result.drilldown: print(record)
The text was updated successfully, but these errors were encountered:
If you hit this problem on a fresh install then I suggest a downgrade of SQLAlchemy to minimum supported version to fix: 0.7.4
If using pip:
pip uninstall sqlalchemy pip install sqlalchemy==0.7.4
Other versions may work, but I went straight to the version that I know does work.
Sorry, something went wrong.
No branches or pull requests
from sqlalchemy import create_engine
from cubes.tutorial.sql import create_table_from_csv
engine = create_engine('sqlite:///data.sqlite')
create_table_from_csv(engine,
"data.csv",
table_name="irbd_balance",
fields=[
("category", "string"),
("category_label", "string"),
("subcategory", "string"),
("subcategory_label", "string"),
("line_item", "string"),
("year", "integer"),
("amount", "integer")],
create_id=True )
from cubes import Workspace
workspace = Workspace()
workspace.register_default_store("sql", url="sqlite:///data.sqlite")
workspace.import_model("model.json")
browser = workspace.browser("irbd_balance")
result = browser.aggregate()
result.summary["record_count"]
result.summary["amount_sum"]
cell = result.cell
result = browser.aggregate(cell, drilldown=["year"])
for record in result.drilldown:
print(record)
The text was updated successfully, but these errors were encountered: