TownSq
Sign In
Preparing Source Data

Preferred Data Formats

Standard formats for dates, phone numbers, currency, and more, so source data imports cleanly through the ingestion pipeline.

Overview

Use these conventions when preparing source data. Consistent formatting helps the data import cleanly through the ingestion pipeline and reduces the quality issues that surface later in Review. Where a value doesn't match, the ingestion transformation logic can often normalize it — but consistent source formatting makes that reliable.


Dates

Preferred format: YYYY-MM-DD (ISO 8601)

Examples:

  • 2024-01-15
  • 2023-12-31
  • 01/15/2024
  • 15-Jan-2024

Common transformations:

MM/DD/YYYY → YYYY-MM-DD      01/15/2024 → 2024-01-15
DD-MON-YYYY → YYYY-MM-DD     15-Jan-2024 → 2024-01-15
Excel date serial → YYYY-MM-DD   45307 → 2024-01-15

Phone numbers

Preferred format: (555) 123-4567

Accepted:

  • (555) 123-4567
  • 555-123-4567
  • 555.123.4567
  • 5551234567

Boolean values

Preferred format: true or false

Common transformations:

Y/N → true/false
1/0 → true/false
Yes/No → true/false
T/F → true/false

Currency

Preferred format: a numeric value with no currency symbols or thousands separators.

Examples:

  • 1500.00
  • 250.50
  • $1,500.00
  • 1.500,00

Percentages

Preferred format: a decimal value, not a percentage.

Examples:

  • 0.25 (for 25%)
  • 0.50 (for 50%)
  • 25%

Email addresses

Preferred format: a standard email address — content before and after a single @, and a domain with a period. For example, owner@domain.org.


Text fields

  • Encoding: UTF-8.
  • Commas inside text must be quoted, e.g. "123 Main St, Suite 100".
  • Avoid line breaks within a field; if unavoidable, quote the field.
  • Empty values: use an empty string for optional fields; required fields can't be empty.

Delivering source data

Source data reaches the platform through the agreed access method — a CSV export to S3, an ODBC/JDBC connection, an API, or a database dump (see Providing Source Data). When delivering flat files:

  • Use UTF-8 encoding and a comma delimiter.
  • Include a header row.
  • Quote text fields that contain commas.

Quick reference

Data typeFormatExample
DateYYYY-MM-DD2024-01-15
Phone(555) 123-4567(555) 867-5309
Booleantrue or falsetrue
CurrencyNumeric, no symbols1500.00
PercentageDecimal0.25
EmailStandard formatuser@domain.com

Questions?

See the FAQs for more help with data formatting.

Preferred Data Formats | TownSq Data Onboarding