Skip to content

Add function to update string column length in a Dataset #283

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dataikuapi/dss/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,15 @@ def add_time_partitioning_dimension(self, dim_name, period="DAY"):
def add_raw_schema_column(self, column):
self.settings["schema"]["columns"].append(column)

def update_string_column_len(self, column, length):
"""
Update the length of a string column in a Dataset schema
"""
columns = self.settings["schema"]["columns"]
for c in columns:
if c['name'] == column:
c['maxLength'] = length

@property
def is_feature_group(self):
"""
Expand Down