Python Forum
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected argument
#9
It is a straight forward procedure in any relational database management system that I have worked with to unload a complete schema to external files.

I don't know how to do this in MySQL, here's how it's done in sqlite3, MySql will have some sort of dump program
The database is one of mine:

sqlite3 StockMktDb
sqlite>
sqlite> .output StockMktDb.sql
sqlite> .dump
sqlite> .quit
partial results:
Output:
PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE ASXListed ( CompanyName VARCHAR, AsxSymbol VARCHAR, GicsIndustryGroup VARCHAR); INSERT INTO "ASXListed" VALUES('Company name','ASX code','GICS industry group'); INSERT INTO "ASXListed" VALUES('MOQ LIMITED','MOQ','Software & Services'); INSERT INTO "ASXListed" VALUES('1-PAGE LIMITED','1PG','Software & Services'); INSERT INTO "ASXListed" VALUES('1300 SMILES LIMITED','ONT','Health Care Equipment & Services'); INSERT INTO "ASXListed" VALUES('1ST AVAILABLE LTD','1ST','Health Care Equipment & Services'); INSERT INTO "ASXListed" VALUES('333D LIMITED','T3D','Food, Beverage & Tobacco');
However, that aside, once a database has been dumped to .sql files, it's

a simple procedure to reload in sqlite3.
sqlite3 newdb
sqlite> .read StockMktDb.sql
That's all there is to it
Reply


Messages In This Thread
Unexpected argument - by jstockton - Feb-20-2017, 05:53 PM
RE: Unexpected argument - by Larz60+ - Feb-20-2017, 06:20 PM
RE: Unexpected argument - by jstockton - Feb-20-2017, 06:24 PM
RE: Unexpected argument - by Larz60+ - Feb-20-2017, 06:26 PM
RE: Unexpected argument - by jstockton - Feb-20-2017, 06:37 PM
RE: Unexpected argument - by snippsat - Feb-20-2017, 06:44 PM
RE: Unexpected argument - by jstockton - Feb-20-2017, 06:52 PM
RE: Unexpected argument - by Larz60+ - Feb-20-2017, 06:49 PM
RE: Unexpected argument - by jstockton - Feb-21-2017, 01:27 AM
RE: Unexpected argument - by Larz60+ - Feb-20-2017, 08:28 PM
RE: Unexpected argument - by Larz60+ - Feb-21-2017, 02:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Django "Unexpected Keyword Argument 'min_value'" AstralWeeks 0 342 Mar-27-2024, 04:56 AM
Last Post: AstralWeeks
  TypeError: __init__() got an unexpected keyword argument 'value' Anldra12 7 22,992 May-11-2021, 06:35 PM
Last Post: deanhystad
  TypeError: coerce_kw_type() got an unexpected keyword argument 'dest' juniii 1 2,499 Apr-24-2020, 01:53 PM
Last Post: Jeff900
  SyntaxError: positional argument follows keyword argument syd_jat 3 5,978 Mar-03-2020, 08:34 AM
Last Post: buran
  __call__() got an unexpected keyword argument 'text' saba_keon 5 9,613 Apr-07-2018, 11:11 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020