<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Setup database connectivity
We'll reuse our module from the previous notebook (00_database_connectivity_setup.ipynb) to establish connectivity to the database
Step1:  Your connection object is conn
Step4:  SELECT query
<ASSISTANT_TASK:>
Python Code:
%run '00_database_connectivity_setup.ipynb'
IPython.display.clear_output()
Explanation: Setup database connectivity
We'll reuse our module from the previous notebook (00_database_connectivity_setup.ipynb) to establish connectivity to the database
End of explanation
%%execsql
drop table if exists gp_ds_sample_table;
create temp table gp_ds_sample_table 
as 
(
    select 
        random() as x,
        random() as y
    from 
        generate_series(1, 10) x
) distributed randomly;
Explanation: Your connection object is conn:
1. Queries: You can run your queries using psql.read_sql(&lt;YOUR SQL&gt;, conn). Alternatively, if you don't want a handle to the resulting dataframe, you can run the code inline using the magic command we defined in previously in cell: %%showsql.
2. Create/Delete/Updates: You can run these statements using psql.execute(&lt;YOUR SQL&gt;, conn), followed by a conn.commit() command to ensure your transaction is committed. Otherwise your changes will be rolledback if you terminate your kernel. Alternatively, you could use the magic command that we previously defined in the cell: %%execsql.
If you created a new connection object (say to connect to a new cluster) as shown in the last section of 00_database_connectivity_setup.ipynb notebook, use that connection object where needed.
Data Exploration
CREATE/UPDATE/DELETE query
End of explanation
%%showsql
select
    *
from
    gp_ds_sample_table;
Explanation: SELECT query
End of explanation
<END_TASK>