User:Elukey/Analytics/Superset

From Wikitech

Align staging db with prod

elukey@an-coord1001:~$ sudo mysqldump superset_production > superset_production_20112019.sql
elukey@an-coord1001:~$ sudo mysql superset_staging < superset_production_20112019.sql

Upgrade DB

elukey@an-tool1005:~$ cd /srv/deployment/analytics/superset/venv/
elukey@an-tool1005:/srv/deployment/analytics/superset/venv$ source bin/activate
(venv) elukey@an-tool1005:/srv/deployment/analytics/superset/venv$ sudo -E -u superset PYTHONPATH=${PYTHONPATH}:/etc/superset bin/superset db upgrade

If you get the following error:

sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1709, 'Index column size too large. The maximum column size is 767 bytes.')
[SQL: ALTER TABLE ab_view_menu MODIFY name VARCHAR(255) NOT NULL]

The you need to execute ALTER TABLE ab_view_menu ROW_FORMAT=DYNAMIC and innodb_file_format=Barracuda set in the mysql config.

Permissions needed for Alpha users to see SQLLab

https://phabricator.wikimedia.org/T249923#6058862

Test new Release candidate