Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] A databricks_jobs data source that allows duplicate names #4266

Open
MattMcFahn opened this issue Nov 22, 2024 · 0 comments
Open
Labels
feature New feature or request

Comments

@MattMcFahn
Copy link

Use-cases

The data source databricks_jobs API currently raises an exception if jobs with duplicate names are deteced.

This seems a bit confusing since the Databricks API, asset bundles, and other SDKs in multiple languages allow creation of jobs with duplicate names.

This request is to expose a flag to this source that allows duplicate names, or provide another data source that allows retrieval of all job_id values in a workspace. In our use case, we only care about the list of IDs of jobs in our workspace.

Attempted Solutions

Our current workaround is to delete any jobs with duplicate names in our workspace. But we can't prevent new ones accidentally being prevented by developers by accident, given this limitation isn't in other Databricks SDKs.

AFAIK there otherwise isn't a solution using the existing provider to retrieve a list of job_id values in a workspace if the workspace has jobs with duplicated names.

Proposal

Given that the return value of the current databricks_jobs data source is a map of name -> Id, a new data source might be a better option to ensure backwards compatibility of the existing data source, otherwise the key/value structure of the existing map would need to be reversed.

It'd be similar to the existing implementation except the map would use the Id as a key and remove the exception. If this request is something that the maintainers would be happy with, I'd be happy to raise a PR.

References

I've not found any duplicate or similar issues.

@MattMcFahn MattMcFahn added the feature New feature or request label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant