{"id":21074171,"url":"https://github.com/tomaztk/connection-strings-r","last_synced_at":"2025-10-23T21:27:35.399Z","repository":{"id":131355969,"uuid":"456082443","full_name":"tomaztk/Connection-strings-R","owner":"tomaztk","description":"Curated list of different connection strings for R Language","archived":false,"fork":false,"pushed_at":"2022-02-22T04:47:44.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T21:54:47.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomaztk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-06T07:18:13.000Z","updated_at":"2024-10-05T12:44:55.000Z","dependencies_parsed_at":"2023-03-27T23:36:07.948Z","dependency_job_id":null,"html_url":"https://github.com/tomaztk/Connection-strings-R","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomaztk/Connection-strings-R","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaztk%2FConnection-strings-R","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaztk%2FConnection-strings-R/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaztk%2FConnection-strings-R/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaztk%2FConnection-strings-R/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomaztk","download_url":"https://codeload.github.com/tomaztk/Connection-strings-R/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaztk%2FConnection-strings-R/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280695221,"owners_count":26375024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T19:14:54.067Z","updated_at":"2025-10-23T21:27:35.363Z","avatar_url":"https://github.com/tomaztk.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Curated list of connection strings for R Language\n\n\n## Motivation:\nTo created a curated list of many different connections strings in R language, to get (or to post) the data. Many times, finding the connection string can be tedious and hence, delivering everything on one page, should minimize the time for the search.\n\n## Idea\nPrepare a curated list of the sources. This list will also include all the necessary steps to get the data into R environment.\n\nE.g.: Sources -\u003e Flat files -\u003e TXT\n\n```R\npath \u003c- \"/data/flat_file/sample.txt\"\n```\n\nAll the sample data is included in the repository (under folder `data`). Follow the script to use the file format.\n\n\n# Flat file sources\n\nMost common of the file sources will be flat file sources.\nAll these files are available in repository under folder `data/flat_file`.\n\n### TXT\n\nRead TXT files or files with delimited format.\n\n```R\nsetwd(\"users/tomazkastrun/documents/tomaztk_github/data/flat_file\")\ndata_txt \u003c- read.delim(\"sample.txt\", header = TRUE, sep = \"\\t\", dec = \".\")\n```\n\n\n### CSV\n\nRead CSV (comma separated values) files or files with specified separator character (semicolon, pipe, comma).\n\n```R\nsetwd(\"users/tomazkastrun/documents/tomaztk_github/data/flat_file\")\n# Read a csv file, getting data from sample.csv file\ndata_csv \u003c- read.csv(\"sample.csv\", header = TRUE, sep = \",\", dec = \".\")\n```\n\n### JSON\n\nRead JSON format files. Using `listviewer` R package for pretty view of JSON nodes.\n\n```R\nlibrary(jsonlite)\nlibrary(listviewer)\ndata_json \u003c- fromJSON(\"sample.json\", simplifyVector = FALSE)\njsonedit(data_json, height = \"400px\", mode = \"view\")\n```\n\n\n# Database and database file formats\n\n\n### Microsoft SQL Server\n\nConnect to Microsoft SQL server using R package `odbc` and read data from SQL tables by using SELECT statements or calling stored procedures. Library also supports INSERT, UPDATE, DELETE statements.\n\n```R\n# install.packages(\"odbc\")\nlibrary(odbc)\n\n con \u003c- dbConnect(odbc()\n                  ,Driver = \"SQL Server\"\n                  ,Server = \"MSSQLSERVER2019\"\n                  ,Database = \"bikestore\"\n                  ,trusted_connection=\"true\"\n                  ,Port = 1433)\n\n\ndbConnection \u003c- 'Driver={SQL Server}; Server=MSSQLSERVER2019; Database=bikestore; Trusted_Connection=Yes'\n\ndbGetQuery(, \"SELECT * FROM dbo.sample_table\")\nsqlQuery( dbConnection, \"SELECT * FROM dbo.sample_table\" )\n```\n\n### PostgresSQL\n\n```R\n#install.packages('RPostgreSQL')\n#install.packages('RPostgres')\n\nlibrary('RPostgres')\nlibrary(DBI)\ndb \u003c- 'postgres'  #provide the name of your db\nhost_db \u003c- 'localhost'\ndb_port \u003c- '5432'  \ndb_user \u003c- 'postgres'  \ndb_password \u003c- ''\ncon \u003c- dbConnect(RPostgres::Postgres(), dbname = db, host=host_db, port=db_port, user=db_user, password=db_password)  \n\ndbGetQuery(con, 'SELECT * FROM sample_table')\ndbDisconnect(con) \n\n```\n\n### Oracle\n\n### MySQL\n\n\n```R\n#install.packages(\"RMySQL\")\nlibrary(RMySQL)\nlibrary(DBI)\n\nmydb = dbConnect(MySQL(), user='mysqluser', password='LastChristmas2000.', dbname='AdventureWorks', host='localhost')\ndf \u003c- data.frame(dbSendQuery(mydb, 'SELECT * FROM my_table'))\n```\n\n\n### MongoDB\n\n### Hadoop\n\n### Snowflake\n\n\n# Database files\n\n### Apache Spark\n\n### AVRO\n\n### Parquet\n\n\n\n# External sources\n\n\n### Web URL / HTML\n\n### RSS\n\n### API \n\n### FTP\n\n\n\n\n# Cloud storage\n\n### Azure - blob storage\n\n### AWS - S3 Bucket\n\n### Google Cloud - ?\n\n### Rabbit MQ\n\n### Databricks\n\n\n# Applications for data engineering and data science\n\n### SAS\n\n### KNIME\n\n### SPSS\n\n### Excel\n\n### Weka\n\n### Orange\n\n\n# Other languages\n\n### Powershell\n\n### Python\n\n### C#\n\n\n# List of all used R packages\n\nInstalling packages:\n```R\n# Example\ninstall.packages(\"jsonlite\", dependencies = TRUE)\ninstall.packages(\"DBI\", dependencies = TRUE)\n```\n\n\n\n1. jsonlite (Link to: [CRAN](https://cran.r-project.org/web/packages/jsonlite/index.html))\n1. DBI (Link to [CRAN](https://cran.r-project.org/web/packages/DBI/index.html))\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaztk%2Fconnection-strings-r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomaztk%2Fconnection-strings-r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaztk%2Fconnection-strings-r/lists"}