Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 23 2019 11:40
    pktippa synchronize #467
  • Jan 23 2019 11:30
    pktippa edited #467
  • Jan 23 2019 11:30
    pktippa synchronize #467
  • Jan 23 2019 09:37
    pktippa opened #467
  • Jan 23 2019 09:35
  • Jan 21 2019 16:20
  • Jan 16 2019 03:18
    alexanderfefelov commented #332
  • Jan 05 2019 05:20
    jjmontesl labeled #449
  • Jan 05 2019 05:20
    jjmontesl labeled #449
  • Jan 05 2019 05:19
    jjmontesl assigned #449
  • Jan 05 2019 05:19
    jjmontesl commented #449
  • Jan 05 2019 05:17
    jjmontesl labeled #451
  • Jan 05 2019 05:16
    jjmontesl assigned #451
  • Jan 05 2019 05:16
    jjmontesl closed #451
  • Jan 05 2019 05:16
    jjmontesl commented #451
  • Jan 05 2019 05:11
    jjmontesl milestoned #445
  • Jan 05 2019 05:11
    jjmontesl labeled #445
  • Jan 05 2019 05:10
    jjmontesl unassigned #445
  • Jan 05 2019 05:10
    jjmontesl assigned #445
  • Jan 05 2019 05:10
    jjmontesl closed #445
Vigneshrajan
@ankithvicky
@cleder the mention above model data is from sp?
Christian Ledermann
@cleder
image.png
however the sorting is rather 'abritrary'
sp? @Vkynluv
Vigneshrajan
@ankithvicky
stored procedure. instead or retrieving data from tables and view. shall we fetch data from MSSql stored procedure?
Christian Ledermann
@cleder
well it should be possible how does sqlalchemy retrieve data from a stored procedure?
I think as an alternative approach you could define a view that calls the stored procedure
Vigneshrajan
@ankithvicky
Am not using sqlalchemy. am directly using
[Store]
url : mssql+pyodbc://Username:Password@Host:Port/DbName?driver=SQL+Server+Native+Client+11.0
Christian Ledermann
@cleder
this will use sqlalchemy with the mssql driver afaik
Vigneshrajan
@ankithvicky
Now i am not using prepare data file which contains query. I am directly using model.json file contains joins.
Christian Ledermann
@cleder
I lost you here
Vigneshrajan
@ankithvicky
Where?
Christian Ledermann
@cleder
Now i am not using prepare data file which contains query. I am directly using model.json file contains joins.
Vigneshrajan
@ankithvicky
Okay. any other solutions to create model from store procedure.
You cannot call a stored proc from inside a view. It is not supported. However you can make views call other views, or table-valued user-defined functions.
Christian Ledermann
@cleder
cubes (sqlalchemy) needs a table or view to operate on, so you have to materialize the results of the sp
Vigneshrajan
@ankithvicky
have to materialize the results of the sp ? means
Christian Ledermann
@cleder
create a table with the result set
how good are your AngularJS skills?
Christian Ledermann
@cleder
also I cannot see the order by in the SQL:
DEBUG SQL(aggregation drilldown):
SELECT EXTRACT(year FROM posts_to_social.posted_at) AS "posted_at.year", EXTRACT(quarter FROM posts_to_social.posted_at) AS "posted_at.quarter", EXTRACT(month FROM posts_to_social.posted_at) AS "posted_at.month", count(posts_to_social.id) AS record_count 
FROM posts_to_social GROUP BY EXTRACT(year FROM posts_to_social.posted_at), EXTRACT(quarter FROM posts_to_social.posted_at), EXTRACT(month FROM posts_to_social.posted_at)
or the get request:
"GET /cube/posts_to_social/aggregate?drilldown=posted_at%40monthly%3Amonth HTTP/1.1"
Christian Ledermann
@cleder
cubes viewer is written with angularjs and d3js charts so to integrate amcharts you will have to rewrite it
Christian Ledermann
@cleder
OT: have you seen https://github.com/kayak/fireant looks like something to have an eye on
leowmjw
@leowmjw
My
Christian Ledermann
@cleder
I try to denormalize my cubes but the denormalize fails
slicer sql denormalize --config=slicer.ini

Error: config should be a ConfigParser instance, but is <class 'str'>
or
slicer sql denormalize slicer.ini

Error: config should be a ConfigParser instance, but is <class 'str'>
Christian Ledermann
@cleder
slicer serve runs fine
slicer serve slicer.ini
2017-07-26 17:59:16,286 DEBUG Models root set to current directory
2017-07-26 17:59:16,286 DEBUG Workspace calendar timezone: None first week day: 0
2017-07-26 17:59:16,417 DEBUG Registered store 'default'
2017-07-26 17:59:16,417 DEBUG Loading model main
2017-07-26 17:59:16,417 DEBUG Importing model from model.json. Provider: None Store: None NS: None
...
Cubes version 1.1
Michael Schwab
@schwab
@cleder on Apr 04 I asked the same question about denormalization. If you scroll back far enough on this thread, you can see the interaction I had with @Stiivi about it. His suggestions got me going. In short there is a bug in the denorm stuff and you have to edit the py code to correct for some changes that have been made. In my case I got it working but found the denorm really did almost nothing for the performance. Including better indexes in my sql model was way more effective.
Also, note that de-norm does not pre-aggregate (like the MS Analysis services product does). I had assumed that would be the effect. Instead it flattens out any joins making a single flat table of your data.
Christian Ledermann
@cleder
@schwab thanks, I do not need denormalization for performance reasons but to use the data in another tool that does not support cubes
Christian Ledermann
@cleder
@schwab Yes thats what I need it for - a single flat table :smile:
Jonathan Drake
@drakej_twitter
Is there a way to provide a measure column mapping?
Jonathan Drake
@drakej_twitter
Also can you make a PointCut using a dimension attribute other than id?
simkimsia
@simkimsia

We built a django app for product warehousing. Increasingly, the requests are for reporting such as knowing the quantity of the SKU by date etc.

I have looked at cubes. I am not sure if it's overkill to have cubes and Django at the same time. I could add new features to the django app but i was wondering if there's a better way to do this than to sprinkle a bunch of update statements in order to do aggregates that are then stored in another datatable in the postgres database.

Currently, the number of reports we are asked to do is 2. It may grow to 8.

Advice?

priti-energysavvy
@priti-energysavvy
All of my data is stored as UTC, is there a way to display it in PST instead? Postgres has an AS TIME ZONE command, but I don't know if Cubes takes advantage of it/
zejn
@zejn
@priti-energysavvy If you're using timezone aware timestamps, you can set timezone at connection time -- https://www.postgresql.org/docs/9.1/static/sql-set.html
priti-energysavvy
@priti-energysavvy
@zejn I have been looking at setting timezone that way, but don't understand where 'connection time' occurs. Is that 'create_server' ?
zejn
@zejn
@priti-energysavvy Looking at the code again it seems it's easiest if you set timezone per user using ALTER USER.
SQLAlchemy doesn't seem to have a hook when connection is created, and cubes seems to use engine directly.
priti-energysavvy
@priti-energysavvy
I ended up creating a view with datetime columns converted to the timezone I want (using AS TIME ZONE) and using the view for cubes instead of a table. It seems to work pretty well. :) Thanks for your responses!
Michael Schwab
@schwab
Is it possible to join fields from 2 tables into a single dimension? In my case I have a fact table joined to a dim table (dim_drugs), which has a column which is a FK to another lookup table (dim_drug_admin). I'd like to create a single dimension that has levels from both the dim_drugs and dim_drug_admin table such that drill downs can be performed through hierarchy information from both tables. It seems this should be possible, but I haven't seen an examples which show how this could work. Is it possible to accomplish this or is the only solution to flatten the 2 dim tables into a single one with the cross product of data from both? (assume the dim_drug and dim_drug_admin tables are join on a unique id for instance)
Michael Schwab
@schwab
Found a way to do this, for those who see it later. Under the schema's discussion in the docs there is a small section on Mappings. These allow columns to be combined from other tables into a single dimension. Works well.
Michael Schwab
@schwab
Is it possible for slicer to filter the results based on the value of an aggregate? In my case I'd like only to return the rows where record_count is greater than a value. I've tried expressing this in the cut and in the aggregation clause but neither seem to work. Is this even possible it must it be done only in post processing?
Stanislav Petrenko
@spetrenk
Hi guys, I’m new to this package and I’m looking to explore some of its functionality. I wanted to know if it’s possible to query and existing OLAP cube using an MSOLAP engine with this package?
KBA
@KhaledTo
Hi @spetrenk, to me it would make sens to use cubes with a SQL Server database but not really with SSAS. But I'm not sure if I got your question correctly.