Skip to content

ETL in 5 Minutes

This guide will take you from zero to having your first ETL running in less than 5 minutes.

What we will achieve

Transfer data from a MySQL database to Google Sheets automatically.

graph LR
    A[MySQL Database] --> B[Fracttal ETL Hub] --> C[Google Sheets]
    A --> D[Orders Table]
    B --> E[Transform Layer]
    B --> F[Validation Engine]
    C --> G[Updated Spreadsheet]

    classDef database fill:#e3f2fd,stroke:#1976d2,stroke-width:3px,color:#1565c0
    classDef etl fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:#6a1b9a
    classDef target fill:#e8f5e8,stroke:#388e3c,stroke-width:3px,color:#2e7d32

    class A,D database
    class B,E,F etl
    class C,G target

Prerequisites (1 minute)

Before starting, make sure you have:

  • ETL Hub access (request credentials from your administrator)
  • Database with sample table
  • Google Sheets account with write permissions

!!! tip "Don't have test data?" You can use our sandbox with demo data. Jump to sandbox example.


Step 1: Basic Configuration (1 minute)

Minimum ETL structure

my-first-etl.json
{
  "id": "12345678-1234-1234-1234-123456789abc",
  "jsonrpc": "2.0",
  "method": "etl.etl_update",
  "params": {
    "id": "my-first-etl",
    "config": {
      "source": {
        "id_type": 1,
        "host": "localhost",
        "port": 3306,
        "database": "ecommerce",
        "username": "etl_user",
        "password": "secure_password",
        "form": {
          "sql": "SELECT order_id, customer_name, total, order_date FROM orders WHERE order_date >= '2024-01-01'"
        }
      }
    }
  }
}

Step 2: Add Transformation (1 minute)

Format data for Google Sheets

transform-section
"transform": [
  {
    "format_date": {
      "field": "order_date",
      "input_format": "%Y-%m-%d %H:%M:%S",
      "output_format": "%d/%m/%Y"
    }
  },
  {
    "rename": {
      "order_id": "Order ID",
      "customer_name": "Customer",
      "total": "Amount",
      "order_date": "Date"
    }
  }
]

Step 3: Configure Target (1 minute)

Google Sheets destination

target-section
"target": {
  "id_type": 10,
  "credentials_path": "/path/to/google-credentials.json",
  "form": {
    "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
    "range": "Sheet1!A1",
    "value_input_option": "RAW"
  }
}

Step 4: Complete Configuration (30 seconds)

Full ETL ready to run

complete-etl-config.json
{
  "id": "12345678-1234-1234-1234-123456789abc",
  "jsonrpc": "2.0",
  "method": "etl.etl_update",
  "params": {
    "id": "orders-to-sheets",
    "config": {
      "source": {
        "id_type": 1,
        "host": "localhost",
        "port": 3306,
        "database": "ecommerce",
        "username": "etl_user",
        "password": "secure_password",
        "form": {
          "sql": "SELECT order_id, customer_name, total, order_date FROM orders WHERE order_date >= CURDATE() - INTERVAL 7 DAY"
        }
      },
      "transform": [
        {
          "format_date": {
            "field": "order_date",
            "input_format": "%Y-%m-%d %H:%M:%S",
            "output_format": "%d/%m/%Y"
          }
        },
        {
          "rename": {
            "order_id": "Order ID",
            "customer_name": "Customer",
            "total": "Amount",
            "order_date": "Date"
          }
        }
      ],
      "target": {
        "id_type": 10,
        "credentials_path": "/credentials/google-sheets.json",
        "form": {
          "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
          "range": "Sheet1!A1",
          "value_input_option": "RAW"
        }
      }
    }
  }
}

Step 5: Execute (30 seconds)

Send configuration to ETL Hub

curl -X POST http://your-etl-hub:8080/jsonrpc \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-token" \
  -d @complete-etl-config.json

Expected response

{
  "jsonrpc": "2.0",
  "result": {
    "status": "success",
    "message": "ETL orders-to-sheets created successfully",
    "execution_id": "exec_987654321"
  },
  "id": "12345678-1234-1234-1234-123456789abc"
}

Verification (30 seconds)

Check your Google Sheets

  1. Open your spreadsheet in Google Sheets
  2. Verify data appears in Sheet1
  3. Check formatting - dates should be DD/MM/YYYY

Expected result

Order ID Customer Amount Date
1001 John Smith 299.99 25/01/2024
1002 Mary Johnson 156.50 26/01/2024

Sandbox Demo

Use our test environment

If you don't have your own data, use our sandbox:

sandbox-config.json
{
  "id": "demo-12345",
  "jsonrpc": "2.0",
  "method": "etl.etl_update",
  "params": {
    "id": "sandbox-demo",
    "config": {
      "source": {
        "id_type": 1,
        "host": "demo.fracttal.com",
        "port": 3306,
        "database": "demo_store",
        "username": "demo_user",
        "password": "demo_pass",
        "form": {
          "sql": "SELECT * FROM sample_orders LIMIT 10"
        }
      },
      "target": {
        "id_type": 10,
        "credentials_path": "/demo/credentials.json",
        "form": {
          "spreadsheet_id": "demo_spreadsheet_id",
          "range": "Demo!A1"
        }
      }
    }
  }
}

Troubleshooting

Common issues in first 5 minutes

Database connection failed

Error: Connection refused to localhost:3306
Solution: Verify host, port, and credentials.

Google Sheets permission denied

Error: 403 Insufficient permissions
Solution: Check service account has edit access to spreadsheet.

Invalid SQL syntax

Error: SQL syntax error near 'SELCT'
Solution: Verify SQL query syntax.


Next Steps

Congratulations! You've created your first ETL in 5 minutes.

What to explore next:

  1. Advanced Transformations - More data processing operators
  2. Multiple Targets - Send to multiple destinations
  3. Scheduling - Automate execution
  4. Error Handling - Handle failures gracefully

Learning path:


Need help? Check our Troubleshooting Hub or contact support.