fix: Redshift parameters not rendering (#14888)
* Update redshift.py * Update api_tests.py * fixed test * add file back
This commit is contained in:
parent
507d4d791f
commit
8f81fc0ad7
|
|
@ -50,6 +50,7 @@ class RedshiftEngineSpec(PostgresBaseEngineSpec, BasicParametersMixin):
|
|||
engine = "redshift"
|
||||
engine_name = "Amazon Redshift"
|
||||
max_column_name_length = 127
|
||||
default_driver = "psycopg2"
|
||||
|
||||
sqlalchemy_uri_placeholder = (
|
||||
"redshift+psycopg2://user:password@host:port/dbname[?key=value&key=value...]"
|
||||
|
|
|
|||
|
|
@ -1506,10 +1506,49 @@ class TestDatabaseApi(SupersetTestCase):
|
|||
},
|
||||
{
|
||||
"available_drivers": ["psycopg2"],
|
||||
"default_driver": "",
|
||||
"default_driver": "psycopg2",
|
||||
"engine": "redshift",
|
||||
"name": "Amazon Redshift",
|
||||
"parameters": {
|
||||
"properties": {
|
||||
"database": {
|
||||
"description": "Database name",
|
||||
"type": "string",
|
||||
},
|
||||
"encryption": {
|
||||
"description": "Use an encrypted connection to the database",
|
||||
"type": "boolean",
|
||||
},
|
||||
"host": {
|
||||
"description": "Hostname or IP address",
|
||||
"type": "string",
|
||||
},
|
||||
"password": {
|
||||
"description": "Password",
|
||||
"nullable": True,
|
||||
"type": "string",
|
||||
},
|
||||
"port": {
|
||||
"description": "Database port",
|
||||
"format": "int32",
|
||||
"type": "integer",
|
||||
},
|
||||
"query": {
|
||||
"additionalProperties": {},
|
||||
"description": "Additional parameters",
|
||||
"type": "object",
|
||||
},
|
||||
"username": {
|
||||
"description": "Username",
|
||||
"nullable": True,
|
||||
"type": "string",
|
||||
},
|
||||
},
|
||||
"required": ["database", "host", "port", "username"],
|
||||
"type": "object",
|
||||
},
|
||||
"preferred": False,
|
||||
"sqlalchemy_uri_placeholder": "redshift+psycopg2://user:password@host:port/dbname[?key=value&key=value...]",
|
||||
},
|
||||
{
|
||||
"available_drivers": ["mysqlconnector", "mysqldb"],
|
||||
|
|
|
|||
Loading…
Reference in New Issue