We want to upgrade our old superset installation (0.19.0) to the latest version (1.3.2 or 1.4.0), and are just wondering whether there is anything we need to do to migrate the existing dashboards?
All meta data sits in AWS RDS database. Do we need to make any change in the DB, or just simply connect to it from the new Superset version?
Export all the dashboards, connect the to the database from the new supersert version and import the dashboards to the new environment
Related
I need to use AWS Glue to access two instances of MS SQL Server, one hosted on RDS, and one that is external. I am attempting to do this via pyodbc, which comes preinstalled/configured from Amazon. The connection fails repeatedly, so I ran the following:
import pyodbc
import sys
print("Drivers:")
dlist = pyodbc.drivers()
for drvr in dlist:
print(drvr)
This shows me that the only installed ODBC drivers are for MySQL, and PostgreSQL.
Question: is there any way to get the appropriate SQL Server driver installed such that my Glue script can see/use it? I can see in Amazon's documentation how to use the job parameters to bring over new modules similar to "pip install xyz", but that doesn't seem to bring the appropriate driver over with it.
I tried to connect to Sybase database from Django using sqlanydjango, but
I have stuck. One answer saying that
sqlany-django is no longer maintained; it was last updated in May 2016.
What is the other possibility to connect to Sybase database?
OS Ubuntu 18.04
django 2.2.4
Sybase is no longer maintained and it's not supported by Django. I recommend using one of the supported databases:
PostgreSQL
MariaDB
MySQL
Oracle
SQLite
Personally, I would recommend using PostgreSQL - I think it's the most advanced database. If you use it, I would recommend using version 13, since version 14 is still new and I think it's not officially supported by Django yet. It's always a good practice to use the previous major release. Also with Django, I recommend upgrading to the latest major release only about 4 to 6 months after its initial release. So for today, this means using Django 3.2 (latest minor release, currently 3.2.11).
You can use django-environ to define the database you are using in settings.
You could use the freetds module. GitHub repository was active 5 days ago, it aims to provide support for sybase and MSQL Server.
I used it with MSQL
You can download it from there, and installing with the instruction on this link (Sybase python module website)
Then you can test your installation using these steps
You can also try different Django version.
If this doesn't show anything wrong, and Django still won't connect to your DB, you can try to edit Django's source files so the ImproperlyConfigured exception doesn't raise (REALLY REALLY RISKY, DO A BACK UP OF YOUR DB) or migrate your Sybase to a supported database.
You can use pyodbc.
To install this.
Pip install pyodbc
import pyodbc
cnxn = pyodbc.connect(‘DRIVER={Devart ODBC Driver for ASE};Server=myserver;Port=myport;Database=mydatabase;User ID=myuserid;Password=mypassword;String Types=Unicode’)
For reference:-
https://medium.com/#sharma.jayant1992/best-way-to-connect-python-with-sybase-database-76445713efaf
Is there a package that is currently installed in the Python SDK that would allow me to connect to a mysql source? If not, I'll need to add in a requirements.txt file, which I'm trying to eliminate, as it drastically increases the setup time for things.
Update: I suppose pandas can, though I believe it needs an additional 'binding' for each sql source it connects to if I'm not mistaken?.
Since you are trying to connect to MySQL you need a specific client that will establish a channel between you and the database. Therefore, you will have to use the requirements.txt file to install this library.
You can refer to this StuckOverflow link that has a similar question. The answer specifies that "You must install a MySQL driver before doing anything. Unlike PHP, Only the SQLite driver is installed by default with Python. ...".
So only the SQLite driver is installed with Python SDK, not the MySQL one.
I am currently running an outdated version of Apache Superset 0.20.4. The Superset DB contains a substantial amount of slices and dashboards. I would like to update my version.
Can I just run an upgrade from pip? Is any of you aware of any backward incompatibility that would prevent me from reading the Superset DB after the update?
Answering my own question, there is no problem in upgrading but one has to run the DB migration superset db upgrade.
How do we create a spark service for Python 2/or 3 with Spark 2.0 . Whenever I create a new service and associate it with a python notebook its Python 2 with Spark 1.6. Why cant I see the configuration of the service I am creating like in Data bricks free edition? I want to use the SparkSession api introduced in Spark 2.0 to create your spark session variable, hence the question.
You can choose the Python and Spark version while:
a. Creating a new notebook in Data Science Experience:
DSX `Project` --> Overview--> `+ add notebooks` --> `Choose the language` (Python2/R/Scala/Python3) and Spark version (1.6/2.0/2.1).
b. Change the kernel of an existing notebook:
From any running notebook, on the notebook menu choose `Kernel` and then choose the language and Spark version combination of your choice.
You cannot see the configuration of the service you are creating, because you're not creating a service with its own configuration. The Apache Spark as a Service instances in Bluemix and Data Science Experience are getting execution slots in a shared cluster. The configurations of that shared cluster are managed by IBM.
The Jupyter Notebook server of your instance has kernel specs for each supported combination of language and Spark version. To switch your notebook to a different combination, select "Kernel -> Change Kernel -> (whatever)". Or select language and Spark version separately when creating a notebook.