-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sean Preston <[email protected]> Co-authored-by: Adrian Galvan <[email protected]>
- Loading branch information
1 parent
af56c29
commit ad8fda3
Showing
31 changed files
with
1,084 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
clients/admin-ui/public/images/connector-logos/dynamodb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
dataset: | ||
- fides_key: dynamodb_example_test_dataset | ||
name: DynamoDB Example Test Dataset | ||
description: Example of a DynamoDB dataset containing a single customer table | ||
collections: | ||
- name: customer_identifier | ||
fields: | ||
- name: customer_id | ||
data_categories: [user.unique_id] | ||
fides_meta: | ||
references: | ||
- dataset: dynamodb_example_test_dataset | ||
field: customer.id | ||
direction: to | ||
- dataset: dynamodb_example_test_dataset | ||
field: login.customer_id | ||
direction: to | ||
- name: created | ||
data_categories: [system.operations] | ||
- name: email | ||
data_categories: [user.contact.email] | ||
fides_meta: | ||
primary_key: True | ||
identity: email | ||
data_type: string | ||
- name: name | ||
data_categories: [user.name] | ||
- name: address | ||
fields: | ||
- name: city | ||
data_categories: [user.contact.address.city] | ||
- name: house | ||
data_categories: [user.contact.address.street] | ||
- name: id | ||
data_categories: [system.operations] | ||
fides_meta: | ||
primary_key: True | ||
- name: state | ||
data_categories: [user.contact.address.state] | ||
- name: street | ||
data_categories: [user.contact.address.street] | ||
- name: zip | ||
data_categories: [user.contact.address.postal_code] | ||
- name: customer | ||
fields: | ||
- name: address_id | ||
data_categories: [system.operations] | ||
fides_meta: | ||
references: | ||
- dataset: dynamodb_example_test_dataset | ||
field: address.id | ||
direction: to | ||
- name: created | ||
data_categories: [system.operations] | ||
- name: customer_email | ||
data_categories: [user.contact.email] | ||
fides_meta: | ||
identity: email | ||
data_type: string | ||
- name: id | ||
data_categories: [user.unique_id] | ||
fides_meta: | ||
primary_key: True | ||
- name: name | ||
data_categories: [user.name] | ||
- name: login | ||
fields: | ||
- name: customer_id | ||
data_categories: [user.unique_id] | ||
fides_meta: | ||
primary_key: True | ||
- name: login_date | ||
data_categories: [system.operations] | ||
- name: name | ||
data_categories: [user.name] | ||
- name: customer_email | ||
data_categories: [user.contact.email] | ||
fides_meta: | ||
identity: email | ||
data_type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/fides/api/ctl/migrations/versions/fc04e3e637c0_add_dynamodb_to_connector_list.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"""add dynamodb to connector list | ||
Revision ID: fc04e3e637c0 | ||
Revises: 15a3e7483249 | ||
Create Date: 2023-04-14 10:19:50.681752 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "fc04e3e637c0" | ||
down_revision = "15a3e7483249" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# Add 'dynamodb' to ConnectionType enum | ||
op.execute("alter type connectiontype rename to connectiontype_old") | ||
op.execute( | ||
"create type connectiontype as enum('postgres', 'mongodb', 'mysql', 'https', " | ||
"'snowflake', 'redshift', 'mssql', 'mariadb', 'bigquery', 'saas', 'manual', " | ||
"'manual_webhook', 'timescale', 'fides', 'sovrn', 'attentive', 'dynamodb')" | ||
) | ||
op.execute( | ||
( | ||
"alter table connectionconfig alter column connection_type type connectiontype using " | ||
"connection_type::text::connectiontype" | ||
) | ||
) | ||
op.execute("drop type connectiontype_old") | ||
|
||
|
||
def downgrade(): | ||
# Remove dynamodb from the connectiontype enum | ||
op.execute("delete from connectionconfig where connection_type in ('dynamodb')") | ||
op.execute("alter type connectiontype rename to connectiontype_old") | ||
op.execute( | ||
"create type connectiontype as enum('postgres', 'mongodb', 'mysql', 'https', " | ||
"'snowflake', 'redshift', 'mssql', 'mariadb', 'bigquery', 'saas', 'manual', " | ||
"'email', 'manual_webhook', 'timescale', 'fides', 'sovrn', 'attentive')" | ||
) | ||
op.execute( | ||
( | ||
"alter table connectionconfig alter column connection_type type connectiontype using " | ||
"connection_type::text::connectiontype" | ||
) | ||
) | ||
op.execute("drop type connectiontype_old") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/fides/api/ops/schemas/connection_configuration/connection_secrets_dynamodb.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from typing import List | ||
|
||
from fides.api.ops.schemas.base_class import NoValidationSchema | ||
from fides.api.ops.schemas.connection_configuration.connection_secrets import ( | ||
ConnectionConfigSecretsSchema, | ||
) | ||
|
||
|
||
class DynamoDBSchema(ConnectionConfigSecretsSchema): | ||
"""Schema to validate the secrets needed to connect to an Amazon DynamoDB cluster""" | ||
|
||
region_name: str | ||
aws_secret_access_key: str | ||
aws_access_key_id: str | ||
|
||
_required_components: List[str] = [ | ||
"region_name", | ||
"aws_secret_access_key", | ||
"aws_access_key_id", | ||
] | ||
|
||
|
||
class DynamoDBDocsSchema(DynamoDBSchema, NoValidationSchema): | ||
"""DynamoDB Secrets Schema for API Docs""" |
Oops, something went wrong.