Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
This file documents any backwards-incompatible changes in Superset and
assists people when migrating to a new version.

## Superset 0.32.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mistercrunch this PR got into 0.31 so this should be in the 0.31 section. Also I think we should call out the specific dependencies that were removed, we were impacted by removing flower would be good to list that out.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I assumed this would hit 0.32... let me change that then...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here: #7117

* If you use `Hive` or `Presto`, we've moved some dependencies that were
in the main package as optional now. To get these packages,
run `pip install superset[presto]` and/or `pip install superset[hive]` as
required.

## Superset 0.31.0
* boto3 / botocore was removed from the dependency list. If you use s3
as a place to store your SQL Lab result set or Hive uploads, you may
Expand Down
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ def get_git_sha():
'flask-compress',
'flask-migrate',
'flask-wtf',
'flower', # deprecated
'geopy',
'gsheetsdb>=0.1.9',
'gunicorn', # deprecated
'humanize',
'idna',
Expand All @@ -95,7 +93,6 @@ def get_git_sha():
'pathlib2',
'polyline',
'pydruid>=0.4.3',
'pyhive>=0.4.0',
'python-dateutil',
'python-geohash',
'pyyaml>=3.13',
Expand All @@ -106,14 +103,19 @@ def get_git_sha():
'sqlalchemy',
'sqlalchemy-utils',
'sqlparse',
'tableschema',
'thrift>=0.9.3',
'thrift-sasl>=0.2.1',
'unicodecsv',
],
extras_require={
'cors': ['flask-cors>=2.0.0'],
'console_log': ['console_log==0.2.10'],
'hive': [
'pyhive>=0.4.0',
'tableschema',
'thrift-sasl>=0.2.1',
'thrift>=0.9.3',
],
'presto': ['pyhive>=0.4.0'],
'gsheets': ['gsheetsdb>=0.1.9'],
},
author='Apache Superset Dev',
author_email='dev@superset.incubator.apache.org',
Expand Down
3 changes: 2 additions & 1 deletion superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
from sqlalchemy.sql import quoted_name, text
from sqlalchemy.sql.expression import TextAsFrom
import sqlparse
from tableschema import Table
from werkzeug.utils import secure_filename

from superset import app, conf, db, sql_parse
Expand Down Expand Up @@ -1071,6 +1070,8 @@ def convert_to_hive_type(col_type):
upload_path = config['UPLOAD_FOLDER'] + \
secure_filename(filename)

# Optional dependency
from tableschema import Table # pylint: disable=import-error
hive_table_schema = Table(upload_path).infer()
column_name_and_type = []
for column_info in hive_table_schema['fields']:
Expand Down
9 changes: 5 additions & 4 deletions superset/db_engines/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
# specific language governing permissions and limitations
# under the License.
# pylint: disable=C,R,W
from pyhive import hive # pylint: disable=no-name-in-module
from TCLIService import ttypes
from thrift import Thrift


# TODO: contribute back to pyhive.
def fetch_logs(self, max_rows=1024,
orientation=ttypes.TFetchOrientation.FETCH_NEXT):
orientation=None):
"""Mocked. Retrieve the logs produced by the execution of the query.
Can be called multiple times to fetch the logs produced after
the previous call.
Expand All @@ -31,6 +28,10 @@ def fetch_logs(self, max_rows=1024,
.. note::
This is not a part of DB-API.
"""
from pyhive import hive
from TCLIService import ttypes
from thrift import Thrift
orientation = orientation or ttypes.TFetchOrientation.FETCH_NEXT
try:
req = ttypes.TGetLogReq(operationHandle=self._operationHandle)
logs = self._connection.client.GetLog(req).log
Expand Down