Get Marketo Field Data Types | Community
Skip to main content
Ben_Neal
Level 2
June 18, 2018
Question

Get Marketo Field Data Types

  • June 18, 2018
  • 3 replies
  • 5557 views

I know you can export all fields and their api names and display names, but is there a way to get the data types of the fields in bulk (i.e. in a list)?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

SanfordWhiteman
Level 10
June 18, 2018

Yes and no.

The Describe Lead API endpoint returns a datatype for all fields, but it's not actually accurate for the purpose of building an offline SQL db structure, if that's what you're thinking. (The max length of text fields isn't correct.) It should at least get you started, though.

Ben_Neal
Ben_NealAuthor
Level 2
June 19, 2018

Sanford Whiteman​ Thanks for the API endpoint, I can the data types from there. I actually am exactly doing that, building a replicated SQL DB holding Lead and Activity data. Can you say more about issues that would arise with data types between Marketo and the SQL structure?

SanfordWhiteman
Level 10
June 19, 2018

The most problematic area is the text types. If you go by the Describe response you'll end up mapping many Strings to NVARCHAR(255) and will thus lose data, since the actual capacity of many (not all, but you can't know which ones are affected) will be NVARCHAR(2000). As a result, as instances grow toward hundreds of fields (if you're not there already) you need to mark columns SPARSE b/c SQL will not allow the row width otherwise.

In addition, you should never use Currency types in Marketo, period, since they are stored (alarmingly) as Floats. Store value × 100 in an Integer for USD (or just discard fractions entirely).

Steven_Vanderb3
Adobe Employee
Adobe Employee
June 18, 2018

The Describe REST API call returns all fields with their data types http://developers.marketo.com/rest-api/lead-database/#describe

Sant_Singh_Rath
Adobe Champion
Adobe Champion
June 19, 2018

I don't think there is any bulk export option for this. Only way to get to know all the data types of marketo field is:

Click on create field > Then you can see all options in the dropdown and they are:

1. Boolean
2. Currency
3. Date
4. Date Time
5. Email
6. Float
7. Formula
8. Integer
9. Percent
10. Phone
11. Score

~ Sant Singh Rathaur
SanfordWhiteman
Level 10
June 19, 2018

Steven and I both provided the name of the bulk endpoint!