<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_from_object(self, obj):
 """Update datasource from a data structure The UI's table editor crafts a complex data structure that contains most of the datasource's properties as well as an array of metrics and columns objects. This method receives the object from the UI and syncs the datasource to match it. Since the fields are different for the different connectors, the implementation uses ``update_from_object_fields`` which can be defined for each connector and defines which fields should be synced"""

        for attr in self.update_from_object_fields:
            setattr(self, attr, obj.get(attr))

        self.owners = obj.get('owners', [])

        # Syncing metrics
        metrics = self.get_fk_many_from_list(
            obj.get('metrics'), self.metrics, self.metric_class, 'metric_name')
        self.metrics = metrics

        # Syncing columns
        self.columns = self.get_fk_many_from_list(
            obj.get('columns'), self.columns, self.column_class, 'column_name')