Skip to content

Commit

Permalink
locked sqlalchemy version
Browse files Browse the repository at this point in the history
  • Loading branch information
jlloyd-widen committed Jan 19, 2024
1 parent d1dee00 commit d00d88a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
28 changes: 18 additions & 10 deletions meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,25 @@ plugins:
kind: array
config:
custom_streams:
- name: example_query_name
db_schemas:
- db_schema1
- db_schema2
sql: SELECT * FROM {db_schema}.table1 LIMIT 5
- name: example_query_name2
db_schemas:
- db_schema1
sql: SELECT * FROM db_schema1.table1 LIMIT 5
- name: storage_snapshots
db_schemas:
- bquinn
- caseih
sql: >
SELECT
SUM(fileSize) / 1024 / 1024 / 1024 AS storage_gb
, '2024-01-01' AS snapshot_date
FROM {db_schema}.filesondisk AS f
join {db_schema}.assetversion AS v ON f.id = v.originalFile
join {db_schema}.directorasset as d on v.parentAsset = d.id
WHERE
v.dateAdded < '2024-01-01 05:00:00'
AND (v.dateDeleted IS NULL OR v.dateDeleted > '2024-01-01 05:00:00')
AND (d.dateRemoved IS NULL OR d.dateRemoved > '2024-01-01 05:00:00')
AND (d.archiveDate IS NULL OR d.archiveDate > '2024-01-01 05:00:00')
select:
- '*-storage_snapshot.*'
- '*-storage_snapshots.*'
loaders:
- name: target-jsonl
variant: andyh1203
Expand Down
13 changes: 12 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ python = "<3.12,>=3.7.1"
singer-sdk = { version="^0.34.0" }
fs-s3fs = { version = "^1.1.1", optional = true }
pymysql = "^1.0.3"
sqlalchemy = "^2.0.25"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.1"
Expand Down
2 changes: 1 addition & 1 deletion tap_mysql/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def discover_catalog_entries(self) -> list[dict]:
custom_result = connection.execute(query)
custom_rec = custom_result.fetchone()
# inject the table_schema into the list of columns
custom_rec_keys = list(custom_rec.keys()) + ["mysql_schema"]
custom_rec_keys = list(custom_rec._fields) + ["mysql_schema"]

# note that all columns are forced to be strings to avoid
# the complexity of inferring their data types. Warning this
Expand Down

0 comments on commit d00d88a

Please sign in to comment.