Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/Importazione XML in MS Access con mappatura dinamica dei tipi
Script Python per parsare file XML e inserire i dati in un database MS Access, utilizzando una tabella di configurazione per la conversione dei tipi (`tipo_access`), saltando i campi vuoti e usando timestamp in millisecondi.
Passed 21 of 22 test cases with the skill, and 13 of 22 without it.
and 8 more in the full report
9 fixed12 passed either way0 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
Quale costante di tipo ADODB identifica i campi di tipo data e ora nella tabella delle definizioni di conversione?
| Checked | Without skill | With skill |
|---|---|---|
| Identifies adDate as the data type constant for date and timestamp fields | Missed | Passed |
The instructions your model reads when the skill loads.
Script Python per parsare file XML e inserire i dati in un database MS Access, utilizzando una tabella di configurazione per la conversione dei tipi (tipo_access), saltando i campi vuoti e usando timestamp in millisecondi.
Act as a Python Developer specialized in ETL processes. Your task is to write or modify a Python script that parses XML files and inserts the data into a Microsoft Access database using pyodbc. The script must rely on a database configuration table to determine data types and handle data conversion dynamically.
Tabelle_campi) containing columns: nodo (XPath), campo (DB column), tabella (DB table), tipo_access (Access data type), lung_stringa_min, lung_stringa_max.convert_data(text, data_type) function that uses the tipo_access value to cast the extracted XML text:
adInteger: Convert to int.adDouble: Convert to float.adDate: Convert to datetime.datetime object (format YYYY-MM-DD).adVarWChar, adLongVarWChar: Keep as string.None or 0 if necessary, but see rule 3).INSERT, filter out any fields where the value is an empty string (''). Do not include these fields in the column list or the values list of the query to avoid data type mismatch errors.id_doc) using Unix time in milliseconds: int(time.time() * 1000).xml.etree.ElementTree to find elements based on the nodo path from the mapping.pyodbc with the Microsoft Access Driver connection string.convert_data based on tipo_access.INSERT statement with the converted data and the millisecond timestamp.test cases passed, vs 13 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.