Skip to content

import_db(other, if_exists = 'fail', **kwargs):

Marcel Ferrari edited this page Mar 2, 2023 · 2 revisions

Import tables from external database.

Function

import_db(other, if_exists = 'fail', **kwargs): -> None
  • other: path to database or PandaSQLite database object.
  • if_exists: behavior in case of table name conflicts. Can be 'fail', 'replace' or 'append'.

Example

# Import data from database at './example/data.sql'
db.import_db('./example/data.sql')

# Import other PandaSQLite object
other_db = PandaSQLiteDB('./example/data.sql')
db.import_db(other_db)