Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions providers/mongo/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,28 @@ hooks:
connection-types:
- hook-class-name: airflow.providers.mongo.hooks.mongo.MongoHook
connection-type: mongo
conn-fields:
srv:
label: Srv
schema:
type:
- boolean
- 'null'
ssl:
label: Ssl
schema:
type:
- boolean
- 'null'
allow_insecure:
label: Allow Insecure
schema:
type:
- boolean
- 'null'
ui-field-behaviour:
relabeling:
login: Username
schema: Default DB
placeholders:
port: 'Note: port should not be set for SRV connections'
14 changes: 13 additions & 1 deletion providers/mongo/src/airflow/providers/mongo/get_provider_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ def get_provider_info():
],
"hooks": [{"integration-name": "MongoDB", "python-modules": ["airflow.providers.mongo.hooks.mongo"]}],
"connection-types": [
{"hook-class-name": "airflow.providers.mongo.hooks.mongo.MongoHook", "connection-type": "mongo"}
{
"hook-class-name": "airflow.providers.mongo.hooks.mongo.MongoHook",
"connection-type": "mongo",
"conn-fields": {
"srv": {"label": "Srv", "schema": {"type": ["boolean", "null"]}},
"ssl": {"label": "Ssl", "schema": {"type": ["boolean", "null"]}},
"allow_insecure": {"label": "Allow Insecure", "schema": {"type": ["boolean", "null"]}},
},
"ui-field-behaviour": {
"relabeling": {"login": "Username", "schema": "Default DB"},
"placeholders": {"port": "Note: port should not be set for SRV connections"},
},
}
],
}
Loading