You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anyone also experienced problems with loading data from the DWH using Colab?
The code:
`conn = sqlite3.connect('data/sakila.db')
df = pd.read_sql('''
SELECT
rental.rental_id, rental.rental_date, rental.return_date,
customer.last_name AS customer_lastname,
store.store_id,
city.city AS rental_store_city,
film.title AS film_title, film.rental_duration AS film_rental_duration,
film.rental_rate AS film_rental_rate, film.replacement_cost AS film_replacement_cost,
film.rating AS film_rating
FROM rental
INNER JOIN customer ON rental.customer_id == customer.customer_id
INNER JOIN inventory ON rental.inventory_id == inventory.inventory_id
INNER JOIN store ON inventory.store_id == store.store_id
INNER JOIN address ON store.address_id == address.address_id
INNER JOIN city ON address.city_id == city.city_id
INNER JOIN film ON inventory.film_id == film.film_id
;
''', conn, index_col='rental_id', parse_dates=['rental_date', 'return_date'])`
Yes, same error, while connecting from google colab. I tried with mysqlworkbench desktop app, it throws errors in retrieving specific tables; tried by connecting to drive by uploading db installed on local computer, the codeset presented doesnt work for retrieving tables from db as specified in the course; Also tried few things in connecting sqlite3 api from gcp, I was stuck wondering if it is going to cost.
Tried this code for connecting to drive and mount db to use:
Error: OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Anyone also experienced problems with loading data from the DWH using Colab?
The code:
`conn = sqlite3.connect('data/sakila.db')
df = pd.read_sql('''
SELECT
rental.rental_id, rental.rental_date, rental.return_date,
customer.last_name AS customer_lastname,
store.store_id,
city.city AS rental_store_city,
film.title AS film_title, film.rental_duration AS film_rental_duration,
film.rental_rate AS film_rental_rate, film.replacement_cost AS film_replacement_cost,
film.rating AS film_rating
FROM rental
INNER JOIN customer ON rental.customer_id == customer.customer_id
INNER JOIN inventory ON rental.inventory_id == inventory.inventory_id
INNER JOIN store ON inventory.store_id == store.store_id
INNER JOIN address ON store.address_id == address.address_id
INNER JOIN city ON address.city_id == city.city_id
INNER JOIN film ON inventory.film_id == film.film_id
;
''', conn, index_col='rental_id', parse_dates=['rental_date', 'return_date'])`
The error message:
OperationalError Traceback (most recent call last)
in ()
----> 1 conn = sqlite3.connect('data/sakila.db')
2
3 df = pd.read_sql('''
4 SELECT
5 rental.rental_id, rental.rental_date, rental.return_date,
OperationalError: unable to open database file---------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered: