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

Parse semantic model into select statements #14

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

sfc-gh-jhilgart
Copy link
Collaborator

Parse the semantic model into select statements.

This will only verify that we have columns for all tables. Next, we'll execute queries.

col: Union[TimeDimension, Dimension, Measure], cols: Set[str]
) -> Optional[str]:
# TODO(jhilgart): Handle quoted names properly.
if col.name.lower() not in cols:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can drop this check and all the cols: Str[str] arguments for these methods. Because here we just need to generate a select statement with one expression per logical column.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

makes sense

)

measure_example = Measure(
name="Total Sales",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should stick to names without spaces for now - they'll work here but we don't properly handle them downstream.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated!

@sfc-gh-jhilgart sfc-gh-jhilgart merged commit eec6f50 into main Apr 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants