{"id":18612389,"url":"https://github.com/winvector/sqlscrewdriver","last_synced_at":"2025-07-29T05:04:34.125Z","repository":{"id":2847099,"uuid":"3850941","full_name":"WinVector/SQLScrewdriver","owner":"WinVector","description":"Iterate through database tables (by JDBC) and TSV(tab separated values)/CSV(comma separated values) and load/dump data.","archived":false,"fork":false,"pushed_at":"2020-06-22T21:19:48.000Z","size":651,"stargazers_count":8,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-11T09:45:19.883Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.win-vector.com/blog/2011/01/sql-screwdriver/","language":"Java","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/WinVector.png","metadata":{"files":{"readme":"README.txt","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}},"created_at":"2012-03-28T02:51:46.000Z","updated_at":"2023-07-25T13:44:35.000Z","dependencies_parsed_at":"2022-08-26T06:52:53.479Z","dependency_job_id":null,"html_url":"https://github.com/WinVector/SQLScrewdriver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WinVector/SQLScrewdriver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinVector%2FSQLScrewdriver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinVector%2FSQLScrewdriver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinVector%2FSQLScrewdriver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinVector%2FSQLScrewdriver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WinVector","download_url":"https://codeload.github.com/WinVector/SQLScrewdriver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinVector%2FSQLScrewdriver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267632858,"owners_count":24118748,"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-07-29T02:00:12.549Z","response_time":2574,"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-07T03:17:00.415Z","updated_at":"2025-07-29T05:04:34.108Z","avatar_url":"https://github.com/WinVector.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nUpdate: 2-5-2016\n\nThis package is getting a bit old (though we do use it for some projects).\nI just added a \"colquote\" key to the db connection properties/xml (see DBUtil.java line 19) to close an issue in using this tool with MySQL.\n\nFor our current advice on semi-generic methods for loading data (such as dbWriteTable() in R) please see here http://www.win-vector.com/blog/2016/02/using-postgresql-in-r/ .\n\n3-27-2012\n\nCrude SQL dump/restore tool (database agnostic, uses JDBC).\n\nDescribed at: http://www.win-vector.com/blog/2011/01/sql-screwdriver/\n\nExample use: dump from one PostgreSQL DB and restore to another (not all column types preserved).\n\n(SQLScrewdriver.jar comes from https://github.com/WinVector/SQLScrewdriver/blob/master/SQLScrewdriver.jar or https://github.com/WinVector/SQLScrewdriver and postgresql.jar is the appropriate DB driver from http://jdbc.postgresql.org/download.html )\n\n# dump the table to TSV from remote database\njava -cp SQLScrewdriver.jar:postgresql.jar com.winvector.db.DBDump file:srvrdb.xml \"SELECT * from model_res_summary\" model_res_summary.tsv\n\n# load the TSV into local database\njava -cp SQLScrewdriver.jar:postgresql.jar com.winvector.db.LoadTable file:db.xml t file:model_res_summary.tsv model_res_summary\n\nand srvdb.xml is:\n\n\u003c!DOCTYPE properties SYSTEM \"http://java.sun.com/dtd/properties.dtd\"\u003e\n\u003cproperties\u003e\n \u003centry key=\"user\"\u003eam\u003c/entry\u003e\n \u003centry key=\"url\"\u003ejdbc:postgresql://192.168.1.9:5432/am\u003c/entry\u003e\n \u003centry key=\"password\"\u003e\u003c/entry\u003e\n \u003centry key=\"driver\"\u003eorg.postgresql.Driver\u003c/entry\u003e\n\u003c/properties\u003e\n\nand db.xml is:\n\n\u003c!DOCTYPE properties SYSTEM \"http://java.sun.com/dtd/properties.dtd\"\u003e\n\u003cproperties\u003e\n \u003centry key=\"user\"\u003eminer_demo\u003c/entry\u003e\n \u003centry key=\"url\"\u003ejdbc:postgresql://localhost:5432/miner_demo\u003c/entry\u003e\n \u003centry key=\"password\"\u003e\u003c/entry\u003e\n \u003centry key=\"driver\"\u003eorg.postgresql.Driver\u003c/entry\u003e\n\u003c/properties\u003e\n\nwith passwords filled in.\n\nAdditional property keys can set the SQL types used to populate integer types, double types and timestamp types.  The defaults are:\n\n \u003centry key=\"SQLDOUBLE\"\u003eDOUBLE PRECISION\u003c/entry\u003e\n \u003centry key=\"SQLINT\"\u003eBIGINT\u003c/entry\u003e\n \u003centry key=\"SQLTIME\"\u003eTIMESTAMP\u003c/entry\u003e\n\nFor Oracle databases we suggest adding the following line to your db properties files:\n\n \u003centry key=\"SQLINT\"\u003eNUMBER\u003c/entry\u003e\n\n\nThe units tests in the test directory can be run if you include Junit and H2 database jars.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinvector%2Fsqlscrewdriver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinvector%2Fsqlscrewdriver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinvector%2Fsqlscrewdriver/lists"}