mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-07 00:28:02 +00:00

Implementation details I have decided to rename schema_name to database and make it mandatory. Without database there is an error while scanning all available tables. The connector doesn't support multiple databases at the moment. It has to be tested with passwords. Trino requires SSL if you use passwords. It has to be tested with impersonation. I have removed quote_plus because I don't think it's needed. - [x] Support username - [ ] There is an integration test - [ ] Support impersonation - [ ] Support passwords - [ ] Support tokens - [ ] Support multiple databases
44 lines
988 B
Python
44 lines
988 B
Python
import json
|
|
from unittest import TestCase
|
|
|
|
from metadata.ingestion.api.workflow import Workflow
|
|
|
|
config = """
|
|
{
|
|
"source": {
|
|
"type": "trino",
|
|
"config": {
|
|
"service_name": "local_trino",
|
|
"host_port": "localhost:8080",
|
|
"username": "user",
|
|
"catalog": "tpcds",
|
|
"database": "tiny"
|
|
}
|
|
},
|
|
"sink": {
|
|
"type": "metadata-rest",
|
|
"config": {}
|
|
},
|
|
"metadata_server": {
|
|
"type": "metadata-server",
|
|
"config": {
|
|
"api_endpoint": "http://localhost:8585/api",
|
|
"auth_provider_type": "no-auth"
|
|
}
|
|
}
|
|
}
|
|
"""
|
|
|
|
|
|
class WorkflowTest(TestCase):
|
|
def test_execute_200(self):
|
|
"""
|
|
stage/file.py must be compatible with source/sample_data.py,
|
|
this test try to catch if one becomes incompatible with the other
|
|
by running a workflow that includes both of them.
|
|
"""
|
|
workflow = Workflow.create(json.loads(config))
|
|
workflow.execute()
|
|
workflow.stop()
|
|
self.assertTrue(True)
|