Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jlloyd-widen committed Jan 12, 2024
1 parent ab65ba0 commit b6e1f45
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 41 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ has the following properties:
| Property | Required | Default | Description |
|:-------------|:--------:|:-------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| name | True | None | The name of the custom stream. |
| db_schemas | False | None | An array of schema names of the MySQL instance that is being queried. The same query will be run against each schema. |
| db_schemas | False | [] | An array of schema names of the MySQL instance that is being queried. The same query will be run against each schema. |
| sql | True | None | The custom sql query to use for this stream. If provided, the string `{db_schema}` will be replaced with the schema name(s) from the `db_schemas` property.}` |
| primary_keys | False | None | The primary keys of the custom stream. |
| primary_keys | False | [] | The primary keys of the custom stream. |

### Configure using environment variables

Expand Down
17 changes: 8 additions & 9 deletions meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ plugins:
kind: array
config:
custom_streams:
- name: example_table_name
- name: example_query_name
db_schemas:
- example1
- example2
sql: SELECT * FROM {db_schema}.filesondisk LIMIT 5
- name: example_table_name2
- db_schema1
- db_schema2
sql: SELECT * FROM {db_schema}.table1 LIMIT 5
- name: example_query_name2
db_schemas:
- example1
sql: SELECT * FROM example1.filesondisk LIMIT 5
- db_schema1
sql: SELECT * FROM db_schema1.table1 LIMIT 5
select:
- '*-example_table_name.*'
- 'example1-example_table_name2.*'
- '*-storage_snapshot.*'
loaders:
- name: target-jsonl
variant: andyh1203
Expand Down
5 changes: 3 additions & 2 deletions tap_mysql/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@ class TapMySQL(SQLTap):
th.Property(
"name",
th.StringType,
required=False,
required=True,
description="The name of the custom stream",
),
th.Property(
"db_schemas",
th.ArrayType(th.StringType),
required=False,
default=[],
description="An array of schema names of the MySQL instance that is being "
"queried. The same query will be run against each schema.",
),
th.Property(
"sql",
th.StringType,
required=False,
required=True,
description="The custom sql query to use for this stream. If provided, the "
"string `{db_schema}` will be replaced with the schema name(s) "
"from the `db_schemas` property.}`",
Expand Down
28 changes: 0 additions & 28 deletions tests/test_core.py

This file was deleted.

0 comments on commit b6e1f45

Please sign in to comment.