---
title: "Get columns diff (sync with CSV)"
method: GET
path: "/datafiles/columns_diff/{sid}/{file_id}"
tags: ["Microdata"]
---

# Get columns diff (sync with CSV)

`GET /datafiles/columns_diff/{sid}/{file_id}`

Get the difference between variable names in metadata and column headers in the data file (CSV). Use this to sync metadata with the CSV (e.g. identify variables in DB not in CSV, or columns in CSV not in DB).

## Path parameters

- `sid` string, required
- `file_id` string, required

## Response `200`

successful operation

- object
  - `status` string
  - `columns_diff` object — Sync info (e.g. columns_in_db_not_in_csv, in_sync)

## Other responses

- `400` — Bad request - project not found or data file not found

---

[API](https://skmtc.dev/worldbank/apis/metadata-editor-api.md) · [All operations](https://skmtc.dev/worldbank/apis/metadata-editor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/worldbank/metadata-editor-api/revisions/f4c8258bab5a/schema)
