[GitHub] xrmx commented on issue #4822: Superset v0.24.0 translation for Chinese language is broken for Chart menu part
xrmx commented on issue #4822: Superset v0.24.0 translation for Chinese language is broken for Chart menu part URL: https://github.com/apache/incubator-superset/issues/4822#issuecomment-381049683 When doing development work you should work on a git checkout and not on an installed superset :) Said that looking forward to your PR! 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] liuluxyz commented on issue #296: Support for non-integer timezone Offset in the UI.
liuluxyz commented on issue #296: Support for non-integer timezone Offset in the UI. URL: https://github.com/apache/incubator-superset/issues/296#issuecomment-381092727 @sid88in Hi, you mentioned that you plan to add timezone filter. May I know what is the progress? 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] akrabawi commented on issue #4464: Integrate Jupyter model to superset
akrabawi commented on issue #4464: Integrate Jupyter model to superset URL: https://github.com/apache/incubator-superset/issues/4464#issuecomment-381109648 Using pandas to_sql() function you can directly sync your df to a database which is connected to superset. 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] CasperLiu commented on issue #4708: Does Superset have an API to expose a Chart's JSON data?
CasperLiu commented on issue #4708: Does Superset have an API to expose a Chart's JSON data? URL: https://github.com/apache/incubator-superset/issues/4708#issuecomment-381121022 Dear mistercrunch, yongjie Thanks a lot for your valuable input! Indeed helps! I would close this ticket. 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] CasperLiu closed issue #4708: Does Superset have an API to expose a Chart's JSON data?
CasperLiu closed issue #4708: Does Superset have an API to expose a Chart's JSON data? URL: https://github.com/apache/incubator-superset/issues/4708 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] CasperLiu closed issue #4701: Automatically assign "Verbose Name" for a table's fields
CasperLiu closed issue #4701: Automatically assign "Verbose Name" for a table's fields URL: https://github.com/apache/incubator-superset/issues/4701 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 #4615: 'NoneType' object has no attribute 'fillna' with daylight savings error in time-series visualizations.
mistercrunch commented on issue #4615: 'NoneType' object has no attribute 'fillna' with daylight savings error in time-series visualizations. URL: https://github.com/apache/incubator-superset/issues/4615#issuecomment-381172400 I think this is addressed on `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 #4813: datetrunc is not suported
mistercrunch commented on issue #4813: datetrunc is not suported URL: https://github.com/apache/incubator-superset/issues/4813#issuecomment-381172979 The recommended driver for postgres is `postgresql+psycopg2://` https://github.com/apache/incubator-superset/blob/master/docs/installation.rst#database-dependencies 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] xrmx commented on issue #4813: datetrunc is not suported
xrmx commented on issue #4813: datetrunc is not suported URL: https://github.com/apache/incubator-superset/issues/4813#issuecomment-381173814 @mistercrunch documentation is wrong, it should be redshift+psycopg2:// 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 #296: Support for non-integer timezone Offset in the UI.
mistercrunch commented on issue #296: Support for non-integer timezone Offset in the UI. URL: https://github.com/apache/incubator-superset/issues/296#issuecomment-381173825 It would make sense to have a timezone feature in the time-related section of the explore view. 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] xrmx opened a new pull request #4823: docs: use proper dialect for redshift
xrmx opened a new pull request #4823: docs: use proper dialect for redshift URL: https://github.com/apache/incubator-superset/pull/4823 Use redshift+psycopg2 instead of the postgresql one. Untested as I don't have access to a Redshift system but that's what's written in https://pypi.python.org/pypi/sqlalchemy-redshift 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 #4822: Superset v0.24.0 translation for Chinese language is broken for Chart menu part
mistercrunch commented on issue #4822: Superset v0.24.0 translation for Chinese language is broken for Chart menu part URL: https://github.com/apache/incubator-superset/issues/4822#issuecomment-381175410 Just FYI translations / i18n is mostly community contributed and not a top priority for the core committers. Though we're happy to enable others to translate and make translations work. 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] xrmx commented on issue #4813: datetrunc is not suported
xrmx commented on issue #4813: datetrunc is not suported URL: https://github.com/apache/incubator-superset/issues/4813#issuecomment-381173814 @mistercrunch documentation is wrong, it should be redshift+psycopg2:// Pr here https://github.com/apache/incubator-superset/pull/4823 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] codecov-io commented on issue #4823: docs: use proper dialect for redshift
codecov-io commented on issue #4823: docs: use proper dialect for redshift URL: https://github.com/apache/incubator-superset/pull/4823#issuecomment-381179757 # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4823?src=pr&el=h1) Report > Merging [#4823](https://codecov.io/gh/apache/incubator-superset/pull/4823?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/fd84fd89ce12388d4aa4c98bc3d0d1257d355168?src=pr&el=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/4823/graphs/tree.svg?height=150&width=650&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/4823?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master#4823 +/- ## === Coverage 72.33% 72.33% === Files 208 208 Lines 1556815568 Branches 1204 1204 === Hits1126111261 Misses 4304 4304 Partials33 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4823?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4823?src=pr&el=footer). Last update [fd84fd8...9a0e037](https://codecov.io/gh/apache/incubator-superset/pull/4823?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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 #4823: docs: use proper dialect for redshift
mistercrunch closed pull request #4823: docs: use proper dialect for redshift URL: https://github.com/apache/incubator-superset/pull/4823 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/docs/installation.rst b/docs/installation.rst index 3036255272..45e9db7b5b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -298,7 +298,7 @@ Here's a list of some of the recommended packages. +---+-+-+ | sqlite | | ``sqlite://`` | +---+-+-+ -| Redshift | ``pip install sqlalchemy-redshift`` | ``postgresql+psycopg2://`` | +| Redshift | ``pip install sqlalchemy-redshift`` | ``redshift+psycopg2://`` | +---+-+-+ | MSSQL| ``pip install pymssql`` | ``mssql://`` | +---+-+-+ 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 #4817: [docs] many improvements to the documentation / cleanup
michellethomas commented on issue #4817: [docs] many improvements to the documentation / cleanup URL: https://github.com/apache/incubator-superset/pull/4817#issuecomment-381190797 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
[GitHub] codecov-io commented on issue #4736: [Explore] Adding custom expressions to adhoc metrics
codecov-io commented on issue #4736: [Explore] Adding custom expressions to adhoc metrics URL: https://github.com/apache/incubator-superset/pull/4736#issuecomment-377995539 # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4736?src=pr&el=h1) Report > Merging [#4736](https://codecov.io/gh/apache/incubator-superset/pull/4736?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/daf9a3bfb50a016868ab3f9520f24c316219b1a0?src=pr&el=desc) will **increase** coverage by `0.03%`. > The diff coverage is `78.99%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/4736/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/4736?src=pr&el=tree) ```diff @@Coverage Diff @@ ## master#4736 +/- ## == + Coverage 72.33% 72.36% +0.03% == Files 208 208 Lines 1556815662 +94 Branches 1204 1227 +23 == + Hits1126111334 +73 - Misses 4304 4325 +21 Partials33 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/4736?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...ripts/explore/components/MetricDefinitionValue.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL2V4cGxvcmUvY29tcG9uZW50cy9NZXRyaWNEZWZpbml0aW9uVmFsdWUuanN4) | `94.11% <ø> (+5.22%)` | :arrow_up: | | [superset/utils.py](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMucHk=) | `88.1% <100%> (+0.02%)` | :arrow_up: | | [superset/assets/javascripts/explore/constants.js](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL2V4cGxvcmUvY29uc3RhbnRzLmpz) | `100% <100%> (ø)` | :arrow_up: | | [...s/javascripts/explore/propTypes/adhocMetricType.js](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL2V4cGxvcmUvcHJvcFR5cGVzL2FkaG9jTWV0cmljVHlwZS5qcw==) | `100% <100%> (ø)` | :arrow_up: | | [...pts/explore/components/controls/MetricsControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNzQ29udHJvbC5qc3g=) | `78.62% <100%> (-0.3%)` | :arrow_down: | | [...javascripts/SqlLab/components/AceEditorWrapper.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL1NxbExhYi9jb21wb25lbnRzL0FjZUVkaXRvcldyYXBwZXIuanN4) | `76.05% <100%> (ø)` | :arrow_up: | | [...vascripts/explore/components/AdhocMetricOption.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL2V4cGxvcmUvY29tcG9uZW50cy9BZGhvY01ldHJpY09wdGlvbi5qc3g=) | `91.3% <66.66%> (-3.7%)` | :arrow_down: | | [...ipts/explore/components/AdhocMetricEditPopover.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL2V4cGxvcmUvY29tcG9uZW50cy9BZGhvY01ldHJpY0VkaXRQb3BvdmVyLmpzeA==) | `79.16% <78.43%> (-4.17%)` | :arrow_down: | | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `76.32% <9.09%> (-1.11%)` | :arrow_down: | | [superset/assets/javascripts/explore/AdhocMetric.js](https://codecov.io/gh/apache/incubator-superset/pull/4736/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL2V4cGxvcmUvQWRob2NNZXRyaWMuanM=) | `94.91% <93.18%> (-5.09%)` | :arrow_down: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4736?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4736?src=pr&el=footer). Last update [daf9a3b...6a8dde6](https://codecov.io/gh/apache/incubator-superset/pull/4736?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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
[GitHub] mistercrunch closed pull request #4817: [docs] many improvements to the documentation / cleanup
mistercrunch closed pull request #4817: [docs] many improvements to the documentation / cleanup URL: https://github.com/apache/incubator-superset/pull/4817 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/docs/_build/html/README.md b/docs/_build/html/README.md deleted file mode 100644 index bcba4d6297..00 --- a/docs/_build/html/README.md +++ /dev/null @@ -1 +0,0 @@ -Folder containing the sphinx-generated documentation diff --git a/docs/conf.py b/docs/conf.py index fbc75e9854..f78a9a420c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -52,7 +52,7 @@ # General information about the project. project = "Apache Superset" -copyright = None +copyright = 'Apache Software Foundation' author = u'Maxime Beauchemin' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/druid.rst b/docs/druid.rst index af956d97c4..b673546565 100644 --- a/docs/druid.rst +++ b/docs/druid.rst @@ -1,16 +1,14 @@ Druid = -Superset works well with Druid, though currently not all -advanced features out of Druid are covered. This page clarifies what is -covered and what isn't and explains how to use some of the features. +Superset has a native connector to Druid, and a majority of Druid's +features are accessible through Superset. .. note :: -Currently Airbnb runs against Druid ``0.8.x`` and previous / -following versions are not tested against. - -Supported -' +Druid now supports SQL and can be accessed through Superset's +SQLAlchemy connector. The long term vision is to deprecate +the Druid native REST connector and query Druid exclusively through +the SQL interface. Aggregations @@ -28,7 +26,7 @@ element correspond to Druid aggregation definition. You can create your own aggregations manually from the ``List Druid Metric`` tab following Druid documentation. -.. image:: _static/img/druid_agg.png +.. image:: images/druid_agg.png :scale: 50 % Post-Aggregations @@ -41,8 +39,9 @@ json post-aggregation definition (as specified in the Druid docs) in the Json field. -Not yet supported -' +Unsupported Features + -- Regex filters -- Lookups / joins +.. note :: +Unclear at this point, this section of the documentation could use +some input. diff --git a/docs/faq.rst b/docs/faq.rst index 4e7d4d6b65..21e4e74905 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -48,8 +48,10 @@ https://github.com/airbnb/superset/issues?q=label%3Aexample+is%3Aclosed Can I upload and visualize csv data? -Yes, using the ``Upload a CSV`` button under the ``Sources`` -menu item. This brings up a form that allows you specify required information. After creating the table from CSV, it can then be loaded like any other on the ``Sources -> Tables``page. +Yes, using the ``Upload a CSV`` button under the ``Sources`` menu item. +This brings up a form that allows you specify required information. +After creating the table from CSV, it can then be loaded like any +other on the ``Sources -> Tables`` page. Why are my queries timing out? @@ -168,7 +170,7 @@ Here, the entire dashboard will refresh at once if periodic refresh is on. The s 2.5 seconds is ignored. Why does fabmanager or superset freezed/hung/not responding when started (my home directory is NFS mounted)? -- + By default, superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS. __ https://www.sqlite.org/lockingv3.html diff --git a/docs/gallery.rst b/docs/gallery.rst index 28515277c7..5fa212d4cf 100644 --- a/docs/gallery.rst +++ b/docs/gallery.rst @@ -1,89 +1,190 @@ -Gallery -=== +Visualizations Gallery +== -.. image:: _static/img/viz_thumbnails/line.png - :scale: 50 % +.. image:: images/viz_thumbnails/area.png + :scale: 25 % -.. image:: _static/img/viz_thumbnails/bubble.png - :scale: 50 % -.. image:: _static/img/viz_thumbnails/table.png - :scale: 50 % +.. image:: images/viz_thumbnails/bar.png + :scale: 25 % -.. image:: _static/img/viz_thumbnails/pie.png - :scale: 50 % -.. image:: _static/img/viz_thumbnails/bar.png - :scale: 50 % +.. image:: images/viz_thumbnails/big_number.png + :scale: 25 % -.. image:: _static/img/viz_thumbnails/world_map.png - :scale: 50 % -.. image:: _static/img/viz_thumbnails/sankey.png - :scale: 50 % +.. image:: images/viz_thumbnails/big_number_total.png + :s
[GitHub] Him121 opened a new issue #4824: Any Instruction on Deploying Superset on AWS Elastic beanstalk?
Him121 opened a new issue #4824: Any Instruction on Deploying Superset on AWS Elastic beanstalk? URL: https://github.com/apache/incubator-superset/issues/4824 Hi Can you please direct me on instruction if available to deploy Superset on AWS Elastic beanstalk? and also setup HTTPS. Thanks, 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] williaster closed pull request #4736: [Explore] Adding custom expressions to adhoc metrics
williaster closed pull request #4736: [Explore] Adding custom expressions to adhoc metrics URL: https://github.com/apache/incubator-superset/pull/4736 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx b/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx index 9a9b037992..6aef34cbcf 100644 --- a/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx +++ b/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx @@ -12,7 +12,8 @@ const langTools = ace.acequire('ace/ext/language_tools'); const keywords = ( 'SELECT|INSERT|UPDATE|DELETE|FROM|WHERE|AND|OR|GROUP|BY|ORDER|LIMIT|OFFSET|HAVING|AS|CASE|' + 'WHEN|ELSE|END|TYPE|LEFT|RIGHT|JOIN|ON|OUTER|DESC|ASC|UNION|CREATE|TABLE|PRIMARY|KEY|IF|' + - 'FOREIGN|NOT|REFERENCES|DEFAULT|NULL|INNER|CROSS|NATURAL|DATABASE|DROP|GRANT' + 'FOREIGN|NOT|REFERENCES|DEFAULT|NULL|INNER|CROSS|NATURAL|DATABASE|DROP|GRANT|SUM|MAX|MIN|COUNT|' + + 'AVG|DISTINCT' ); const dataTypes = ( @@ -21,7 +22,7 @@ const dataTypes = ( ); const sqlKeywords = [].concat(keywords.split('|'), dataTypes.split('|')); -const sqlWords = sqlKeywords.map(s => ({ +export const sqlWords = sqlKeywords.map(s => ({ name: s, value: s, score: 60, meta: 'sql', })); diff --git a/superset/assets/javascripts/explore/AdhocMetric.js b/superset/assets/javascripts/explore/AdhocMetric.js index e123521b4c..5c62f0544f 100644 --- a/superset/assets/javascripts/explore/AdhocMetric.js +++ b/superset/assets/javascripts/explore/AdhocMetric.js @@ -1,7 +1,46 @@ +import { sqlaAutoGeneratedMetricRegex } from './constants'; + +export const EXPRESSION_TYPES = { + SIMPLE: 'SIMPLE', + SQL: 'SQL', +}; + +function inferSqlExpressionColumn(adhocMetric) { + if (adhocMetric.sqlExpression && sqlaAutoGeneratedMetricRegex.test(adhocMetric.sqlExpression)) { +const indexFirstCloseParen = adhocMetric.sqlExpression.indexOf(')'); +const indexPairedOpenParen = + adhocMetric.sqlExpression.substring(0, indexFirstCloseParen).lastIndexOf('('); +if (indexFirstCloseParen > 0 && indexPairedOpenParen > 0) { + return adhocMetric.sqlExpression.substring(indexPairedOpenParen + 1, indexFirstCloseParen); +} + } + return null; +} + +function inferSqlExpressionAggregate(adhocMetric) { + if (adhocMetric.sqlExpression && sqlaAutoGeneratedMetricRegex.test(adhocMetric.sqlExpression)) { +const indexFirstOpenParen = adhocMetric.sqlExpression.indexOf('('); +if (indexFirstOpenParen > 0) { + return adhocMetric.sqlExpression.substring(0, indexFirstOpenParen); +} + } + return null; +} + export default class AdhocMetric { constructor(adhocMetric) { -this.column = adhocMetric.column; -this.aggregate = adhocMetric.aggregate; +this.expressionType = adhocMetric.expressionType || EXPRESSION_TYPES.SIMPLE; +if (this.expressionType === EXPRESSION_TYPES.SIMPLE) { + // try to be clever in the case of transitioning from Sql expression back to simple expression + const inferredColumn = inferSqlExpressionColumn(adhocMetric); + this.column = adhocMetric.column || (inferredColumn && { column_name: inferredColumn }); + this.aggregate = adhocMetric.aggregate || inferSqlExpressionAggregate(adhocMetric); + this.sqlExpression = null; +} else if (this.expressionType === EXPRESSION_TYPES.SQL) { + this.sqlExpression = adhocMetric.sqlExpression; + this.column = null; + this.aggregate = null; +} this.hasCustomLabel = !!(adhocMetric.hasCustomLabel && adhocMetric.label); this.fromFormData = !!adhocMetric.optionName; this.label = this.hasCustomLabel ? adhocMetric.label : this.getDefaultLabel(); @@ -11,7 +50,14 @@ export default class AdhocMetric { } getDefaultLabel() { -return `${this.aggregate || ''}(${(this.column && this.column.column_name) || ''})`; +if (this.expressionType === EXPRESSION_TYPES.SIMPLE) { + return `${this.aggregate || ''}(${(this.column && this.column.column_name) || ''})`; +} else if (this.expressionType === EXPRESSION_TYPES.SQL) { + return this.sqlExpression.length < 43 ? +this.sqlExpression : +this.sqlExpression.substring(0, 40) + '...'; +} +return 'malformatted metric'; } duplicateWith(nextFields) { @@ -23,10 +69,29 @@ export default class AdhocMetric { equals(adhocMetric) { return adhocMetric.label === this.label && + adhocMetric.expressionType === this.expressionType && + adhocMetric.sqlExpression === this.sqlExpression && adhocMetric.aggregate === this.aggregate && ( (adhocMetric.column && adhocMetric.column.column_name) === (this.column && this.column.column_
[GitHub] williaster commented on issue #4736: [Explore] Adding custom expressions to adhoc metrics
williaster commented on issue #4736: [Explore] Adding custom expressions to adhoc metrics URL: https://github.com/apache/incubator-superset/pull/4736#issuecomment-381220837 thanks @GabeLoins! 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
[GitHub] jeffreythewang commented on issue #4408: Add link on how to get permission to permission error
jeffreythewang commented on issue #4408: Add link on how to get permission to permission error URL: https://github.com/apache/incubator-superset/pull/4408#issuecomment-381220913 I may be seeing this wrong, but I don't think this works with https://github.com/apache/incubator-superset/pull/4373 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] jeffreythewang commented on issue #4408: Add link on how to get permission to permission error
jeffreythewang commented on issue #4408: Add link on how to get permission to permission error URL: https://github.com/apache/incubator-superset/pull/4408#issuecomment-381220913 I don't think this works with https://github.com/apache/incubator-superset/pull/4373 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 opened a new pull request #4825: Update README with fresher screenshots
mistercrunch opened a new pull request #4825: Update README with fresher screenshots URL: https://github.com/apache/incubator-superset/pull/4825 See the README on my fork: https://github.com/mistercrunch/superset/tree/newreadme We could re-introduce gifs too, but we should craft new ones. 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] codecov-io commented on issue #4825: Update README with fresher screenshots
codecov-io commented on issue #4825: Update README with fresher screenshots URL: https://github.com/apache/incubator-superset/pull/4825#issuecomment-381242424 # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4825?src=pr&el=h1) Report > Merging [#4825](https://codecov.io/gh/apache/incubator-superset/pull/4825?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/8669874ec63437c774ea848042b7e866d297c451?src=pr&el=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/4825/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/4825?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master#4825 +/- ## === Coverage 72.36% 72.36% === Files 208 208 Lines 1566215662 Branches 1227 1227 === Hits1133411334 Misses 4325 4325 Partials33 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4825?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4825?src=pr&el=footer). Last update [8669874...6587789](https://codecov.io/gh/apache/incubator-superset/pull/4825?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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 #4825: Update README with fresher screenshots
mistercrunch commented on issue #4825: Update README with fresher screenshots URL: https://github.com/apache/incubator-superset/pull/4825#issuecomment-381259221 @xrmx it's expected, since I'm adding the image as part of this PR. 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 #4408: Add link on how to get permission to permission error
mistercrunch commented on issue #4408: Add link on how to get permission to permission error URL: https://github.com/apache/incubator-superset/pull/4408#issuecomment-381259808 @timifasubaa 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 #4736: [Explore] Adding custom expressions to adhoc metrics
mistercrunch commented on issue #4736: [Explore] Adding custom expressions to adhoc metrics URL: https://github.com/apache/incubator-superset/pull/4736#issuecomment-381260231 ![cheers](https://user-images.githubusercontent.com/487433/38757911-9b834414-3f23-11e8-9757-b67184cf5ea7.gif) 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 #4824: Any Instruction on Deploying Superset on AWS Elastic beanstalk?
mistercrunch commented on issue #4824: Any Instruction on Deploying Superset on AWS Elastic beanstalk? URL: https://github.com/apache/incubator-superset/issues/4824#issuecomment-381260734 I know nothing about Beanstack, but maybe this helps: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html If you get through hardships please share with the rest of the community. 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] Him121 commented on issue #4824: Any Instruction on Deploying Superset on AWS Elastic beanstalk?
Him121 commented on issue #4824: Any Instruction on Deploying Superset on AWS Elastic beanstalk? URL: https://github.com/apache/incubator-superset/issues/4824#issuecomment-381281589 Sure... planning to setup on next few weeks for demo Will share. Thanks. 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] codecov-io commented on issue #4820: Moving some JS folders
codecov-io commented on issue #4820: Moving some JS folders URL: https://github.com/apache/incubator-superset/pull/4820#issuecomment-381302439 # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=h1) Report > Merging [#4820](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/8669874ec63437c774ea848042b7e866d297c451?src=pr&el=desc) will **increase** coverage by `4.61%`. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/4820/graphs/tree.svg?src=pr&token=KsB0fHcx6l&width=650&height=150)](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=tree) ```diff @@Coverage Diff @@ ## master#4820 +/- ## == + Coverage 72.36% 76.98% +4.61% == Files 208 44 -164 Lines 15662 8498-7164 Branches 12270-1227 == - Hits11334 6542-4792 + Misses 4325 1956-2369 + Partials30 -3 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [superset/assets/javascripts/welcome/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvaW5kZXguanN4) | | | | [...rset/assets/javascripts/welcome/DashboardTable.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvRGFzaGJvYXJkVGFibGUuanN4) | | | | [superset/assets/javascripts/welcome/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvQXBwLmpzeA==) | | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=footer). Last update [8669874...cb8d1a2](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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] codecov-io commented on issue #4820: Moving some JS folders
codecov-io commented on issue #4820: Moving some JS folders URL: https://github.com/apache/incubator-superset/pull/4820#issuecomment-381302439 # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=h1) Report > Merging [#4820](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/8669874ec63437c774ea848042b7e866d297c451?src=pr&el=desc) will **increase** coverage by `4.61%`. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/4820/graphs/tree.svg?token=KsB0fHcx6l&width=650&height=150&src=pr)](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=tree) ```diff @@Coverage Diff @@ ## master#4820 +/- ## == + Coverage 72.36% 76.98% +4.61% == Files 208 44 -164 Lines 15662 8498-7164 Branches 12270-1227 == - Hits11334 6542-4792 + Misses 4325 1956-2369 + Partials30 -3 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [superset/assets/javascripts/welcome/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvQXBwLmpzeA==) | | | | [...rset/assets/javascripts/welcome/DashboardTable.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvRGFzaGJvYXJkVGFibGUuanN4) | | | | [superset/assets/javascripts/welcome/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvaW5kZXguanN4) | | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=footer). Last update [8669874...cb8d1a2](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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] codecov-io commented on issue #4820: Moving some JS folders
codecov-io commented on issue #4820: Moving some JS folders URL: https://github.com/apache/incubator-superset/pull/4820#issuecomment-381302439 # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=h1) Report > Merging [#4820](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/8669874ec63437c774ea848042b7e866d297c451?src=pr&el=desc) will **increase** coverage by `4.61%`. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/4820/graphs/tree.svg?width=650&src=pr&token=KsB0fHcx6l&height=150)](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=tree) ```diff @@Coverage Diff @@ ## master#4820 +/- ## == + Coverage 72.36% 76.98% +4.61% == Files 208 44 -164 Lines 15662 8498-7164 Branches 12270-1227 == - Hits11334 6542-4792 + Misses 4325 1956-2369 + Partials30 -3 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [superset/assets/javascripts/welcome/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvaW5kZXguanN4) | | | | [...rset/assets/javascripts/welcome/DashboardTable.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvRGFzaGJvYXJkVGFibGUuanN4) | | | | [superset/assets/javascripts/welcome/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/4820/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL2phdmFzY3JpcHRzL3dlbGNvbWUvQXBwLmpzeA==) | | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=footer). Last update [8669874...cb8d1a2](https://codecov.io/gh/apache/incubator-superset/pull/4820?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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