sql_table = pai.create(
path="example/mysql-dataset",
description="Heart disease dataset from MySQL database",
source={
"type": "mysql",
"connection": {
"host": "database.example.com",
"port": 3306,
"user": "${DB_USER}",
"password": "${DB_PASSWORD}",
"database": "medical_data"
},
"table": "heart_data",
"columns": [
{"name": "Age", "type": "integer", "description": "Age of the patient in years"},
{"name": "Sex", "type": "string", "description": "Gender of the patient (M = male, F = female)"},
{"name": "ChestPainType", "type": "string", "description": "Type of chest pain (ATA, NAP, ASY, TA)"},
{"name": "RestingBP", "type": "integer", "description": "Resting blood pressure in mm Hg"},
{"name": "Cholesterol", "type": "integer", "description": "Serum cholesterol in mg/dl"},
{"name": "FastingBS", "type": "integer", "description": "Fasting blood sugar > 120 mg/dl (1 = true, 0 = false)"},
{"name": "RestingECG", "type": "string", "description": "Resting electrocardiogram results (Normal, ST, LVH)"},
{"name": "MaxHR", "type": "integer", "description": "Maximum heart rate achieved"},
{"name": "ExerciseAngina", "type": "string", "description": "Exercise-induced angina (Y = yes, N = no)"},
{"name": "Oldpeak", "type": "float", "description": "ST depression induced by exercise relative to rest"},
{"name": "ST_Slope", "type": "string", "description": "Slope of the peak exercise ST segment (Up, Flat, Down)"},
{"name": "HeartDisease", "type": "integer", "description": "Heart disease diagnosis (1 = present, 0 = absent)"}
]
}
)