Skip to content

Commit 648fb31

Browse files
committed
Revert "Update tutorials/01-DataJoint Basics.ipynb"
This reverts commit 556e22d.
1 parent f635457 commit 648fb31

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

tutorials/01-DataJoint Basics.ipynb

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,81 @@
15171517
"Mouse.delete()"
15181518
]
15191519
},
1520+
{
1521+
"cell_type": "code",
1522+
"execution_count": null,
1523+
"metadata": {},
1524+
"outputs": [],
1525+
"source": [
1526+
"Mouse()"
1527+
]
1528+
},
1529+
{
1530+
"cell_type": "markdown",
1531+
"metadata": {},
1532+
"source": [
1533+
"Note that the `.delete()` method not only delete the entries in a table, but also all the corresponding entries in subsequent (downstream) tables!"
1534+
]
1535+
},
1536+
{
1537+
"cell_type": "markdown",
1538+
"metadata": {},
1539+
"source": [
1540+
"### 6. Drop (`.drop()`): remove the table from the schema"
1541+
]
1542+
},
1543+
{
1544+
"cell_type": "markdown",
1545+
"metadata": {},
1546+
"source": [
1547+
"Contrary to the `.delete()` method - where the table is preserved but its content is deleted - with `.drop()` we remove the whole table from the pipeline. \n",
1548+
"\n",
1549+
"Again, `drop()` method not only drop the whole table, but also all the subsequent (downstream) tables."
1550+
]
1551+
},
1552+
{
1553+
"cell_type": "code",
1554+
"execution_count": null,
1555+
"metadata": {},
1556+
"outputs": [],
1557+
"source": [
1558+
"dj.Diagram(schema)"
1559+
]
1560+
},
1561+
{
1562+
"cell_type": "markdown",
1563+
"metadata": {},
1564+
"source": [
1565+
"Remember, again, that after running the following method, you will be asked to confirm to commit the delete:"
1566+
]
1567+
},
1568+
{
1569+
"cell_type": "code",
1570+
"execution_count": null,
1571+
"metadata": {},
1572+
"outputs": [],
1573+
"source": [
1574+
"Session.drop()"
1575+
]
1576+
},
1577+
{
1578+
"cell_type": "code",
1579+
"execution_count": null,
1580+
"metadata": {},
1581+
"outputs": [],
1582+
"source": [
1583+
"dj.Diagram(schema)"
1584+
]
1585+
},
1586+
{
1587+
"cell_type": "code",
1588+
"execution_count": null,
1589+
"metadata": {},
1590+
"outputs": [],
1591+
"source": [
1592+
"schema.drop()"
1593+
]
1594+
},
15201595
{
15211596
"cell_type": "markdown",
15221597
"metadata": {},

0 commit comments

Comments
 (0)