Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Feeds SQL – getting arbitrary data Drupalized….

Feeds SQL does its job so well it’s rather mindblowing.   As the name suggests it allows Feeds to use a SQL query as its data source.  The mapping and all the rest of it works as one might expect, and that’s what is blowing my mind right now.  After installing the module

SQL Fetcher

SQL Fetcher

Firstly set your fetcher to the sql fetcher…  I only have one database in my settings file for now, but that’s sure to change.

Secondly choose the SQL Parser… I guess this means that you might be able to upload a file in to the fetcher and then parse it… for this example we’re going SQL Fetch and SQL Parse though.

Choose the SQL Parser

Choose the SQL Parser

And now the magic begins…  in the settings you can test your sql fetch by putting in a select statement.  For this example I made a dummy table with some random stuff in it

SQL Parsing

SQL Parsing

and now comes the wow!

It's data!

It's data!

And more wow!

Your columns are ready to be mapped!

Your columns are ready to be mapped!

So pretty – and just like that all those whacked databases you were trying to decide how to merge in to Drupal are available with feeds…. yum yum yummy. Mad props to vkareh for the dev on this piece… absolutely awesome.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web