Solved

Access/SQL ETL (Extract Transfer Load)

Posted on 2014-02-05
3
684 Views
Last Modified: 2014-02-06
Hi

I have an Access database that has tables that are linked to SQL.
On a daily basis the data from one of the tables (circa 40000 rows) has to be
be downloaded into Access, edited and uploaded again.

I was told that the process is referred to as ETL (Extract Transfer Load)
where the linked table is converted into an Access table, the SQL index column is dropped.
Then data is edited and added in Access and finally re-uploaded.

What is the best way to do this? I assume that a mix of VBA and queries will be necessary
0
Comment
Question by:murbro
3 Comments
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 39838151
40000 rows isn't that much, so just create a link (attach) the table via ODBC and manipulate the records. Much easier than importing, deleting, and refilling the table.

/gustav
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 500 total points
ID: 39838345
Hi,

I would also recommend to use Gustav's solution. The reason is that a user would normally edit only one record at a time so the risk of concurrency is relatively small (but you need of course a 100% online connection to the backend). If one user edit the same record as another one, Access handles that automatically and warns you if the record on the server is no longer the same as the own one - no code needed (but you should add a column of type "timestamp" to any table which is edited by Access directly).

If you really need to edit an "offline" version you would need to handle the concurrency on your own. That means: If the user edit 10 records where another user also edited and deleted 6 of them with his own frontend then you need to have a way to handle that when you upload the changes of user 1.

You could use an Access table for that and convert that and so on - but there is a much easier way to do that especially because you have only few records (40,000 is really not much): Use ADO offline recordsets. The trick is simple: Create an ADO recordset and close the connection of the recordset after downloading it. ADO offers a bunch of properties and methods for batch processing so you can easily let the user edit that recordset with a normal Access form by assigning the recordset directly to the form recordset (which can be either DAO or ADO). There are some differences in handling, i.e. the ID column cannot get a new value at the time the user edit it, ADO automatically uses a replacement ID (negative number as far as I remember) and replaces all new record IDs later when the changes are submitted to the server. When the user clicks a "Submit" button, your code can then reenable the connection to the server and use the methods of ADO which offers for example a conflict list that tells you which record was successfully updated and where are which kind of conflicts (like "other user changed that" or "record was already deleted" and so on) and offers methods to handle these conflicts. You only need to program that in VBA because you must say what to do in which conflict case.

Using this method you do not need any local table, no conversion (as you are working with the server's datatypes in the ADO recordset) and no complicate compare methods as that is all already contained in ADO.
By the way: .NET uses a similar technique, only calls that dataset which can hold a bunch of tables but the way is the same: Working always offline, working with the data in memory and having a complete set of conflict methods. If you have learned the batch process handling in ADO you will not have any problem to understand the same in ADO.

Please use your favourite search machine to search for the technical documentation about batch processing in ADO for further details as that would be a lot to explain in detail here.

Cheers,

Christian
0
 

Author Closing Comment

by:murbro
ID: 39838510
Thanks
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
I have a large data set and a SSIS package. How can I load this file in multi threading?
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now