chore: update sample data loader to remove sqlite
@@ -22,7 +22,6 @@ https://github.com/amundsen-io/amundsendatabuilder#list-of-extractors
import logging
import os
-import sqlite3
import sys
import uuid
@@ -60,8 +59,6 @@ es = Elasticsearch([
{'host': es_host, 'port': es_port},
])
-DB_FILE = '/tmp/test.db'
-SQLITE_CONN_STRING = 'sqlite:////tmp/test.db'
Base = declarative_base()
NEO4J_ENDPOINT = 'bolt://{}:{}'.format(neo_host, neo_port)
@@ -74,15 +71,6 @@ neo4j_password = 'test'
LOGGER = logging.getLogger(__name__)
-def create_connection(db_file):
- try:
- conn = sqlite3.connect(db_file)
- return conn
- except Exception:
- LOGGER.exception('exception')
- return None
-
-
def run_csv_job(file_loc, job_name, model):
tmp_folder = '/var/tmp/amundsen/{job_name}'.format(job_name=job_name)
node_files_folder = '{tmp_folder}/nodes'.format(tmp_folder=tmp_folder)
@@ -279,7 +267,6 @@ if __name__ == "__main__":
# Uncomment next line to get INFO level logging
# logging.basicConfig(level=logging.INFO)
- if create_connection(DB_FILE):
run_table_column_job('example/sample_data/sample_table.csv', 'example/sample_data/sample_col.csv')
run_csv_job('example/sample_data/sample_table_column_stats.csv', 'test_table_column_stats',
'databuilder.models.table_stats.TableColumnStats')
