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

Fix blueprint #503

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cubes/server/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import traceback
from collections import OrderedDict

from flask import Blueprint, Response, request, g, current_app, safe_join, make_response
from flask import Blueprint, Response, request, g, current_app
from flask import render_template, redirect

from ..workspace import Workspace, SLICER_INFO_KEYS
Expand Down
10 changes: 8 additions & 2 deletions examples/hello_world/prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@

from sqlalchemy import create_engine
from cubes.tutorial.sql import create_table_from_csv
from pathlib import Path


cur_folder = Path(__file__).parent
csv_path = cur_folder / 'data.csv'
sqlite_path = cur_folder / 'data.sqlite'

# 1. Prepare SQL data in memory

FACT_TABLE = "irbd_balance"

print("preparing data...")

engine = create_engine('sqlite:///data.sqlite')
engine = create_engine(f'sqlite:///{sqlite_path}')

create_table_from_csv(engine,
"data.csv",
str(csv_path),
table_name=FACT_TABLE,
fields=[
("category", "string"),
Expand Down