Skip to content
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
added function to update the length of a string column
  • Loading branch information
Shaun Davis
Shaun Davis committed Oct 2, 2023
commit 1281fb2641d010301089886a82aceefff76b3429
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