Skip to content

Commit

Permalink
add primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiascadee committed Mar 11, 2024
1 parent 4fef4b2 commit c093a8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ plugins:
config:
sheet_name: employees
sheet_id: 1vWbTD0TKoqNs7s5o01vnaiyF4HF8QxjWx4YgvnvaUZQ
primary_keys: [agent_user_id]
project_id: $TAP_GOOGLE_SHEETS_PROJECT_ID
private_key_id: $TAP_GOOGLE_SHEETS_PRIVATE_KEY_ID
private_key: $TAP_GOOGLE_SHEETS_PRIVATE_KEY
Expand Down
1 change: 1 addition & 0 deletions tap_google_sheets/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(
spread = Spread(self.config["sheet_id"], client=client)
self.sheet = spread.sheet_to_df()
self.name = self.config["sheet_name"]
self.primary_keys = self.config["primary_keys"]
super().__init__(tap, schema, name)

@property
Expand Down
6 changes: 6 additions & 0 deletions tap_google_sheets/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ class TapGoogleSheets(Tap):
required=True,
description="Google Sheet name (will be the stream name)",
),
th.Property(
"primary_keys",
th.ArrayType(th.StringType()),
required=True,
description="Google Sheet primary keys",
),
).to_dict()

def discover_streams(self) -> list[client.GoogleSheetsStream]:
Expand Down

0 comments on commit c093a8b

Please sign in to comment.