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

[ADAP-702] [Feature] Allow user to specify location directly (instead of concatenating location_root and alias) #834

Open
3 tasks done
timvw opened this issue Jul 14, 2023 · 4 comments
Labels
enhancement New feature or request refinement Product or leadership input needed triage

Comments

@timvw
Copy link

timvw commented Jul 14, 2023

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt-spark functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Currently we have a location_clause macro in place which calculates the location where the data should be stored as {{ location_root }}/{{ identifier }}.

It would be nice to be able to specify location directly (independent of location_root and identifier).
Eg: we have naming conventions where the tables are name blah_blah and locations are s3://bucket/blah-blah.

Describe alternatives you've considered

We could not implement this and push this to user-space

Who will this benefit?

Anyone that wants to specify a location that is not the result of concatenating location_root and identifier.

Are you interested in contributing this feature?

Yes

Anything else?

@timvw timvw added enhancement New feature or request triage labels Jul 14, 2023
@github-actions github-actions bot changed the title [Feature] Allow user to specify location directly (instead of concatenating location_root and alias) [ADAP-702] [Feature] Allow user to specify location directly (instead of concatenating location_root and alias) Jul 14, 2023
@dbeatty10
Copy link
Contributor

Thanks for raising this idea @timvw 💡 !

Would you be willing to share the code for your location_clause macro in addition to examples using it? And also an example of how you are proposing to specify the location directly instead?

That way, we can take a look at your proposal vs. the alternative you are using currently.

@timvw
Copy link
Author

timvw commented Oct 23, 2023

The existing implementation of location_clause and the difference with my proposal can be found here: https://github.com/dbt-labs/dbt-spark/pull/835/files

Usage is straightforward, simply add a location parameter to your model config:

models:
  - name: model_a
    config:
      format: delta
      location: 's3://bucket/sourcesystem/conformed/model-a'
...

Without this feature we would be forced to rename our model to model-a..

@dbeatty10 dbeatty10 changed the title [ADAP-702] [Feature] Allow user to specify location directly (instead of concatenating location_root and alias) [ADAP-702] [Feature] Allow user to specify location directly (instead of concatenating location_root and alias) Oct 23, 2023
@dbeatty10
Copy link
Contributor

Thanks for this example and explanation @timvw !

What do you think @dataders? Do you see this as tying into https://github.com/dbt-labs/dbt-core/discussions/8617 at all?

@dbeatty10 dbeatty10 added refinement Product or leadership input needed and removed triage labels Oct 23, 2023
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 21, 2024
@dbeatty10 dbeatty10 added triage and removed Stale labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refinement Product or leadership input needed triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants