-
Notifications
You must be signed in to change notification settings - Fork 308
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
feat: add Model.transform_columns
property
#1661
Conversation
Model.transform_columns
property
google/cloud/bigquery/model.py
Outdated
@@ -184,6 +184,20 @@ def feature_columns(self) -> Sequence[standard_sql.StandardSqlField]: | |||
standard_sql.StandardSqlField.from_api_repr(column) for column in resource | |||
] | |||
|
|||
@property | |||
def transform_columns(self) -> Sequence[Dict[str, Any]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this return a sequence of your new TransformColumn objects instead of a sequence of dictionaries.
…umn objects,updated test
…quence of dictionaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TransformColumn is looking quite good now. A few more comments to address, please.
tests/unit/model/test_model.py
Outdated
"name": "transform_name" , | ||
"type": {"typeKind": "INT64"}, | ||
"transformSql": "transform_sql" | ||
}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's run "nox -r -s blacken" from the terminal to format this.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕