What the CKAN data dictionary does for published tables
The CKAN Data Dictionary gives each column of a DataStore resource a label, a Markdown description and, where needed, a type override. Readers see plain column names and explanations where the cryptic headers used to be, and API users get a declared type they can rely on in their own code. Teams usually need it in three situations: public tables that strangers query without context, shared catalogs where several departments publish similar tables, and numeric or date columns that arrive in the DataStore as text. Without the dictionary, every consumer has to work out what each column means and how its values should be read, and each one may reach a different conclusion.
The dictionary describes one resource, so each DataStore-backed file in a dataset needs its own entries. A type override changes how a column is declared in the table, so check every override against the values actually in the column before publication. Blanks, codes or mixed formats in a column declared as a date or number are where problems usually start. The override matters again on reload: XLoader applies type overrides when a resource is loaded again, so a column that first loaded as text can change type later. The fields you can set, and whether you edit them in the web interface, through the API or both, depend on your CKAN version. Confirm them against the DataStore documentation for your release first.
Decide early which columns need a label, which need a description and which need a type override, and name the person who owns each decision. A practical check is to open the published resource, sort and filter on each numeric or date column, and confirm the results match what the description says. Write descriptions for a reader who has never seen your source system: state units, code meanings, the time zone for timestamps and how missing values appear. Keep the dictionary in step with the data, because a column renamed in a later file will keep its old label unless someone edits it. Treat that edit as part of every publication, not an afterthought.
Which CKAN data dictionary fields to set and when
This table compares the three per-column settings in the Data Dictionary: label, Markdown description and type override. Read the effect column first, since label and description only change documentation, while a type override changes how the column is typed when XLoader reloads the resource. The main takeaway is that only the type override changes stored column types, so test it on a copy and confirm the reload before you publish.
| Setting | Effect on readers or the stored column | When it fits | Check before editing |
|---|---|---|---|
| Label | Documentation only. Gives readers a friendlier column name. The stored column name stays the same. | Source column names are cryptic, abbreviated or in a language your readers do not share. | Keep names unique and consistent with the dataset's other tables so readers can match them. |
| Markdown description | Documentation only. Explains meaning, units, code lists and derivation for readers. The stored column is unchanged. | Units, allowed codes, missing-value conventions or fields derived from other sources. | Check that the text matches the loaded data and that links and lists render in the portal. |
| Type override | Changes the stored type on the next XLoader reload, for columns that loaded as text. | Numbers, dates or booleans that should sort, filter and compare as those types. | Test on a copy first. Values that cannot convert may fail the reload. |
| Reload behavior | Label and description show without a reload. A type change applies only when the resource loads again. | Plan type changes into a maintenance window or a scheduled reload. | Confirm whether your refresh process reruns the loader after you save overrides. |
| Query impact | After a type change, filters and sorts follow the new type. Clients that assumed text may need updates. | Dashboards or apps that compare values as strings. | Review queries and downstream scripts before changing types on a live table. |
| Supported field set | The keys the Data Dictionary accepts depend on your CKAN version and loader. | Any time you script edits or copy dictionaries between portals. | Confirm the supported field set for your CKAN version in the CKAN documentation before editing. |
How a CKAN data dictionary type override reaches XLoader
The flow starts with a publisher editing a column in the Data Dictionary on the CKAN web interface, where the label, Markdown description and type override are recorded for that column. The reload request then crosses a trust boundary to the XLoader job worker, which loads the resource into the DataStore table. The team checks the resulting column types at the decision point. If a column was loaded as text, the publisher adds the override and reruns the reload. Once the types are right, API consumers receive the labels, descriptions and typed results.
Type overrides flow from the Data Dictionary through an XLoader reload to API consumers.
Why columns loaded as text need an explicit type override
A column that reaches the DataStore as text looks fine in a preview but breaks for every consumer that queries it. Numeric columns sort alphabetically, so 10 appears before 2. Date range filters compare strings, so they can return the wrong rows. XLoader loads uploaded or linked files into the DataStore, and when the source gives no clean type for a column, the loaded column can stay text. Those errors then reach datastore_search filters, Data API sorting and any SQL comparison made through datastore_search_sql. The fix is a type override in the data dictionary, and the decision to make is which columns need one before anyone builds a chart, filter or application on them.
A type override is saved against a column in the data dictionary. When the resource is reloaded, XLoader reads that override and applies it to the matching column, so the type comes from your dictionary and the file contents no longer decide it alone. Before you depend on this, confirm which CKAN and XLoader versions apply overrides on reload, and whether a reload on a version that does not apply them fails or quietly keeps the text type. The CKAN DataStore documentation is the starting point for that check. Also confirm how the dictionary is matched to columns in the new file, because a renamed header in a republished file can leave an override pointing at nothing. Test each step on a copy of the resource before you change the live one.
The harder question is what happens to values that cannot be cast to the new type, such as the text N/A in a numeric column or a date written in a format the loader does not expect. Depending on the version, the reload could reject the whole resource, skip the override, or write the unconvertible value as empty, and you should not plan around any one of these until you have seen it happen. Ask your deployment team or the XLoader documentation for the exact behavior, then reload a copy with known bad values and count what changes. Decide before the change whether the source file should be cleaned, whether a missing value is acceptable, and who signs off on the result.
Setting up CKAN data dictionary labels and types on one resource
This sequence takes one resource from a loaded table to a documented one, with readable column labels, Markdown descriptions and corrected column types. Each step ends with a check, so you can confirm the DataStore stored the right types and that filters return the rows you expect before anyone builds on the table.
Confirm the resource is in the DataStore
Open the resource page and check that the DataStore preview shows rows and column headers. Then open the XLoader job list for this resource and confirm the most recent job finished without errors. Finally, call datastore_search with the resource ID and a small limit to see the column names the DataStore holds. The step is done when rows come back and the job status shows as complete.
Record the loaded column types
Using the same datastore_search output, write down each column and the type it loaded with. Mark the columns that hold numbers, dates or timestamps but loaded as text, because those are the candidates for a type override. Leave columns that loaded correctly alone. Ask the data owner to confirm the expected format for ambiguous dates, such as day-first or month-first values. The step is done when every column has a loaded type and a note on whether it needs an override.
Open the resource data dictionary
Open the resource's Data Dictionary tab in CKAN. The location of this tab depends on your CKAN version and theme, so confirm it in your own portal. For each column, enter a short label that people will recognize and a Markdown description covering units, allowed values and missing-value codes. Keep column names unchanged, since API queries use them. Save the form. The check is done when reopening the page shows every label and description exactly as entered.
Set a type override on a text column
Pick one column that loaded as text but holds numbers, dates or timestamps, and set its type override in the same Data Dictionary form. Choose a type that every value in the column can parse as, and check the source file for blank cells, currency symbols and thousands separators first, because those values can cause the typed reload to fail. Save the form. The step is done when the override is stored against that exact column name and the form shows it after a page refresh.
Trigger the reload through XLoader
Start a reload of the resource so XLoader loads the file again and applies the type overrides. The exact control depends on your CKAN version and how the portal is configured, so confirm it in your environment before you rely on it. Make sure a job worker is running, then watch the XLoader job list until the new job finishes. The check is done when a new job shows a completed status with a later timestamp than the first load.
Check stored types and the API response
Call datastore_search on the resource ID and read the fields list in the response. Each overridden column should now show the type you set, such as a numeric or timestamp type, while untouched columns keep their loaded type. Compare the row count with the source file, since a reload that changes the row count needs investigation before you publish. The check is done when the types match the list you recorded in the second step and the row count matches the source.
Run filter tests and the render check
Run a numeric range filter with datastore_search on an overridden column, then compare the row count with a count you made from the source file for the same condition. Repeat with a date or timestamp range, checking that boundary rows are included or excluded as you expect. Open the resource page and confirm each label appears as a column heading, and that Markdown bold text, lists and links display formatted, with no stray asterisks or brackets. The step is done when counts match the source and the portal shows the labels and formatted descriptions.
Mistakes that leave columns mistyped after a reload
Most type problems in a CKAN DataStore table appear only after a reload, and the same few habits cause them. Each card names one habit, the symptom it produces, how to check for it and the fix. Read them before you change a type override on a resource that is already loaded.
Type that does not fit the values
A type override is a promise about every value in the column. If one row holds a value such as N/A or a stray thousands separator in a column set to integer, the reload cannot cast that row and the load can fail. Check every distinct value in the source file for the column before you set the type, and include the largest version of the file in that check. The fix is to choose a type that fits all current values, or to clean the source so it matches the type you need.
Column names that change in the source
The Data Dictionary refers to columns by their names. If a publisher renames a header, for example from Site_ID to site_id, or inserts a new column before the old one, the override written for the original name no longer applies to the column it was meant for. That column then loads with the default type, and anything that depended on the old type may behave differently. Compare the header row of each new file with the field names in the dictionary before you reload. Fix this by agreeing header names with the publisher, or by updating the dictionary in the same change that renames the column.
Dictionary edits without a reload
Saving a change in the Data Dictionary updates the documentation, but the DataStore table keeps the types it was loaded with until the resource is loaded again. A team can correct a type, see the new label on the dataset page, and assume the Data API now returns the new type. A saved dictionary change does not by itself reload the table. Check the column types on the resource after each edit, then reload the resource so XLoader applies the overrides.
DataStore docsAssuming overrides reach other resources
Each resource has its own DataStore table, and an override takes effect when that resource is loaded. A dataset with a 2024 CSV and a corrected 2025 CSV can show two different types for the same column, depending on when each resource was last loaded. Teams often edit the override once and assume every resource in the dataset now matches. Check each resource separately against the dictionary, and reload any resource that was loaded before the change.
Internal notes in public descriptions
Markdown descriptions on a column are visible to anyone who can see the dataset, and they are returned through the public API. Working notes such as a staging file path, a direct contact line for a data steward, a suspected defect that nobody has confirmed, or a link to a restricted source can become public without anyone noticing. Read every column description as an anonymous visitor would before you publish. Fix this with a review step for descriptions and a separate internal channel for working notes.
Type changes on the live portal
Changing an override directly on the production portal runs an untested load against live data. A type that loads cleanly from one file can fail on the next scheduled release, and a failed reload may leave consumers querying a table that no longer matches the file. Test every type change on a staging portal first, using the same CKAN version and extensions, with a copy of the current file and the next expected file. Record the previous types so you can roll the override back.
Changing column types on a live portal, by situation
A resource that has never reached the DataStore is the lowest-risk case. Nobody queries it yet, so you can set labels, Markdown descriptions and type overrides before the first load and let that load use them. The main risk sits in the source file, which must parse under the types you declare. The CKAN DataStore documentation describes how the Data API exposes loaded tables.
- Order of steps: Add the Data Dictionary entries to the resource, confirm that an XLoader job worker is running, then upload or link the file so the first load applies the overrides.
- What can break: A value that does not match its declared type fails the load. Check numeric columns for thousands separators, date columns for mixed formats, and text columns for stray empty strings before you load.
- Rehearse on staging: Load the same file on a non-public instance and inspect the field types the Data API reports before you publish.
- What to tell consumers: For a first publication, list the column names and their types in the resource description so early API users know what to expect.
Confirm that the field types the Data API reports match your dictionary before you link the resource from a dataset page.
A resource already loaded as text is the riskiest common case. Queries, filters and sorts were written against string values, so changing a column to a number or date changes the answers those queries return. The type override is applied when the resource is reloaded, which means the change only takes effect after you reload, and the reload is where most failures appear. If the resource came from DataPusher, confirm how the migrate_types command behaves on your CKAN version before you change anything.
- Order of steps: Set the type override on a staging copy, reload it, run your saved consumer queries against the staging result, and only then repeat the change in production.
- What can break: String comparisons may match differently once values are numeric, dates may sort in a new order, and one value that fails the new type can stop the reload and leave the old table in place.
- Keep the text version available: Where consumers depend on the text version, publish the typed column under a new name or in a new resource so the old one stays available while people move over.
- What to tell consumers before the reload: Give the column name, old and new types, the planned date, example queries whose results will change, and whether the old version stays available. Confirm the notice period with the portal owner.
- Verify after reload: Compare row counts and a sample of aggregates with the staging results, and check that the Data API returns the expected types.
Check that every saved consumer query returns the same results, or that any differences are the ones you announced.
Scripts that download or query a resource on a schedule were built against specific types. They may parse values as text, cast them in their own code, or write results into systems that expect a fixed schema. A type change reaches these scripts on their next run, and the portal may show no error at all, so the notice and the testing have to come from you.
- Inventory first: List every script, notebook, pipeline and application that reads the resource, including jobs owned by other teams, and record an owner for each.
- Order of steps: Test each consumer against a staging copy with the new types, agree a change window with the owners, reload production in that window, and have each owner run their job once against the new schema.
- What can break: Parsers that expect text may fail on decimal separators, date strings may be read differently, and empty strings may become nulls, which code that tests for empty text may not handle.
- Request fields by name: Where a consumer supports it, have it request the columns it needs explicitly and handle type changes in its own code, which limits surprises when columns are added later.
- What to tell consumers: Share the change window, the column names with old and new types, a sample response from staging, and a named contact for failures during the window.
Check that each owner has confirmed a passing run against staging before the production reload starts.
Security and access considerations for dictionary edits
Dictionary entries are short pieces of text, but they sit on top of two things outside users depend on: public descriptions and the read-only access that serves the data. The five controls below cover who can change entries, what those entries expose, how a reload affects consumers, which credentials automation uses, and how changes are reviewed. Each one is something your own team can confirm in its CKAN environment before the first public reload.
Who can edit and reload
Editing a dictionary entry and reloading a resource both change what public readers see and what the DataStore holds, so they should fall under the same deliberate permission model. In your portal, confirm which organization roles and sysadmin accounts can edit resources, and whether starting a reload requires the same edit rights or can be triggered by anyone who can view the resource. Remove edit rights from people who have left the team, and check the result with a test account that has only the role you intend to grant.
Internal notes reaching public readers
Dictionary descriptions are Markdown text, and on a public dataset they are visible to anyone who opens the resource. A note explaining how a column was derived, how a sensitive attribute was grouped, or which combination of fields could identify a person is useful to staff and harmful when published. Review each description on public datasets against your data handling rules before saving, keep internal explanations in an access-controlled location, and confirm with a logged-out browser test what visitors can see.
Reloads and read-only consumer access
A reload rewrites the table that consumers query through the Data API, so column names and types can change under them. Columns loaded as text can be converted when type overrides apply on reload, which changes how filters and sorts behave for downstream users. Before a dictionary edit goes live, confirm that the reload keeps the table and column names your consumers use, and that the read-only user can still run queries afterward. The grants behind that access are covered in the topic on setting up the DataStore database and permissions.
CKAN DataStore docsService tokens for automated reloads
Loaders and scheduled jobs that reload resources authenticate to CKAN with an API token, and that token carries the permissions of the account that owns it. A token tied to a former employee or a broad sysadmin account gives automation more reach than the reload needs. Confirm which account owns each token used for reloads, whether it can edit datasets beyond the target resources, and how and when it is rotated. XLoader needs an API token from CKAN 2.10 onward, so plan this before the first automated reload.
Change history for review
Dictionary edits can only be reviewed if someone can see who changed what and when. Confirm whether the activity stream in your CKAN version records the resource and dictionary changes you need, how long those records are kept in your database, and which users can read them. Keep the approved text of sensitive descriptions in version control so reviewers can compare what is published with what was approved. Make one test edit and reload end to end so you know exactly what the record shows before relying on it.
How much effort does documenting columns take, and can our team do it alone?
How does effort scale with columns and resources in each dataset?
Effort grows with the number of columns to describe and with the number of resources that carry them. Each column needs a label, a Markdown description and, where the loaded type is wrong, a type override. In an illustrative example, a 40-column table takes far more review than an 8-column one. Repeated structures help: if many resources share the same headers, the team can write the dictionary once per layout and check each file against it. The cost rises when every resource uses its own column names, because each one needs separate review. Ask for effort broken out per resource and per column group, along with the assumptions behind it, such as how many resources share a layout. Count your columns and resources before requesting a quote, since those two numbers drive most of the scope.
Can our internal team document CKAN columns without a partner?
Yes, a team with CKAN administration skills can do this work alone, and many portals keep it in-house after the first pass. Labels, descriptions and type overrides are entered through the CKAN interface without custom code, so the tooling is not the main obstacle. The harder part is knowledge. Someone must know what each column means, which usually sits with the data owner and the portal administrator together. A partner adds the most value when the team lacks CKAN operations experience, needs help setting up a staging copy, or has a large backlog of resources to review. Confirm in your CKAN version's documentation exactly where the dictionary is edited before you plan the work.
What does column documentation need from our staff?
The work needs three things from your side before it starts:
- A data owner for each dataset who can explain what each column means, which units apply and which values are valid.
- Portal administrator access, or a named administrator who can make the edits and run the reloads.
- A staging copy of the portal with the same resources loaded, so labels, descriptions and type overrides can be tested without changing public metadata.
Agree in writing who approves each dataset before it goes live, and who receives the findings when a column cannot be typed cleanly. Staff time is the largest internal cost, so name the people and their hours in the plan before work begins.
What makes documenting columns cost more or less?
The cost depends on how much must be decided and checked for each column. These factors push effort up:
- Wide tables, because every column needs a label and a description, and some need a type decision.
- Many resources with different headers for the same concept.
- Type conflicts, such as a column loaded as text that holds dates, codes or mixed values and needs investigation before an override can be set.
- Undocumented source data, which moves effort into interviews with the people who produced the files.
Stable headers, a shared glossary and one named owner per dataset push effort down. Ask the partner which of these drivers the quote assumes, and what changes if the assumptions prove wrong.
Does every Data Dictionary edit require reloading the resource?
Only type overrides depend on a reload. Labels and Markdown descriptions are stored with the resource's metadata, so reviewers can check them without reloading the data. A type override tells the DataStore how to treat a loaded column. XLoader applies it when the resource is loaded again, which is how a column first loaded as text can receive a numeric or date type. Plan a reload window for each dataset that has type changes, and check the result with a sample query before it goes public. Confirm in the CKAN DataStore documentation how each edit is applied in your version and whether any cached views need refreshing.
What should a written quote for column documentation include?
DeployOpen agrees scope, deliverables and timelines in writing before work starts, and a quote follows from that scope. Whichever partner you consider, ask the quote to state:
- The datasets, resources and columns in scope, with counts from your inventory.
- Which edits are included: labels, descriptions, type overrides and reloads.
- Who approves each dataset and how approvals are recorded.
- Whether staging tests are included and who provides the staging copy.
- How many review rounds are included and what counts as done.
- A handover list of edits made and a procedure for documenting future resources.
- Assumptions and exclusions, including how undocumented source data is handled.
What goes wrong when a team documents columns directly in production?
The most common problems are edits made to the live portal before anyone has checked them, reloads that change column types, and descriptions that disagree with the source files. A type override applied to a column with mixed values can cause failed loads or hide values that users need. Editing several datasets at once makes it harder to trace which change caused a problem. Keep a record of each edit, test changes on staging first, and give each dataset one named owner who signs off. Ask any partner or internal lead to describe how they will restore the previous state if a type change or reload fails.
How do we check the dictionary matches the loaded data?
Compare the dictionary field names and types with a sample of rows from the DataStore, and confirm each column's meaning with its data owner. Read a small set of rows for each resource through the Data API, then check that the values fit the declared type and label. Look for blank values, leading zeros in codes, dates that parse differently across locales, and numbers stored with thousands separators. Record each check with the resource identifier and the date, so reviewers can reproduce it. If a column still fails after review, keep it as text and document the limitation in its description.
Limits to confirm for your CKAN version and data
The Data Dictionary can behave differently depending on your CKAN and XLoader versions, the size of your tables and the loader that populated them. Treat each card below as a check to run on a staging copy of your portal before you promise editors or data users a result.
Version support for each override
Dictionary fields and type overrides may not behave the same way across CKAN releases, so one info entry can work on one portal and not another. Read the release notes for your CKAN minor version and the XLoader version you run, then test each field type you plan to use. Patch releases exclude schema changes and new features, while minor releases may include backwards-incompatible changes, so name the exact CKAN and XLoader pair in your change ticket before you commit to a design.
Values that cannot be cast
When you override a column to a numeric, date or other typed value, some existing cells may fail to convert. Before you apply an override, query the column for values that fail the target type, such as free text in a column meant for integers. Decide whether to fix the source file, clean the data in a pipeline or keep the column as text. Confirm in your version what happens to values that fail the cast, because a stopped load, a text fallback and a dropped override each change what data users see.
Reload time on very large tables
Applying a new override to a large table usually means a full reload, and the wait grows with the size of the file and the table. Time a reload of your largest resource on the hardware, PostgreSQL storage and worker setup you actually run, since throughput depends on those choices. Check whether readers see the old or new table during a reload, because data users may query a partly loaded table. Schedule the change in a maintenance window for tables that serve public queries.
Coverage across API and downloads
A dictionary edit changes the metadata the DataStore exposes, but each consumer may read that metadata differently. Check whether your labels, descriptions and types appear in the datastore_search response, the resource page, full downloads and any SQL or external client that caches a schema. Test the paths your users actually take, including a download in each format they choose, and record what you tested so your answer to a user question rests on evidence.
DataStore docsLegacy DataPusher behavior
DataPusher is the legacy loader, and you should not assume its handling of dictionary fields and types matches XLoader's. A resource that DataPusher loaded may keep column types that an XLoader reload would change, so treat the first XLoader reload as a test. Confirm which loader last populated each resource using your job logs or resource metadata before you edit its dictionary. Plan the move to XLoader as a separate change, with a copy of each affected table kept for rollback.
How DeployOpen scopes and delivers dictionary work on your CKAN portal
DeployOpen treats the Data Dictionary as part of the published table itself. We start from the resources already loaded in your DataStore, agree which columns need labels, Markdown descriptions and type overrides, and document the result alongside the data it describes. Each change is written down so your data owners can review it before it goes live.
How we scope
- The written scope lists which datasets, resources and columns get labels, descriptions and type overrides.
- Engagements are fixed-scope, so the column count and dictionary fields are agreed before work starts.
- Ongoing dictionary upkeep for new or reloaded resources can be covered by a retainer.
How we build
- We check the CKAN version and XLoader setup first, since type overrides depend on how columns were loaded.
- Labels and Markdown descriptions are written from a column inventory agreed with your data owners.
- Type overrides are set for columns that were loaded as text but hold numbers, dates or codes.
How we hand over
- A written record lists each field, its label, description, type override and owner.
- Reload behavior is documented, including which type overrides XLoader applies on the next load.
- Your team receives the dictionary configuration and notes to repeat the process on later resources.
How we support
- Retainers cover upgrades, continued dictionary changes and continuous testing of the portal.
- Questions about a column's type or label after handover can be raised under the retainer, if you choose one.
- Ask for the support boundaries in writing, including who reruns the loads after a schema change.

