diff --git a/databuilder/dist/amundsen_databuilder-7.4.3-py3.10.egg b/databuilder/dist/amundsen_databuilder-7.4.3-py3.10.egg new file mode 100644 index 0000000000..57c92cbec7 Binary files /dev/null and b/databuilder/dist/amundsen_databuilder-7.4.3-py3.10.egg differ diff --git a/databuilder/example/scripts/sample_mysql_loader.py b/databuilder/example/scripts/sample_mysql_loader.py index 3a9d27271b..34d43acab1 100644 --- a/databuilder/example/scripts/sample_mysql_loader.py +++ b/databuilder/example/scripts/sample_mysql_loader.py @@ -6,12 +6,14 @@ into Neo4j and Elasticsearch without using an Airflow DAG. """ - +import pymysql import logging import sys import textwrap import uuid +pymysql.install_as_MySQLdb() + from elasticsearch import Elasticsearch from pyhocon import ConfigFactory from sqlalchemy.ext.declarative import declarative_base @@ -56,11 +58,12 @@ # todo: connection string needs to change def connection_string(): - user = 'username' + user = 'root' + password='root' host = 'localhost' - port = '3306' - db = 'mysql' - return "mysql://%s@%s:%s/%s" % (user, host, port, db) + port = '3307' + db = 'test_db' + return "mysql+pymysql://%s:%s@%s:%s/%s" % (user,password, host, port, db) def run_mysql_job(): @@ -83,6 +86,7 @@ def run_mysql_job(): f'publisher.neo4j.{neo4j_csv_publisher.NEO4J_END_POINT_KEY}': neo4j_endpoint, f'publisher.neo4j.{neo4j_csv_publisher.NEO4J_USER}': neo4j_user, f'publisher.neo4j.{neo4j_csv_publisher.NEO4J_PASSWORD}': neo4j_password, + f'publisher.neo4j.{neo4j_csv_publisher.NEO4J_ENCRYPTED}': False, f'publisher.neo4j.{neo4j_csv_publisher.JOB_PUBLISH_TAG}': 'unique_tag', # should use unique tag here like {ds} }) job = DefaultJob(conf=job_config, diff --git a/databuilder/setup.py b/databuilder/setup.py index ac0747e5a1..1af1f5fae7 100644 --- a/databuilder/setup.py +++ b/databuilder/setup.py @@ -8,12 +8,12 @@ __version__ = '7.4.3' requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), - 'requirements.txt') + '../requirements.txt') with open(requirements_path, 'r') as requirements_file: requirements = requirements_file.readlines() requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), - 'requirements-dev.txt') + '../requirements-dev.txt') with open(requirements_path, 'r') as requirements_file: requirements_dev = requirements_file.readlines()