<@U088WCP3B4P> are there any other authentication ...
# ask-elementary-ai
l
@kapa.ai are there any other authentication methods for the profiles.yml file for databricks next to token and oauth? What will work best when running an edr command in a Databricks workflow?
k
A message from kapa.ai
Based on the knowledge sources provided, the supported authentication methods for Databricks in the profiles.yml file are primarily token-based authentication and, in some contexts, OAuth. The most common and recommended method for running edr commands in Databricks workflows is to use a Personal Access Token (PAT) in the profiles.yml, as shown in several examples:
Copy code
yaml elementary:   target: databricks   outputs:     databricks:       type: databricks       schema: [schema name of elementary models]       host: [<http://yourorg.databrickshost.com|yourorg.databrickshost.com>]       http_path: [/sql/your/http/path]       token: [dapiXXXXXXXXXXXXXXXXXXXXXXX] # Personal Access Token (PAT)       threads: 8
This approach is widely used and works well in automated environments like Databricks Workflows, as it does not require interactive authentication and can be securely managed via environment variables or secret managers. There is no mention in the knowledge sources of other authentication methods (such as username/password or Azure AD directly) being supported for Databricks in the context of Elementary and dbt profiles.yml. For Databricks Workflows, using a token is the best-supported and most straightforward method for authentication when running edr commands. OAuth is mentioned in some contexts, but there is no clear evidence in the sources that it is commonly used or recommended for this specific use case with Elementary and Databricks[Databricks profile example](https://slack.com/archives/C02CTC89LAX/p1663248371176369). If you need to avoid storing tokens directly in the profiles.yml, you can use environment variables to inject them securely at runtime, as shown in several workflow examples[Injecting secrets via env_var](https://slack.com/archives/C02CTC89LAX/p1665489623025739). In summary: - Token-based authentication is the standard and best-supported method for Databricks in profiles.yml when running edr commands in Databricks Workflows. - OAuth is not clearly documented as a supported or recommended method for this scenario in the provided sources. - No other authentication methods are mentioned in the knowledge sources for Databricks with Elementary.