elsenorjose
Technical User
I have a text file which is the output of a Perl script that parses Windows Media Log files into a media analytics table. There are some additional columns which are defined by the customer so the actual table format can and does change. The engineer who provides this table has created a comment header with revision information as well as column names. Is there anything I can do to have MySQL look at the comment header and alter my table to include the newly added columns without destroying any data in the table? The column names would always be in the same line in the import file and when a new field is added, it would be appended to the field list, not added anywhere in between existing fields.
Example:
# FIELDS: client_ip,date_YYYY-MM-DD, time_HH:MM:SS,http_method,c_url,status_code,
total_bytes,transfer_time,"referrer",referrer_host,"user_agent",
total_object_size,byte_range_start,byte_range_end,last_byte_served_flag,
first_byte_served_flag,all_bytes_served_flag, akm_c_ip_country, akm_c_ip_dma, akm_c_ip_lat, akm_c_ip_long,CPROG,MARKET,NG_FORMAT,SITE_ID,STATION_ID,PCAST_TITLE,PCAST_AUTHOR,
PCAST_CAT
Example:
# FIELDS: client_ip,date_YYYY-MM-DD, time_HH:MM:SS,http_method,c_url,status_code,
total_bytes,transfer_time,"referrer",referrer_host,"user_agent",
total_object_size,byte_range_start,byte_range_end,last_byte_served_flag,
first_byte_served_flag,all_bytes_served_flag, akm_c_ip_country, akm_c_ip_dma, akm_c_ip_lat, akm_c_ip_long,CPROG,MARKET,NG_FORMAT,SITE_ID,STATION_ID,PCAST_TITLE,PCAST_AUTHOR,
PCAST_CAT