yourusername commited on
Commit
bb5c855
·
1 Parent(s): bea5157

:beers: cheers

Browse files
Files changed (1) hide show
  1. sqllitetest.py +4 -3
sqllitetest.py CHANGED
@@ -34,8 +34,7 @@ _LICENSE = ""
34
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
35
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
36
  _URLS = {
37
- "first_domain": "https://huggingface.co/great-new-dataset-first_domain.zip",
38
- "second_domain": "https://huggingface.co/great-new-dataset-second_domain.zip",
39
  }
40
 
41
 
@@ -82,9 +81,11 @@ class NewDataset(datasets.GeneratorBasedBuilder):
82
 
83
  def _split_generators(self, dl_manager):
84
 
 
 
85
  # NOTE - Here is where you would put actual connection details if you're connecting to a database
86
  # For the sake of this example, we use a local path to a sqllite file.
87
- conn = sqlite3.connect("test.db")
88
 
89
  # Execute a query and get the cursor object back, which we'll use to iterate over
90
  curr = conn.execute("SELECT * FROM Employees")
 
34
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
35
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
36
  _URLS = {
37
+ "train": "https://huggingface.co/datasets/nateraw/sqllitetest/resolve/main/test.db",
 
38
  }
39
 
40
 
 
81
 
82
  def _split_generators(self, dl_manager):
83
 
84
+ db_file = dl_manager.download(_URLS["train"])
85
+
86
  # NOTE - Here is where you would put actual connection details if you're connecting to a database
87
  # For the sake of this example, we use a local path to a sqllite file.
88
+ conn = sqlite3.connect(db_file)
89
 
90
  # Execute a query and get the cursor object back, which we'll use to iterate over
91
  curr = conn.execute("SELECT * FROM Employees")