class_docstr: Build a SQLite database from folder with txt files, json files or
  `Wiki Extractor <https://github.com/attardi/wikiextractor>`_ files.
class_docstr_tok: ["Build","a","SQLite","database","from","folder","with","txt","files",",","json","files","or","`","Wiki","Extractor","<","https",":","\/\/github.com\/attardi\/wikiextractor",">","`","_","files","."]
docstr: Build a SQLite database from provided files, download SQLite database from a provided URL,
   or do nothing.
  
  Args:
      data_path: a directory/file with texts to create a database from
      db_url: path to a database url
      kwargs:
          save_path: a path where a database should be saved to, or path to a ready database
          dataset_format: initial data format; should be selected from ['txt', 'wiki', 'json']
  
  Returns:
      None
docstr_tok: ["Build","a","SQLite","database","from","provided","files",",","download","SQLite","database","from","a","provided","URL",",","or","do","nothing",".","Args",":","data_path",":","a","directory\/file","with","texts","to","create","a","database","from","db_url",":","path","to","a","database","url","kwargs",":","save_path",":","a","path","where","a","database","should","be","saved","to",",","or","path","to","a","ready","database","dataset_format",":","initial","data","format",";","should","be","selected","from","[","'txt","'",",","'wiki","'",",","'json","'","]","Returns",":","None"]
code: def read(
      self,
      data_path: Union[Path, str],
      db_url: Optional[str] = None,
      *args,
      **kwargs,
  ) -> None:
      """Build a SQLite database from provided files, download SQLite database from a provided URL,
       or do nothing.
  
      Args:
          data_path: a directory/file with texts to create a database from
          db_url: path to a database url
          kwargs:
              save_path: a path where a database should be saved to, or path to a ready database
              dataset_format: initial data format; should be selected from ['txt', 'wiki', 'json']
  
      Returns:
          None
  
      """
      logger.info("Reading files...")
      try:
          save_path = expand_path(kwargs["save_path"])
      except KeyError:
          raise ConfigError(
              f'"save_path" attribute should be set for {self.__class__.__name__}\
                   in the JSON config.'
          )
      if (
          save_path.exists()
          and save_path.with_suffix(f"{save_path.suffix}.done").exists()
      ):
          return
      try:
          dataset_format = kwargs["dataset_format"]
      except KeyError:
          raise ConfigError(
              f'"dataset_format" attribute should be set for {self.__class__.__name__}\
                   in the JSON config.'
          )
  
      save_path.parent.mkdir(parents=True, exist_ok=True)
  
      if db_url:
          download_dir = save_path.parent
          logger.info(
              f"Downloading database from {db_url} to {download_dir}"
          )
          download(download_dir, db_url, force_download=False)
          return
  
      self._build_db(save_path, dataset_format, expand_path(data_path))
  
imports: import json
  import logging
  import sqlite3
  import unicodedata
  from multiprocessing import Pool
  from pathlib import Path
  from typing import Union, List, Tuple, Generator, Any, Optional
  from tqdm import tqdm
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.errors import ConfigError
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.dataset_reader import DatasetReader
  from deeppavlov.core.data.utils import download
label_desc: Use image node_id 1 for calling the ODQADataReader obj's underlying member method code with example usage: obj.read(data_path, db_url) without return types