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

Add exports config to YAML spec for saved queries #190

Merged
merged 10 commits into from
Oct 25, 2023

Conversation

courtneyholcomb
Copy link
Contributor

@courtneyholcomb courtneyholcomb commented Oct 24, 2023

Resolves #189

Description

Adds exports YAML options to the spec for saved_queries.

Checklist

@cla-bot cla-bot bot added the cla:yes label Oct 24, 2023
@@ -18,3 +18,6 @@ test:

lint:
hatch run dev-env:pre-commit run --show-diff-on-failure --color=always --all-files

json_schema:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This make target was mentioned in CI, but it didn't actually exist in the repo so I added it.

@courtneyholcomb courtneyholcomb marked this pull request as ready for review October 25, 2023 17:27
Copy link
Collaborator

@tlento tlento left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all seems reasonable to me, but since I wasn't at the final design sync I'll defer to one of those folks for final approval.


@property
@abstractmethod
def schema_name(self) -> Optional[str]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@QMalcolm the core parser can take schema from yaml and convert it to schema_name just as we do with Pydantic here, correct? I'm assuming that's the case.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is indeed the case. We have a separate unparsed and parsed node representation. It'll be schema in the unparsed and schema_name in the parsed

Comment on lines +178 to +179
assert export2_config.schema_name is None
assert export2_config.alias is None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question for the folks who designed the spec - do we want to allow this? It seems like we can't actually fulfill this contract because there's no way to tell a warehouse "here, put this data..... someplace."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - if this will be caught by a validation PR I haven't read yet, just tell me to go away. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlento we'll default to the deployment schema when we actually implement the logic for this! #189

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the table name? Or is the table name the export name? Is that obvious to people?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep it will default to the export name. I have no idea if that's obvious to people but it should be in the docs when we get to that

Copy link
Collaborator

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for doing this work 🙂

@courtneyholcomb courtneyholcomb merged commit d919c0c into main Oct 25, 2023
9 checks passed
@courtneyholcomb courtneyholcomb deleted the court/exports-spec branch October 25, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Exports] Add exports configuration to YAML spec
3 participants