def _update_column_bq_description()

in src/package/dataplexutils/metadata/wizard.py [0:0]


    def _update_column_bq_description(self, table_fqn, column_name, description):
        """Updates the description of a BigQuery column.
        Args:
            table_fqn (str): The fully qualified name of the table (e.g., 'project.dataset.table')
            column_name (str): The name of the column to update
            description (str): The new description to set

        Raises:
            Exception: If there is an error updating the column description
        """
        try:
            logger.info(f"Updating description for column {column_name} in table {table_fqn}.")

            self._table_exists(table_fqn)
            table_schema_str, table_schema = self._get_table_schema(table_fqn)

            updated_schema = []
            for column in table_schema:
                if column.name == column_name:
                    updated_schema.append(
                        self._get_updated_column(column, description)
                    )
                else:    
                    updated_schema.append(column)            
            self._update_table_schema(table_fqn, updated_schema)
            logger.info(f"Updated column description: {description}.")
        except Exception as e:
            logger.error(f"Update of column description table {table_fqn} column {column_name} failed.")
            raise e(
                message=f"Update of column description table {table_fqn} column {column_name} failed."
            )