[GitHub] NaukhaizAhmad opened a new issue #3535: Marking slices/dashboards as Favorite ?

2017-09-26 Thread git
NaukhaizAhmad opened a new issue #3535: Marking slices/dashboards as Favorite ?
URL: https://github.com/apache/incubator-superset/issues/3535
 
 
   What's the purpose behind marking the dashboard/slice as favorite?
   Where can i use this information? From where i can get the list of all my 
favorites dashboard/slice?
   Is there any way to view the said information. I guess this information 
should be available, if not.
   
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] apmfifty commented on issue #2442: [vis] How to select the stack order for time series data?

2017-09-26 Thread git
apmfifty commented on issue #2442: [vis] How to select the stack order for time 
series data?
URL: 
https://github.com/apache/incubator-superset/issues/2442#issuecomment-332403452
 
 
   Hi mistercrunch,is there any plan to support the function to sort by legend?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] iclouding commented on issue #2170: database????hive???

2017-09-26 Thread git
iclouding commented on issue #2170: databasehive???
URL: 
https://github.com/apache/incubator-superset/issues/2170#issuecomment-332391105
 
 
   @asdf2014 ?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asdf2014 commented on issue #2170: database????hive???

2017-09-26 Thread git
asdf2014 commented on issue #2170: databasehive???
URL: 
https://github.com/apache/incubator-superset/issues/2170#issuecomment-332391293
 
 
   Sure.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asdf2014 commented on issue #2170: database????hive???

2017-09-26 Thread git
asdf2014 commented on issue #2170: databasehive???
URL: 
https://github.com/apache/incubator-superset/issues/2170#issuecomment-332389254
 
 
   ???hive? (??)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] iclouding commented on issue #2170: database????hive???

2017-09-26 Thread git
iclouding commented on issue #2170: databasehive???
URL: 
https://github.com/apache/incubator-superset/issues/2170#issuecomment-332388781
 
 
   @yixinyiyide 
??python???2.7.9url?`hive://hive@172.31.3.123:1/default?auth=NOSASL`??`ERROR:{"error":"Connection
 failed!\n\nThe error massage returned was:\nTSocket read 0 bytes"}`?
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] timifasubaa opened a new pull request #3534: Explore update button labels

2017-09-26 Thread git
timifasubaa opened a new pull request #3534: Explore  update button labels
URL: https://github.com/apache/incubator-superset/pull/3534
 
 
   It's not really clear from the button names the difference between both 
buttons. 
   @mistercrunch 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] timifasubaa commented on issue #3526: [explore] fix cached tooltip

2017-09-26 Thread git
timifasubaa commented on issue #3526: [explore] fix cached tooltip
URL: 
https://github.com/apache/incubator-superset/pull/3526#issuecomment-332371606
 
 
   LGTM
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: Annotations and Overlays

2017-09-26 Thread Fabian Menges
Bringing this conversation to the mailing list,

for reference: https://github.com/apache/incubator-superset/pull/3521 and
https://github.com/apache/incubator-superset/pull/3518

Maxime wrote the quoted text, I'll respond inline:

so I'm a little confused of the distinction between 'slice-defined' and
'data-based'. The only annotation type I implemented that is not pulling
data from a database using a superset "slice" as a means to query data is
"Formula". Formulas are evaluated client side.

> we may need to talk to sync up about annotations, we all really like the
> work that you've done and do want to support the stuff you added:
>
>- slice-defined formulas
>
>
>- slice-defined vertical lines
>
> The *vertical lines are data-based from slices *only** right now (since
vertical lines are not functions), I can obviously add another vertical
line annotation type that you can specify through the UI, but that should
be stored in your annotations table in
https://github.com/apache/incubator-superset/pull/3521/files#diff-42109fa9f588a4bcfbf015e5383a7f7d
(Superset-managed
Annotation Layers). I still believe that is the only legitimate use case
for that table since "annotation" data from any other source should be
directly read from that source and not copied to a table within the
superset DB first.
Obviously I can't prevent you from loading data into that table that
originates from somewhere else but I think it is a bad idea ;P


>- data-based annotations, using a specific slice-types with the right
>constraints and guarantees, reusable across slices
>
> I don't see a good reason for limiting the slice types much. Obviously we
should limit the slices that you can choose from in the UI to derivations
of line chart and table with time series. We will probably just end up with
a copy of the table and the line chart slice if we create new slice types
for that.
The format for the data coming from the server side is already standardized
since the client side needs to be able to handle it no matter what. I might
need to add logic to the "Annotation Layer" dialog so you can pick the time
column and pass down some parameters, but on the backend I have that
already working.
An example for not adding too many constrains would be: If you look at my
video Events  the "LOL" annotations (end of
the video) don't contain any metrics, while "Lots of Crhistophers"
annotation does.


> Throw in:
>
>- slice-defined data points (X/Y) annotations using
>http://d3-annotation.susielu.com/
>
> Again I think these should be data-based from slices. If you want to
create such annotations through the UI they should be stored in the
annotations table you are proposing (Superset-managed Annotation Layers),
that table would require a Y value column then. The data-based
implementation I should be able to add in a few minutes.

On top of this PR, which I would describe as:
>
>- Superset-managed Annotation Layers, to be renamed "Time Annotation
>Layers" to clarify, these are highly re-usage across slices.
>
> All this should be composable.
> I'd like to break down 1-2-3 from 4 potentially, though if we can agree on
> the vision we could make your current PR evolve into 1-2-4 combo. That's a
> pretty massive feature set though.


Could you specify what 1-2-3 and 4 are ?

Thanks,

Fabian

On Tue, Sep 26, 2017 at 12:33 PM, Fabian Menges  wrote:

> Just to close the loop, I just created some videos for how my annotations
> work:
>
> Events: https://youtu.be/My6ScXyAxIY
> Time Series: https://youtu.be/EQm7Kk1D1Cw
> Formulas: https://youtu.be/vBSaUNxLE0c
>
> I'll probably need another few days to clean up and expose a couple more
> features in the UI.
> I think it does make sense for me to integrate your annotations
> implementation, e.g. as an additional type.
>
> Fabian
>
>
>
> On Sat, Sep 23, 2017 at 2:15 PM, Fabian Menges 
> wrote:
>
>> Ok, I think we are solving two different but related problems.
>>
>> From your DB data model it looks like you will give users the ability to
>> add annotations through the UI.
>>
>> My work enables users to overlay data from other datasources, like
>> annotations, onto line charts. I think both of these are complementary.
>>
>> I'm happy to take on the UI work for both of these use cases if you are
>> fine with that.
>> Let me know how you envisioned the user experience for adding annotations
>> and I'm happy to give it shot.
>>
>> Fabian
>>
>> On Sat, Sep 23, 2017 at 1:39 PM, Fabian Menges 
>> wrote:
>>
>>> Nice, I'm almost done with my implementation and it looks like our stuff
>>> is compatible and we haven't done much duplicate work
>>>
>>> I didn't really do anything server side, check out my code that add a
>>> annotation layer to the d3.svg...
>>>
>>> https://github.com/apache/incubator-superset/pull/3518/files
>>>
>>> Let me know what you think.
>>>
>>> On Sat, Sep 23, 2017 at 

[GitHub] mistercrunch closed pull request #3355: [WiP] attempting optional support for Preact

2017-09-26 Thread git
mistercrunch closed pull request #3355: [WiP] attempting optional support for 
Preact
URL: https://github.com/apache/incubator-superset/pull/3355
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch closed pull request #3531: [style] no bold on dashboard widget headers

2017-09-26 Thread git
mistercrunch closed pull request #3531: [style] no bold on dashboard widget 
headers
URL: https://github.com/apache/incubator-superset/pull/3531
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch closed pull request #3532: Break word on InfoTooltip

2017-09-26 Thread git
mistercrunch closed pull request #3532: Break word on InfoTooltip
URL: https://github.com/apache/incubator-superset/pull/3532
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on issue #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on issue #3521: Time Series Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#issuecomment-332358147
 
 
   Lets move this to the dev mailing list...
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141203536
 
 

 ##
 File path: superset/viz.py
 ##
 @@ -57,6 +57,7 @@ def __init__(self, datasource, form_data):
 'token', 'token_' + uuid.uuid4().hex[:8])
 self.metrics = self.form_data.get('metrics') or []
 self.groupby = self.form_data.get('groupby') or []
+self.annotation_layers = []
 
 Review comment:
   
https://github.com/apache/incubator-superset/pull/3518/commits/34ec8b35a8eca6a6cef070387aa1c19bd4a972a1#diff-a85def8afdc240ac598637a26a7cdbbc
 I probably clean this up a bit more, but this makes all http requests in 
parallel. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch closed pull request #3473: Feature: Paired t-test table visualization

2017-09-26 Thread git
mistercrunch closed pull request #3473: Feature: Paired t-test table 
visualization
URL: https://github.com/apache/incubator-superset/pull/3473
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] michellethomas commented on issue #3532: Break word on InfoTooltip

2017-09-26 Thread git
michellethomas commented on issue #3532: Break word on InfoTooltip
URL: 
https://github.com/apache/incubator-superset/pull/3532#issuecomment-332347673
 
 
   Interesting, thanks for the information. I had heard that defining a 
function when passing it through as a prop could have performance implications, 
but didn't know it applied to objects as well.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #3532: Break word on InfoTooltip

2017-09-26 Thread git
coveralls commented on issue #3532: Break word on InfoTooltip
URL: 
https://github.com/apache/incubator-superset/pull/3532#issuecomment-332344126
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/13444521/badge)](https://coveralls.io/builds/13444521)
   
   Coverage remained the same at 69.927% when pulling 
**bd100ff361c4131991e8aaafd006f16b8148b6f2 on 
michellethomas:tooltip_wrap_word** into 
**7d934e7246dd9a239d1197623a6b4a986f0a69fd on apache:master**.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #3532: Break word on InfoTooltip

2017-09-26 Thread git
coveralls commented on issue #3532: Break word on InfoTooltip
URL: 
https://github.com/apache/incubator-superset/pull/3532#issuecomment-332336899
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/13444058/badge)](https://coveralls.io/builds/13444058)
   
   Coverage remained the same at 69.927% when pulling 
**462a489c06abe4f6a69b3d6f48324b3fc1b8a313 on 
michellethomas:tooltip_wrap_word** into 
**7d934e7246dd9a239d1197623a6b4a986f0a69fd on apache:master**.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #3532: Break word on InfoTooltip

2017-09-26 Thread git
coveralls commented on issue #3532: Break word on InfoTooltip
URL: 
https://github.com/apache/incubator-superset/pull/3532#issuecomment-332336898
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/13444058/badge)](https://coveralls.io/builds/13444058)
   
   Coverage remained the same at 69.927% when pulling 
**462a489c06abe4f6a69b3d6f48324b3fc1b8a313 on 
michellethomas:tooltip_wrap_word** into 
**7d934e7246dd9a239d1197623a6b4a986f0a69fd on apache:master**.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on issue #3521: Time Series Annotation Layers

2017-09-26 Thread git
mistercrunch commented on issue #3521: Time Series Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#issuecomment-332332133
 
 
   @fabianmenges we may need to talk to sync up about annotations, we all 
really  like the work that you've done and do want to support the stuff you 
added:
   * slice-defined formulas
   * slice-defined vertical lines
   * slice-defined data points (X/Y) annotations using 
http://d3-annotation.susielu.com/
   * data-based annotations, using a specific slice-types with the right 
constraints and guarantees, reusable across slices
   
   On top of this PR, which I would describe as:
   * Superset-managed Annotation Layers, to be renamed "Time Annotation Layers" 
to clarify, these are highly re-usage across slices.
   
   All this should be composable.
   
   I'd like to break down 1-2-3 from 4 potentially, though if we can agree on 
the vision we could make your current PR evolve into 1-2-4 combo. That's a 
pretty massive feature set though.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on issue #3521: Time Series Annotation Layers

2017-09-26 Thread git
mistercrunch commented on issue #3521: Time Series Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#issuecomment-332332133
 
 
   @fabianmenges we may need to talk to sync up about annotations, we all 
really  like the work that you've done and do want to support the stuff you 
added:
   * slice-defined formulas
   * slice-defined vertical lines
   * data-based annotations, using a specific slice-types with the right 
constraints and guarantees, reusable across slices
   
   Throw in:
   * slice-defined data points (X/Y) annotations using 
http://d3-annotation.susielu.com/
   
   On top of this PR, which I would describe as:
   * Superset-managed Annotation Layers, to be renamed "Time Annotation Layers" 
to clarify, these are highly re-usage across slices.
   
   All this should be composable.
   
   I'd like to break down 1-2-3 from 4 potentially, though if we can agree on 
the vision we could make your current PR evolve into 1-2-4 combo. That's a 
pretty massive feature set though.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
mistercrunch commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141178274
 
 

 ##
 File path: superset/views/annotations.py
 ##
 @@ -0,0 +1,59 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from flask_babel import gettext as __
+from flask_appbuilder.models.sqla.interface import SQLAInterface
+
+from superset.models.annotations import Annotation, AnnotationLayer
+from superset import appbuilder
+from .base import SupersetModelView, DeleteMixin
+
+
+class AnnotationModelView(SupersetModelView, DeleteMixin):  # noqa
 
 Review comment:
   Yeah it's at the frontier of data/metadata, though to me annotations are 
closer to metadata.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141160852
 
 

 ##
 File path: superset/views/annotations.py
 ##
 @@ -0,0 +1,59 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from flask_babel import gettext as __
+from flask_appbuilder.models.sqla.interface import SQLAInterface
+
+from superset.models.annotations import Annotation, AnnotationLayer
+from superset import appbuilder
+from .base import SupersetModelView, DeleteMixin
+
+
+class AnnotationModelView(SupersetModelView, DeleteMixin):  # noqa
 
 Review comment:
   I don't think that this table should be part of the Superset DB then. The 
way Superset is currently designed is that it is agnostic (as long as there is 
a Druid/SQL connector) to where the data is stored. We have a clean separation 
of meta data (slice definition, configuration, users, ...) and the data that 
superset is operating on.
   This table inverses this fundamentally and now we have to store presentation 
data directly inside of the superset db. Currently no time series data is 
stored inside of the superset database. I'm also worried that this will cause 
scalability issues. Now my superset meta database is going to have very 
different performance requirements with regard to querying time series.
   
   If this table was only used for manually created data from a user interface 
you could make the argument that we are talking about a very limited amount of 
data which originated in superset and therefore should be stored there. But 
this seems not to be the case.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on issue #3521: Time Series Annotation Layers

2017-09-26 Thread git
mistercrunch commented on issue #3521: Time Series Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#issuecomment-332304918
 
 
   @fabianmenges going to comment on your PR to think holistically about 
annotations. We spoke about your approach internally and think it's very 
complementary and would love to integrate all this.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
mistercrunch commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141154456
 
 

 ##
 File path: superset/views/annotations.py
 ##
 @@ -0,0 +1,59 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from flask_babel import gettext as __
+from flask_appbuilder.models.sqla.interface import SQLAInterface
+
+from superset.models.annotations import Annotation, AnnotationLayer
+from superset import appbuilder
+from .base import SupersetModelView, DeleteMixin
+
+
+class AnnotationModelView(SupersetModelView, DeleteMixin):  # noqa
 
 Review comment:
   This feature ships with a CRUD that allows users to manually input/manage 
layers. FAB also exposes a CURD REST API to maintain those programmatically, 
though I'm thinking at Airbnb most likely people will write Airflow jobs 
talking to our MySQL instance to load annotations dynamically.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
mistercrunch commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141154456
 
 

 ##
 File path: superset/views/annotations.py
 ##
 @@ -0,0 +1,59 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from flask_babel import gettext as __
+from flask_appbuilder.models.sqla.interface import SQLAInterface
+
+from superset.models.annotations import Annotation, AnnotationLayer
+from superset import appbuilder
+from .base import SupersetModelView, DeleteMixin
+
+
+class AnnotationModelView(SupersetModelView, DeleteMixin):  # noqa
 
 Review comment:
   This feature ships with the FAB CRUD UI that allows users to manually 
input/manage layers. FAB also exposes a CURD REST API to maintain those 
programmatically, though I'm thinking at Airbnb most likely people will write 
Airflow jobs talking to our MySQL instance to load annotations dynamically.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
mistercrunch commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141153987
 
 

 ##
 File path: superset/viz.py
 ##
 @@ -57,6 +57,7 @@ def __init__(self, datasource, form_data):
 'token', 'token_' + uuid.uuid4().hex[:8])
 self.metrics = self.form_data.get('metrics') or []
 self.groupby = self.form_data.get('groupby') or []
+self.annotation_layers = []
 
 Review comment:
   Here we decided to package the annotations from the backend along with the 
data payload. The visualizations' render method can then assume that all of the 
data + annotations + context is present when rendering. Note that the 
annotation query is fully indexed and should take milliseconds assuming a 
small-ish number of annotations for the time range.
   
   I feel like if we wanted to go async on the annotations, we'd need to change 
the visualization's API to define 2 different methods and somehow guarantee to 
call the annotation one second. It makes things much more complicated on that 
side of things.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joshwalters commented on issue #3520: Druid metrics are not automatically detected in Superset

2017-09-26 Thread git
joshwalters commented on issue #3520: Druid metrics are not automatically 
detected in Superset
URL: 
https://github.com/apache/incubator-superset/issues/3520#issuecomment-332301513
 
 
   This has been fixed for newer versions of Superset, metrics columns should 
(mostly) auto-populate.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] pajachiet commented on issue #3059: Cannot create sankey diagrams with more than two source/target dimensions

2017-09-26 Thread git
pajachiet commented on issue #3059: Cannot create sankey diagrams with more 
than two source/target dimensions
URL: 
https://github.com/apache/incubator-superset/issues/3059#issuecomment-332296194
 
 
   I encounter the same need, which is to do a Sankey Diagram from multiple 
source/target pairs in the same table. This is natural when "columns" that 
appear in the sankey diagram correspond to columns in a table. 
   
   In SQL, it can be done with UNION, but it is cumberome. Even more if you 
want to base other visualizations on the same datasource, as you have to 
dupplicate rows informations.
   
   For example if we want to represent how towns population regroup into states 
and countries, with a table ('country', 'state', 'town', 'population'), we 
would do
   ```
   SELECT
   town as source, state as target, 
   country, state, town, population
   FROM your_table
   UNION
   SELECT 
  state as source, country as target, 
  country, state, town, population
   FROM your_table
   ```
   
   Would it be possible to do this union directly in the query generated for 
the visualization ?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #3532: Break word on InfoTooltip

2017-09-26 Thread git
coveralls commented on issue #3532: Break word on InfoTooltip
URL: 
https://github.com/apache/incubator-superset/pull/3532#issuecomment-332294346
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/13441329/badge)](https://coveralls.io/builds/13441329)
   
   Coverage remained the same at 69.927% when pulling 
**2b2ca8bb31e8ea8b2ab76d20b3f56fe7ac2ce351 on 
michellethomas:tooltip_wrap_word** into 
**7d934e7246dd9a239d1197623a6b4a986f0a69fd on apache:master**.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] michellethomas opened a new pull request #3532: Break word on InfoTooltip

2017-09-26 Thread git
michellethomas opened a new pull request #3532: Break word on InfoTooltip
URL: https://github.com/apache/incubator-superset/pull/3532
 
 
   Someone on slack mentioned that the text was getting cut off for the 
expression tooltip. Because it's one long string with no word breaks, the 
expression text gets cut off. I'm proposing adding `wordWrap: 'break-word'` to 
the InfoTooltipWithTrigger so that the text will wrap.
   
   If you don't think this should be the default behavior for all tooltips, I 
can change it to pass the styles in.
   
   It [looks like](https://github.com/twbs/bootstrap/issues/19315) there's no 
bootstrap class for `break-word`. If there's a better way to add specific 
styles in, let me know.
   
   Before:
   
![image](https://user-images.githubusercontent.com/817955/30876079-5d35254e-a2aa-11e7-98e8-965f9b543d99.png)
   After:
   
![image](https://user-images.githubusercontent.com/817955/30876086-65e7603a-a2aa-11e7-8f9a-10bd89924605.png)
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Mogball commented on a change in pull request #3530: Feature: memoized get_sqla_engine and some others

2017-09-26 Thread git
Mogball commented on a change in pull request #3530: Feature: memoized 
get_sqla_engine and some others
URL: 
https://github.com/apache/incubator-superset/pull/3530#discussion_r141121198
 
 

 ##
 File path: superset/models/core.py
 ##
 @@ -590,6 +590,8 @@ def set_sqlalchemy_uri(self, uri):
 conn.password = password_mask if conn.password else None
 self.sqlalchemy_uri = str(conn)  # hides the password
 
+@utils.memoized(
 
 Review comment:
   That's what I thought as well, but without `watch` a good number of unit 
tests were failing/in error. Though it might just be the tests modifying 
attributes instead of creating new objects to set up the tests.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Mogball commented on a change in pull request #3530: Feature: memoized get_sqla_engine and some others

2017-09-26 Thread git
Mogball commented on a change in pull request #3530: Feature: memoized 
get_sqla_engine and some others
URL: 
https://github.com/apache/incubator-superset/pull/3530#discussion_r141121198
 
 

 ##
 File path: superset/models/core.py
 ##
 @@ -590,6 +590,8 @@ def set_sqlalchemy_uri(self, uri):
 conn.password = password_mask if conn.password else None
 self.sqlalchemy_uri = str(conn)  # hides the password
 
+@utils.memoized(
 
 Review comment:
   That's what I thought as well, but without `watch` a good number of unit 
tests were failing/in error. Those are probably changing attributes to set up 
the tests instead of creating new objects.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: React, Apache and Superset!

2017-09-26 Thread Jeff Feng
Very exciting indeed!  We can focus on delivering great features again.

On Tue, Sep 26, 2017 at 9:47 AM, Ashutosh Chauhan 
wrote:

> This indeed is a great news.
>
> Ashutosh
>
> On Mon, Sep 25, 2017 at 10:39 PM, Maxime Beauchemin <
> maximebeauche...@gmail.com> wrote:
>
> > Superset community,
> >
> > As you know, Superset was in limbo at the Apache Software foundation
> > because of the [unapproved] patents clause in attached to the React
> > license.
> >
> > Now that FB has committed to release the next version of React (16)
> under a
> > vanilla MIT license
> >  > relicensing-react-jest-flow-and-immutable-js/>,
> > Superset can flourish at the ASF.
> >
> > We're planning on crafting our first Apache release soon after React 16
> > gets released.
> >
> > After all the uncertainty and doubt, it's great to see the sky clear up
> and
> > be able to focus on writing great software!
> >
> > Max
> >
>



-- 

*Jeff Feng*
Product Manager
m: (949)-610-5108
twitter: @jtfeng


Re: React, Apache and Superset!

2017-09-26 Thread Ashutosh Chauhan
This indeed is a great news.

Ashutosh

On Mon, Sep 25, 2017 at 10:39 PM, Maxime Beauchemin <
maximebeauche...@gmail.com> wrote:

> Superset community,
>
> As you know, Superset was in limbo at the Apache Software foundation
> because of the [unapproved] patents clause in attached to the React
> license.
>
> Now that FB has committed to release the next version of React (16) under a
> vanilla MIT license
>  relicensing-react-jest-flow-and-immutable-js/>,
> Superset can flourish at the ASF.
>
> We're planning on crafting our first Apache release soon after React 16
> gets released.
>
> After all the uncertainty and doubt, it's great to see the sky clear up and
> be able to focus on writing great software!
>
> Max
>


Re: Annotations and Overlays

2017-09-26 Thread Fabian Menges
Just to close the loop, I just created some videos for how my annotations
work:

Events: https://youtu.be/My6ScXyAxIY
Time Series: https://youtu.be/EQm7Kk1D1Cw
Formulas: https://youtu.be/vBSaUNxLE0c

I'll probably need another few days to clean up and expose a couple more
features in the UI.
I think it does make sense for me to integrate your annotations
implementation, e.g. as an additional type.

Fabian



On Sat, Sep 23, 2017 at 2:15 PM, Fabian Menges  wrote:

> Ok, I think we are solving two different but related problems.
>
> From your DB data model it looks like you will give users the ability to
> add annotations through the UI.
>
> My work enables users to overlay data from other datasources, like
> annotations, onto line charts. I think both of these are complementary.
>
> I'm happy to take on the UI work for both of these use cases if you are
> fine with that.
> Let me know how you envisioned the user experience for adding annotations
> and I'm happy to give it shot.
>
> Fabian
>
> On Sat, Sep 23, 2017 at 1:39 PM, Fabian Menges 
> wrote:
>
>> Nice, I'm almost done with my implementation and it looks like our stuff
>> is compatible and we haven't done much duplicate work
>>
>> I didn't really do anything server side, check out my code that add a
>> annotation layer to the d3.svg...
>>
>> https://github.com/apache/incubator-superset/pull/3518/files
>>
>> Let me know what you think.
>>
>> On Sat, Sep 23, 2017 at 12:38 PM, Maxime Beauchemin <
>> maximebeauche...@gmail.com> wrote:
>>
>>> Wait up! Grace and I have been working on annotations last week.
>>>
>>> Here's the backend part I wrote, Grace has code that shows one or many
>>> "annotation layers" on the nvd3 time series charts
>>>
>>> https://github.com/apache/incubator-superset/compare/master.
>>> ..mistercrunch:annotations?expand=1
>>>
>>> Those are time-related annotations, namespaced into arbitrary "layers"
>>> stored in the backend. We have plans to support other types of annotation
>>> like "point in place" in the future. We're open to collaborate on all
>>> that.
>>>
>>> I like the idea of formulas, curious how you're planning on safely
>>> "eval-ing" the formulas too, I'm thinking users should also be able to
>>> pick
>>> their color and style for that special series.
>>>
>>> Max
>>>
>>> On Sep 23, 2017 8:41 AM, "Fabian Menges" 
>>> wrote:
>>>
>>> > Hi everyone,
>>> >
>>> > Just wanted to give everyone heads up, I'm working on adding
>>> Annotations
>>> > and Overlays to time series line charts in Superset.
>>> >
>>> > I'll probably have something done by next week. This is how it will
>>> work:
>>> >
>>> > There are 3 different types of annotations:
>>> >
>>> >1. Events. Events are a list of dates with descriptions. They will
>>> be
>>> >displayed as vertical lines. Their description will show up in the
>>> > tooltips
>>> >if you hover over them. They are fetched from a "table" slice, that
>>> >contains the data.
>>> >2. Timeseries. Timeseries are are added as an additional line on the
>>> >line chart. The name and the display properties can be configured.
>>> The
>>> > data
>>> >is fetched from any timeseries slce.
>>> >3. Formulas. Formulas are added as an additional line to the chart.
>>> You
>>> >will be able to enter a mathematical expression, that will be
>>> evaluated
>>> > on
>>> >the client side using "mathjs". You will be able to specify display
>>> >properties. You will be able to specify any mathematical formula e.g
>>> >- y = 500  (horizontal line)
>>> >   - y = 0.2x (line with inclination of 0.2)
>>> >   - y = x^2 (parabola)
>>> >
>>> > Let me know if you have any concerns or can think of missing features.
>>> >
>>> >
>>> > Fabian
>>> >
>>>
>>
>>
>


[GitHub] coveralls commented on issue #3518: WIP Annotations

2017-09-26 Thread git
coveralls commented on issue #3518: WIP Annotations
URL: 
https://github.com/apache/incubator-superset/pull/3518#issuecomment-332253546
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/13438934/badge)](https://coveralls.io/builds/13438934)
   
   Coverage decreased (-0.2%) to 69.327% when pulling 
**65040f91c0556e908a5e1bab80ea35e9c1c1c4c8 on tc-dc:fmenges/annotations** into 
**255ea699770a98b8406a516d44fc7eac47d45ab6 on apache:master**.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #3518: WIP Annotations

2017-09-26 Thread git
coveralls commented on issue #3518: WIP Annotations
URL: 
https://github.com/apache/incubator-superset/pull/3518#issuecomment-332253543
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/13438934/badge)](https://coveralls.io/builds/13438934)
   
   Coverage decreased (-0.2%) to 69.327% when pulling 
**65040f91c0556e908a5e1bab80ea35e9c1c1c4c8 on tc-dc:fmenges/annotations** into 
**255ea699770a98b8406a516d44fc7eac47d45ab6 on apache:master**.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on issue #3530: Feature: memoized get_sqla_engine and some others

2017-09-26 Thread git
mistercrunch commented on issue #3530: Feature: memoized get_sqla_engine and 
some others
URL: 
https://github.com/apache/incubator-superset/pull/3530#issuecomment-332249294
 
 
   Oops merge conflict. Otherwise LGTM. Thanks for following through on this.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on issue #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on issue #3521: Time Series Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#issuecomment-332249297
 
 
   I just created a couple youtube videos of the functionality of my changeset, 
 #3518 
   I'd be happy to incorporate your annotation table and the ability to create 
"rectangular" annotations and just add it as another type of annotation. 
Currently my change set incorporates "Events", "Formulas", "Time Series". I 
could create another type "Annotation" that would pull the annotations from the 
Annotation table in the Superset DB. I could also then provide a UI where you 
can add annotations inside of Superset for that Layer.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on a change in pull request #3530: Feature: memoized get_sqla_engine and some others

2017-09-26 Thread git
mistercrunch commented on a change in pull request #3530: Feature: memoized 
get_sqla_engine and some others
URL: 
https://github.com/apache/incubator-superset/pull/3530#discussion_r141104418
 
 

 ##
 File path: superset/models/core.py
 ##
 @@ -590,6 +590,8 @@ def set_sqlalchemy_uri(self, uri):
 conn.password = password_mask if conn.password else None
 self.sqlalchemy_uri = str(conn)  # hides the password
 
+@utils.memoized(
 
 Review comment:
   The `watch` is a nice precaution (keep it!), but I think that these attrs 
wouldn't change during the lifecycle of the ORM instance object. Unless I'm 
missing something they'd live over a single web request or CLI command and get 
garbage collected.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch closed pull request #3513: Feature: query string API endpoint

2017-09-26 Thread git
mistercrunch closed pull request #3513: Feature: query string API endpoint
URL: https://github.com/apache/incubator-superset/pull/3513
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141067754
 
 

 ##
 File path: superset/migrations/versions/ddd6ebdd853b_annotations.py
 ##
 @@ -0,0 +1,56 @@
+"""annotations
+
+Revision ID: ddd6ebdd853b
+Revises: ca69c70ec99b
+Create Date: 2017-09-13 16:36:39.144489
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+# revision identifiers, used by Alembic.
+revision = 'ddd6ebdd853b'
+down_revision = 'ca69c70ec99b'
+
+
+def upgrade():
+# ### commands auto generated by Alembic - please adjust! ###
+op.create_table(
+'annotation_layer',
+sa.Column('created_on', sa.DateTime(), nullable=True),
+sa.Column('changed_on', sa.DateTime(), nullable=True),
+sa.Column('id', sa.Integer(), nullable=False),
+sa.Column('name', sa.String(length=250), nullable=True),
+sa.Column('descr', sa.Text(), nullable=True),
+sa.Column('changed_by_fk', sa.Integer(), nullable=True),
+sa.Column('created_by_fk', sa.Integer(), nullable=True),
+sa.ForeignKeyConstraint(['changed_by_fk'], ['ab_user.id'], ),
+sa.ForeignKeyConstraint(['created_by_fk'], ['ab_user.id'], ),
+sa.PrimaryKeyConstraint('id')
+)
+op.create_table(
+'annotation',
+sa.Column('created_on', sa.DateTime(), nullable=True),
+sa.Column('changed_on', sa.DateTime(), nullable=True),
+sa.Column('id', sa.Integer(), nullable=False),
 
 Review comment:
   Bigint?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141064082
 
 

 ##
 File path: superset/assets/visualizations/nvd3_vis.js
 ##
 @@ -476,6 +477,78 @@ function nvd3Vis(slice, payload) {
   .attr('height', height)
   .attr('width', width)
   .call(chart);
+
+  // add annotation_layer
+  if (isTimeSeries && payload.annotations.length) {
+const tip = d3tip()
 
 Review comment:
   Do these tooltips work when we are using "Rich Tooltips" 
(useInteractiveGuideline) How does that look? 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141050236
 
 

 ##
 File path: superset/viz.py
 ##
 @@ -57,6 +57,7 @@ def __init__(self, datasource, form_data):
 'token', 'token_' + uuid.uuid4().hex[:8])
 self.metrics = self.form_data.get('metrics') or []
 self.groupby = self.form_data.get('groupby') or []
+self.annotation_layers = []
 
 Review comment:
   I don't think annotations should be part the viz object. For most viz types 
that I can think of annotations don't really make sense. If you make 
annotations accessible from a json endpoint they can be loaded client side. 
This would also make the responsiveness better, annotations could be loaded 
async independently of the data.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141050792
 
 

 ##
 File path: superset/views/annotations.py
 ##
 @@ -0,0 +1,59 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from flask_babel import gettext as __
+from flask_appbuilder.models.sqla.interface import SQLAInterface
+
+from superset.models.annotations import Annotation, AnnotationLayer
+from superset import appbuilder
+from .base import SupersetModelView, DeleteMixin
+
+
+class AnnotationModelView(SupersetModelView, DeleteMixin):  # noqa
 
 Review comment:
   How are annotations written to that table? If you cannot write them from 
within superset, why are you not thinking of them as just another datasource?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on a change in pull request #3521: Time Series Annotation Layers

2017-09-26 Thread git
fabianmenges commented on a change in pull request #3521: Time Series 
Annotation Layers
URL: 
https://github.com/apache/incubator-superset/pull/3521#discussion_r141050236
 
 

 ##
 File path: superset/viz.py
 ##
 @@ -57,6 +57,7 @@ def __init__(self, datasource, form_data):
 'token', 'token_' + uuid.uuid4().hex[:8])
 self.metrics = self.form_data.get('metrics') or []
 self.groupby = self.form_data.get('groupby') or []
+self.annotation_layers = []
 
 Review comment:
   I don't think annotations should be part the viz object. For most viz types 
that I can think of annotations don't really make sense. If you make 
annotations accessible from a json endpoint they can be loaded client side. 
This would also make the responsiveness be better, annotations could be loaded 
async independently of the data.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fabianmenges commented on issue #3518: WIP Annotations

2017-09-26 Thread git
fabianmenges commented on issue #3518: WIP Annotations
URL: 
https://github.com/apache/incubator-superset/pull/3518#issuecomment-332190759
 
 
   No, it can handles both. Formula overlays are client side (I would have had 
to do too much plumbing work for server side, b.c. they probably should be 
datasources then).

   The slice annotations are server side, but read only. Basically it assumes 
you have a table with annotations in SQL (e.g. your deploy history from 
jenkins, teamcity, ). You can now create a regular table slice in Superset 
with (timestamp and event) and then have these superimposed on your line chart 
as horizontal lines.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Qs on superset

2017-09-26 Thread Wang, Larry
Hi All,

I got this error when trying to create a slice of a bar chart (or other chart 
types that I tried): "Couldn't parse date string [None]", but in the datasource 
setting, there is no date involved in anywhere (metrics, series, filters), 
anyone know what might caused this issue? The full traceback I got from the UI 
is:

" Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/superset/viz.py", line 249, in 
get_payload
df = self.get_df()
File "/usr/lib/python2.7/site-packages/superset/viz.py", line 67, in get_df
query_obj = self.query_obj()
File "/usr/lib/python2.7/site-packages/superset/viz.py", line 1089, in query_obj
d = super(DistributionBarViz, self).query_obj() # noqa
File "/usr/lib/python2.7/site-packages/superset/viz.py", line 156, in query_obj
to_dttm = utils.parse_human_datetime(until)
File "/usr/lib/python2.7/site-packages/superset/utils.py", line 213, in 
parse_human_datetime
raise ValueError("Couldn't parse date string [{}]".format(s))
ValueError: Couldn't parse date string [None]"

Thanks
Larry Wang


[GitHub] HUMPHREY94 commented on issue #1892: Tutorial error in creating new table and no information on how to create new table

2017-09-26 Thread git
HUMPHREY94 commented on issue #1892: Tutorial error in creating new table and 
no information on how to create new table
URL: 
https://github.com/apache/incubator-superset/issues/1892#issuecomment-332134280
 
 
   Sorry me i have already created database and its table, but i have no 
created a schema yet, i try ,to connect that table but its bring the error
   
   
   
   Table [students] could not be found, please double check your database 
connection, schema, and table name
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mistercrunch commented on a change in pull request #3527: Druid refresh metadata performance improvements

2017-09-26 Thread git
mistercrunch commented on a change in pull request #3527: Druid refresh 
metadata performance improvements
URL: 
https://github.com/apache/incubator-superset/pull/3527#discussion_r140966466
 
 

 ##
 File path: superset/connectors/druid/models.py
 ##
 @@ -101,15 +108,99 @@ def get_druid_version(self):
 ).format(obj=self)
 return json.loads(requests.get(endpoint).text)['version']
 
-def refresh_datasources(self, datasource_name=None, merge_flag=False):
+def refresh_datasources(
+self,
+datasource_name=None,
+merge_flag=True,
+refreshAll=True):
 """Refresh metadata of all datasources in the cluster
 If ``datasource_name`` is specified, only that datasource is updated
 """
 self.druid_version = self.get_druid_version()
-for datasource in self.get_datasources():
-if datasource not in conf.get('DRUID_DATA_SOURCE_BLACKLIST', []):
-if not datasource_name or datasource_name == datasource:
-DruidDatasource.sync_to_db(datasource, self, merge_flag)
+ds_list = self.get_datasources()
+blacklist = conf.get('DRUID_DATA_SOURCE_BLACKLIST', [])
+ds_refresh = []
+if not datasource_name:
+ds_refresh = list(filter(lambda ds: ds not in blacklist, ds_list))
+elif datasource_name not in blacklist and datasource_name in ds_list:
+ds_refresh.append(datasource_name)
+else:
+return
+self.refresh_async(ds_refresh, merge_flag, refreshAll)
+
+def refresh_async(self, datasource_names, merge_flag, refreshAll):
+"""
+Fetches metadata for the specified datasources andm
+merges to the Superset database
+"""
+session = db.session
+ds_list = (
+session.query(DruidDatasource)
+.filter(or_(DruidDatasource.datasource_name == name
+for name in datasource_names))
+)
+
+ds_map = {ds.name: ds for ds in ds_list}
+for ds_name in datasource_names:
+datasource = ds_map.get(ds_name, None)
+if not datasource:
+datasource = DruidDatasource(datasource_name=ds_name)
+with session.no_autoflush:
+session.add(datasource)
+flasher(
+"Adding new datasource [{}]".format(ds_name), 'success')
+ds_map[ds_name] = datasource
+elif refreshAll:
+flasher(
+"Refreshing datasource [{}]".format(ds_name), 'info')
+else:
+del ds_map[ds_name]
+continue
+datasource.cluster = self
+datasource.merge_flag = merge_flag
+session.flush()
+
+# Prepare multithreaded executation
 
 Review comment:
   Not a bad idea, though for now setting up celery isn't a hard requirement 
which helps people onboard without having to setup a MQ and workers...
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services