import_datasources not working
I am running superset version - 0.29.0rc7 and using postgresql as backend. While I tried importing datasource from yaml file , the encrypted password field in not updating in the dbs table. But if I configure datasource from interface , its working fine.
I have tried the following command,
superset import_datasources -p DBConnection.yaml
-------- cat DBConnection.yaml ----------
- database_name: DEVL-Database
extra: "{\r\n "metadata_params": {},\r\n "engine_params": {},\r\n "
metadata_cache_timeout": {},\r\n "schemas_allowed_for_csv_upload": []\r\n
}\r\n" sqlalchemy_uri: postgresql+psycopg2://postgres:[email protected]/devl tables: []
When I click "Test" connection , showing no authentication password supplied.
Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.61. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
While clicking "Test Connection" getting error as -> ERROR: {"error": "Connection failed!\n\nThe error message returned was:\n(psycopg2.OperationalError) fe_sendauth: no password supplied\n (Background on this error at: http://sqlalche.me/e/e3q8)"
@rinshadka any solution found? I am having exactly the same problem. Thanks in advance.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
same problem, import datasources -p file.yaml is not working
source venv/bin/activate
superset import_datasources -p /workspace/
I've managed to get it to work:
superset import_datasources -p /tmp/DATABASE.yaml
superset set_database_uri -d name_of_datasource_in_DATABASE.yaml -u postgresql://user:password@host:5432/database
after which I have a successful connection test.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
Just in case anyone finds this via google, the example provided by @ljpeters works, but for me the name_of_datasource_in_DATABASE.yaml was confusing so here's another example that works:
sources.yaml:
databases:
- database_name: My database
[...]
superset import_datasources -p sources.yaml
superset set_database_uri -d "My database" -u postgresql://user:pass@db_host:5432/db_name
In our case, we use Docker to build out a superset instance with pre-built database and dashboards and this is what we use