Skip to content

Commit

Permalink
use getschema intead of local json2schema
Browse files Browse the repository at this point in the history
  • Loading branch information
daigotanaka committed Nov 26, 2020
1 parent c23108e commit 168c6b1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 225 deletions.
13 changes: 13 additions & 0 deletions bin/release_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

./test/install_test.sh &&

python3 setup.py clean --all
rm -fr dist
rm -fr build
rm -fr tap_bigquery.egg-info
python3 setup.py sdist bdist_wheel

# test
# python3 -m twine upload --repository testpypi dist/*
twine upload dist/*
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
install_requires=[
"attrs==19.3.0",
"backoff==1.8.0",
"getschema>=0.1.0",
"google-cloud-bigquery==1.16.0",
"requests>=2.20.0",
"simplejson==3.11.1",
Expand Down
223 changes: 0 additions & 223 deletions tap_bigquery/json2schema.py

This file was deleted.

4 changes: 2 additions & 2 deletions tap_bigquery/sync_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from google.cloud import bigquery

from . import utils
from . import json2schema
import getschema


LOGGER = utils.get_logger(__name__)
Expand Down Expand Up @@ -98,7 +98,7 @@ def do_discover(config, stream, output_schema_file=None,
if not data:
raise Exception("Cannot infer schema: No record returned.")

schema = json2schema.infer_schema(data)
schema = getschema.infer_schema(data)
if add_timestamp:
timestamp_format = {"type": ["null", "string"],
"format": "date-time"}
Expand Down

0 comments on commit 168c6b1

Please sign in to comment.