etat_libre_2020/Verifications.ipynb
2020-05-10 00:21:41 -04:00

134 lines
3.5 KiB
Text

{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The sql extension is already loaded. To reload it, use:\n",
" %reload_ext sql\n"
]
}
],
"source": [
"%load_ext sql\n",
"%config SqlMagic.autocommit=False # for engines that do not support autommit\n",
"%sql postgresql://etatdulibre:etatdulibre@172.23.0.2/etatdulibre"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" postgresql://etatdulibre:***@172.22.0.2/etatdulibre\n",
" * postgresql://etatdulibre:***@172.23.0.2/etatdulibre\n",
"1 rows affected.\n"
]
},
{
"data": {
"text/html": [
"<table>\n",
" <tr>\n",
" <th>pers_id</th>\n",
" <th>nom</th>\n",
" <th>prenom</th>\n",
" <th>projet_id</th>\n",
" <th>pers_id_1</th>\n",
" <th>description</th>\n",
" <th>projet_id_1</th>\n",
" <th>nom_1</th>\n",
" <th>description_1</th>\n",
" <th>projet_id_2</th>\n",
" <th>coord_id</th>\n",
" <th>coord_id_1</th>\n",
" <th>coord_type</th>\n",
" <th>coord_contenu</th>\n",
" </tr>\n",
" <tr>\n",
" <td>1</td>\n",
" <td>Goldenberg</td>\n",
" <td>Anne</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>Auteur</td>\n",
" <td>1</td>\n",
" <td>La négociation des contributions dans les wikis publics : légitimation et politisation de la cognition collective</td>\n",
" <td>Thèse de doctorat</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>URL</td>\n",
" <td>https://archipel.uqam.ca/3904/</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
"[(1, 'Goldenberg', 'Anne', 1, 1, 'Auteur', 1, 'La négociation des contributions dans les wikis publics : légitimation et politisation de la cognition collective', 'Thèse de doctorat', 1, 2, 2, 'URL', 'https://archipel.uqam.ca/3904/')]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%sql\n",
"SELECT * \n",
"FROM \"personne\" A \n",
"LEFT JOIN \"projet_personne\" B \n",
"ON A.pers_id=B.pers_id \n",
"LEFT JOIN \"projet\" C\n",
"ON B.projet_id=C.projet_id \n",
"LEFT JOIN \"projet_coordonnees\" D\n",
"ON C.projet_id=D.projet_id \n",
"LEFT JOIN \"coordonnees\" E\n",
"ON D.coord_id=E.coord_id"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}