Data lookup based on a postcode to return a region and value

Hi All,

I have a data file that I would like to look up variables from another table/file based on part of the postcode.
e.g Postcode in my data is GU12, so I would look up in another file, and it would return ‘South East’ and ‘7498494’

I have done it with an Excel lookup before, but this is far too big and I don’t think it was the best process. I was wondering if the data repository is the way to go, or if there’s some sort of query/JavaScript in the DataMapper that could work. Any advice on best practice would be appreciated.

Thanks

You could use a Database Query Plugin in Workflow to query the Excel file through an ODBC driver for Excel.

@jchamel, thanks for your reply. I may have misworded my issue. I have a data file that I am going to drop in each day, and I would like to append data from another table where the criteria match. So if a record in my source data has GU12, it will look up GU12 in the other file and append other fields from the corresponding record. I didn’t think the Database Query could do that.

Hummm, there is the db.Connect() from a script in the Datamapper but the jdbc:olodbc is soon to be deprecated.

What is the data format of the incoming data file?

but the jdbc:olodbc is soon to be deprecated

This is not entirely accurate. The original JDBC-ODBC bridge, identified by the jdbc:odbc moniker, is being deprecated from Connect because it was made obsolete by Oracle long ago. It is currently planned to be retired entirely in 2026.2.

It is being replaced by a new bridge, identified as jdbc:olodbc, which we have developed as a replacement. It has some limitations at the moment (see documentation for details), but should become more feature-complete as it matures.

1 Like

Both data files are in Excel. We could do the lookup before using the data file in connect but that would stop it from being an automated process.

However, we can change the file being looked up to any file type.