mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-21 07:28:44 +00:00
Add unit test for dynamodb
This commit is contained in:
parent
2732906059
commit
b64384e84a
@ -19,7 +19,7 @@ from metadata.ingestion.api.common import Entity
|
|||||||
from metadata.ingestion.api.source import InvalidSourceException, Source, SourceStatus
|
from metadata.ingestion.api.source import InvalidSourceException, Source, SourceStatus
|
||||||
from metadata.ingestion.models.ometa_table_db import OMetaDatabaseAndTable
|
from metadata.ingestion.models.ometa_table_db import OMetaDatabaseAndTable
|
||||||
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
||||||
from metadata.ingestion.source.sql_source_common import SQLSourceStatus
|
from metadata.ingestion.source.sql_source import SQLSourceStatus
|
||||||
from metadata.utils.aws_client import AWSClient
|
from metadata.utils.aws_client import AWSClient
|
||||||
from metadata.utils.column_type_parser import ColumnTypeParser
|
from metadata.utils.column_type_parser import ColumnTypeParser
|
||||||
from metadata.utils.filters import filter_by_table
|
from metadata.utils.filters import filter_by_table
|
||||||
@ -27,8 +27,6 @@ from metadata.utils.helpers import get_database_service_or_create
|
|||||||
|
|
||||||
logger: logging.Logger = logging.getLogger(__name__)
|
logger: logging.Logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
from metadata.generated.schema.entity.data.databaseSchema import DatabaseSchema
|
|
||||||
|
|
||||||
|
|
||||||
class DynamodbSource(Source[Entity]):
|
class DynamodbSource(Source[Entity]):
|
||||||
def __init__(self, config, metadata_config: OpenMetadataServerConfig):
|
def __init__(self, config, metadata_config: OpenMetadataServerConfig):
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Query parser utils tests
|
Dynamodb unit test
|
||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
@ -24,35 +24,40 @@ from metadata.ingestion.models.ometa_table_db import OMetaDatabaseAndTable
|
|||||||
|
|
||||||
CONFIG = """
|
CONFIG = """
|
||||||
{
|
{
|
||||||
"source": {
|
"source": {
|
||||||
"type": "dynamodb",
|
"type": "dynamodb",
|
||||||
|
"serviceName": "local_dynamodb",
|
||||||
|
"serviceConnection": {
|
||||||
"config": {
|
"config": {
|
||||||
"aws_access_key_id": "aws_access_key_id",
|
"awsAccessKeyId": "aws_access_key_id",
|
||||||
"aws_secret_access_key": "aws_secret_access_key",
|
"awsSecretAccessKey": "aws_secret_access_key",
|
||||||
"service_name": "DynamoDBTest",
|
"awsRegion": "us-east-2",
|
||||||
"region_name": "us-east-2",
|
"endPointURL": "https://dynamodb.us-east-2.amazonaws.com",
|
||||||
"endpoint_url": "https://dynamodb.us-east-2.amazonaws.com",
|
"database": "custom_database_name"
|
||||||
"db_name":"custom_database_name",
|
}
|
||||||
"table_filter_pattern":{
|
},
|
||||||
"excludes": ["Music.*"]
|
"sourceConfig": {
|
||||||
|
"config": {
|
||||||
|
"enableDataProfiler": false,
|
||||||
|
"tableFilterPattern": {
|
||||||
|
"includes": [""]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"sink": {
|
},
|
||||||
"type": "file",
|
"sink": {
|
||||||
"config": {
|
"type": "file",
|
||||||
"filename": "./datasets.json"
|
"config": {
|
||||||
}
|
"filename": "/var/tmp/datasets.json"
|
||||||
},
|
}
|
||||||
"metadata_server": {
|
},
|
||||||
"type": "metadata-server",
|
"workflowConfig": {
|
||||||
"config": {
|
"openMetadataServerConfig": {
|
||||||
"api_endpoint": "http://localhost:8585/api",
|
"hostPort": "http://localhost:8585/api",
|
||||||
"auth_provider_type": "no-auth"
|
"authProvider": "no-auth"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user