askldjd opened a new pull request, #22357: URL: https://github.com/apache/superset/pull/22357
### SUMMARY The `encrypted_extra` field holds the keypair to authenticate to Snowflake. However, this field can't be imported currently. See https://github.com/apache/superset/issues/22348. ### TESTING INSTRUCTIONS Here's my test steps: 1. Add a new Snowflake connection called "Snowflake UI" using the UI. Choose SQLAchemy as the option and use provide the keypair in the SECURE EXTRA [following the instruction](https://superset.apache.org/docs/databases/snowflake/). 2. Construct a new snowflake-import.yaml in this format: ``` databases: - database_name: Snowflake from Import sqlalchemy_uri: $url cache_timeout: null expose_in_sqllab: true allow_run_async: false allow_ctas: false allow_cvas: false allow_csv_upload: false version: 1.0.0 encrypted_extra: $encrypted_extra ``` where `$url` is the sqlachemy URL and `encrypted_extra` is the JSON encoded JSON block. So it looks something like this: ``` "{\n \"auth_method\": \"keypair\",\n \"auth_params\": {\n \"privatekey_body\": \"-----BEGIN ENCRYPTED PRIVATE KEY-----\\nblablabla\\n-----END ENCRYPTED PRIVATE KEY-----\",\n \"privatekey_pass\": \"mypassword\"\n }\n}" ``` 3. Run `superset import_datasources -p snowflake-import.yaml` 4. Inspect that `dbs` table and verify that both the UI entry and the imported entry are identical. ### ADDITIONAL INFORMATION Fixes https://github.com/apache/superset/issues/22348 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
