Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitin Sreeram committed Aug 1, 2024
1 parent 43ba9fa commit f7d0b96
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 20 deletions.
110 changes: 91 additions & 19 deletions Getting_Started/Data_Loading/Data_Loading_R.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
"cell_type": "code",
"execution_count": null,
"id": "337c4b4b-304a-451b-a190-f0e1a3b9cb1c",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"suppressMessages({\n",
Expand All @@ -63,7 +67,11 @@
"cell_type": "code",
"execution_count": null,
"id": "eea8d4bf-ef1d-4c19-92c0-c39e7355a27f",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"td_create_context(\n",
Expand All @@ -79,7 +87,11 @@
"cell_type": "code",
"execution_count": null,
"id": "e521a59c-22a6-49f4-b595-a2bedbbe037c",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"eng = td_get_context()$connection\n",
Expand All @@ -90,7 +102,11 @@
"cell_type": "code",
"execution_count": null,
"id": "397ab263-f861-4552-9324-02caa4ef110c",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"dbExecute(eng, \"SET query_band='DEMO=PP_Data_Loading_R.ipynb;' UPDATE FOR SESSION;\") "
Expand All @@ -100,7 +116,11 @@
"cell_type": "code",
"execution_count": null,
"id": "69553032-1594-4779-9ce1-a067669bab13",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"# display_analytic_functions()"
Expand Down Expand Up @@ -142,7 +162,11 @@
"cell_type": "code",
"execution_count": null,
"id": "98e6bbb7-bf44-4bf0-88b8-579cfb7a3e16",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"df = read.csv('./Retail_Data_sample.csv')"
Expand All @@ -160,7 +184,11 @@
"cell_type": "code",
"execution_count": null,
"id": "8c5d5775-05b0-4e06-8f82-4da50438c61c",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"dim(df)"
Expand All @@ -178,7 +206,11 @@
"cell_type": "code",
"execution_count": null,
"id": "5ce9bdf5-c9dc-4683-b6c4-8e5c3f4b62ee",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"sapply(df, class)"
Expand All @@ -188,7 +220,11 @@
"cell_type": "code",
"execution_count": null,
"id": "62131c28-1f88-43d1-bde4-f3d4cf10ae04",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"head(df, n = 5)"
Expand All @@ -198,7 +234,11 @@
"cell_type": "code",
"execution_count": null,
"id": "42dcec3b-b615-4103-b482-3c29d8453f71",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"class(df)"
Expand All @@ -216,7 +256,11 @@
"cell_type": "code",
"execution_count": null,
"id": "5c88925e-0817-4a52-88b6-41387e322645",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"copy_to(\n",
Expand All @@ -239,7 +283,11 @@
"cell_type": "code",
"execution_count": null,
"id": "f02ff092-2d32-4231-a714-0add7148ba35",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"tdf <- tbl(eng, in_schema(\"demo_user\", \"Retail_Data\"))\n",
Expand All @@ -250,7 +298,11 @@
"cell_type": "code",
"execution_count": null,
"id": "988f3427-2297-49f4-8426-bab7bf6810bb",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"class(tdf)"
Expand All @@ -277,7 +329,11 @@
"cell_type": "code",
"execution_count": null,
"id": "21cbef23-6513-4f71-9cc4-286f381fa535",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"data <- read_csv(\"Retail_Data_sample.zip\", show_col_types = FALSE)\n",
Expand All @@ -288,7 +344,11 @@
"cell_type": "code",
"execution_count": null,
"id": "40e44252-0d28-4f8b-bdea-51cd8fafe9d8",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"copy_to(\n",
Expand All @@ -303,7 +363,11 @@
"cell_type": "code",
"execution_count": null,
"id": "d0fa364c-ff2d-425e-b270-1df08f1fd266",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"tdf_zip <- tbl(eng, in_schema(\"demo_user\", \"Retail_Data_zip\"))\n",
Expand Down Expand Up @@ -332,7 +396,11 @@
"cell_type": "code",
"execution_count": null,
"id": "42fd1deb-79b5-498c-9104-74d987a84db0",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"tables <- c('Retail_Data', 'Retail_Data_zip')\n",
Expand All @@ -357,7 +425,11 @@
"cell_type": "code",
"execution_count": null,
"id": "a7c8a977-6d72-4053-8acf-b4b6970975d0",
"metadata": {},
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"td_remove_context()"
Expand All @@ -384,7 +456,7 @@
" <div style=\"float:left;margin-top:14px\">ClearScape Analytics™</div>\n",
" <div style=\"float:right;\">\n",
" <div style=\"float:left; margin-top:14px\">\n",
" Copyright © Teradata Corporation - 2024. All Rights Reserved\n",
" Copyright © Teradata Corporation - 2024. All Rights Reserved.\n",
" </div>\n",
" </div>\n",
"</footer>"
Expand Down
2 changes: 1 addition & 1 deletion ModelOps/09_ModelOps_GIT_PIMA_Python_XGboost.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@
" <div style=\"float:left;margin-top:14px\">ClearScape Analytics™</div>\n",
" <div style=\"float:right;\">\n",
" <div style=\"float:left; margin-top:14px\">\n",
" Copyright © Teradata Corporation - 2023. All Rights Reserved.\n",
" Copyright © Teradata Corporation - 2023. All Rights Reserved\n",
" </div>\n",
" </div>\n",
"</footer>"
Expand Down

0 comments on commit f7d0b96

Please sign in to comment.