2021-07-20 19:28:40 -07:00
|
|
|
import pytest
|
2021-04-23 23:46:31 -07:00
|
|
|
|
|
|
|
|
2021-07-20 19:28:40 -07:00
|
|
|
@pytest.mark.integration
|
2021-04-23 23:46:31 -07:00
|
|
|
def test_snowflake_uri():
|
2021-07-20 19:28:40 -07:00
|
|
|
from datahub.ingestion.source.snowflake import SnowflakeConfig
|
|
|
|
|
2021-04-23 23:46:31 -07:00
|
|
|
config = SnowflakeConfig.parse_obj(
|
|
|
|
{
|
|
|
|
"username": "user",
|
|
|
|
"password": "password",
|
|
|
|
"host_port": "acctname",
|
|
|
|
"database": "demo",
|
|
|
|
"warehouse": "COMPUTE_WH",
|
|
|
|
"role": "sysadmin",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
config.get_sql_alchemy_url()
|
2021-06-30 15:54:17 -07:00
|
|
|
== "snowflake://user:password@acctname/?warehouse=COMPUTE_WH&role=sysadmin"
|
2021-04-23 23:46:31 -07:00
|
|
|
)
|