RETS DMQL basics for WP-Property Importer

If you are bewildered by XPath semantics you'll learn that DMQL is even stranger. DMQL is a query language required by most RETS providers. The first step you should take before writing a DMQL query is take a look at the fields used by your MLS provider, you may do so at http://retsmd.com/, provided you have login credentials. Once you have logged into your RETS provider navigate to a Property Classification of your choice.

Establishing a Connection

In order to connect your XML Importer schedule to an MLS provider you will, in most cases, need to enter in some "mapping" information to let XML Importer know which fields in your MLS provider's RETS data correspond to necessary WP-Property fields. Unfortunately this step must be performed manually because naming conventions vary from one MLS provider to the next.

  • Property data is almost always found under the "Property" data type which breaks down further into "Classifications", in this case "REN" classification corresponds to "Rentals" and "RES" corresponds to "Residential". The naming conventions will vary from one providers to the next. 

    

  • The "SystemName" column displays a list of available fields, these are the fields you must use within DMQL queries as well as Attribute Mapping. 

  • You will need to fill out several fields within XML Importer to establish a connection to your RETS provider as well as select a particular property classification. The screenshot below is a quick overview of which fields are mapped where.

Date Ranges

To limit listings to a particular date range, perhaps if we only want to fetch active listings that have been modified after August of 2013, the following query would do just that:

(STATUS=A),(DATE_MODIFIED=2013-08-01+) The previous query will import all listings modified after August 1st, you could otherwise limit by a specific range, let's say all of July: (STATUS=A),(DATE_MODIFIED=2013-07-01-2013-08-01) Lastly, if you don't care about fetching Active listings, and only care about the time-frame, your query would be as follows: (DATE_MODIFIED=2013-07-01-2013-08-01) We could also restrict our import to the number of photos a listing has - assuming that the provider has a "PHOTO_COUNT" field the following DMQL query will only import listings that have between 2 and 5 photos: (STATUS=A),(PHOTO_COUNT=2-5)

Addresses

Most MLS providers have a number of fields corresponding with different sections of an address - e.g. "Street Number", "Street Name", "City", etc. To reduce the number of attributes it is recommended to concatenate all the address fields into a single field and let WP-Property handle the geolocation (via Google Maps API) upon import.  So, assuming that your provider uses "STREET_NUM", "STREET_NAME", "CITY", "STATE" and "ZIP" fields, the following Attribute Map entry will easily concatenate (combine) the separate fields into a single "Address" field: concat:'STREET_NUM' 'STREET_NAME' 'STREET_DIR', 'CITY', 'STATE' 'ZIP'When the listing is imported, WP-Property will perform a "Geolocation Lookup" which will fetch the latitude, longitude, county, etc. fields from Google Maps and save the values into the listing.

Best Practices

This is a brief summary of common best practices with importing RETS listings into WP-Property.

  • Use the MLS Number as the Unique ID Attribute. 
  • Concatenate certain values within the XPath rule. For example, "Half Bathrooms" and "Full Bathroom" could be concatenated and saved to "Bathrooms" with the following rule: concat:'BATHS_HALF' / 'BATHS_FULL'
  • Do not set the "Property Type" attribute in the Attribute Map. MLS data often has arbitrary property types and it's best to configure the property type for all listings within a schedule by setting the "Default Property Type"

WP-Property: Importer

  1. Images are not Importing in WP-Property Importer
  2. XML and RETS Setup Services for WP-Property Importer
  3. Properties not published or Pending Images Download for WP-Property Importer
  4. WP-Property: Importer - Home
  5. Error No listings are found when running the WP-Property Importer Check your Query
  6. Could not connect to RETS server HTTP in WP-Property Importer
  7. Could not load XML Object from raw data in WP-Property Importer
  8. RETS DMQL basics for WP-Property Importer
  9. Issues Connecting to RETS Server for WP-Property Importer
  10. New Google Spreadsheet format in WP-Property Importer
  11. Google Spreadsheet errors in WP-Property Importer
  12. WP-Property: Importer - Useful XPath Rules To Use In Schedules
  13. WP-Property: Importer - There Was An Issue Doing The RETS Search In WP-Property Importer
  14. WP-Property: Importer - Translating
  15. Installing WP-Property: Importer
  16. WP-Property: Importer - Running The Import For WP-Property Importer
  17. WP-Property: Importer - Recommended Values For Server Configuration Options For WP-Property Importer
  18. WP-Property: Importer - MySQL Server Has Gone Away
  19. WP-Property-Importer-Introduction To RETS
  20. WP-Property: Importer - Integration Of WP Importer With Agents Add On
  21. WP-Property: Importer - Importing CSV
  22. WP-Property: Importer - Google Spreadsheet Format Error. Authentication With Google Failed. Reason Is Bad Authentication In WP-Property Importer
  23. WP-Property: Importer - DMQL Queries
  24. WP-Property: Importer - Could Not Load XML Object From Raw Data. Looks Like The Data Has Errors And Can Not Be Converted To XML Object In WP-Property Importer
  25. WP-Property: Importer - Could Not Connect To RETS Server, PHRETS 1 Cookie File \"\" Cannot Be Written To. Must Be An Absolute Path And Must Be Writable Within WP-Property Importer
  26. WP-Property: Importer - Basic XML Import Step By Step For WP-Property Importer
  27. WP-Property: Importer - Basic RETS Import Step By Step For WP-Property Importer
  28. WP-Property: Importer - Available XPath Functions For WP Importer Schedules
  29. WP-Property: Importer - Attribute Matches In Schedule Settings For WP-Property Importer
  30. WP-Property: Importer - Advanced Schedule Options For WP-Property Importer

Feedback and Knowledge Base