Managing Large Lists

%3CLINGO-SUB%20id%3D%22lingo-sub-482116%22%20slang%3D%22en-US%22%3EManaging%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482116%22%20slang%3D%22en-US%22%3E%3CP%3EHere%20is%20my%20current%20situation%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWeekly%2C%20I%20receive%20an%20updated%20copy%20of%20our%20company%20roster.%20It's%20an%20employee%20directory%2C%20essentially%2C%20containing%20nealry%2040%2C000%20rows%20of%20data.%20What%20would%20be%20the%20most%20efficient%20way%20to%20update%20this%20week%20weekly%20with%20the%20newest%20data%3F%20For%20past%20projects%2C%20I%20just%20linked%20my%20SP%20site%20to%20Access%20and%20created%20some%20macros%20that%20would%20delete%20the%20old%20and%20add%20the%20new.%20However%2C%20deleting%20(approx.)%2040k%20records%20and%20then%20adding%20them%20again%20takes%20quite%20a%20bit%20of%20time.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20wondering%20if%20anyone%20else%20is%20in%20a%20similar%20situation%20or%20has%20done%20this%20before.%20i.e.%20weekly%20refresh%20of%20large%20lists%20in%20SharePoint%20from%20excel%20files.%20Any%20help%20is%20greatly%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-482116%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482812%22%20slang%3D%22en-US%22%3ERe%3A%20Managing%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482812%22%20slang%3D%22en-US%22%3EAhhh%2C%20bummer.%20I%20personally%20would%20probably%20try%20to%20come%20up%20with%20a%20way%20to%20import%20using%20flow%20to%20an%20azure%20sql%20database%20to%20use.%20This%20way%20you%20also%20won't%20run%20into%20many%20delegation%20issues%20with%20PowerApps%20and%20can%20make%20use%20of%20more%20functions%20etc.%20You%20can%20get%20a%20basic%20one%20for%205%20bucks%20a%20month%20to%20handle%20these%20tasks%2C%20and%20anyone%20can%20connect%20to%20it%20in%20your%20org%20since%20you%20can%20embed%20the%20sql%20connection%20to%20it.%20Or%20you%20could%20manually%20import%20using%20the%20sql%20tools%20to%20import%20the%20excel%20file.%20Just%20some%20thoughts.%20I%20wouldn't%20use%20SharePoint%20for%20it%20thou.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482802%22%20slang%3D%22en-US%22%3ERe%3A%20Managing%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482802%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F869%22%20target%3D%22_blank%22%3E%40Chris%20Webb%3C%2FA%3E%26nbsp%3B-%20I%20tried%20to%20connect%20my%20PowerApp%20to%20the%20Excel%20file%20instead%20of%20the%20SharePoint%20list%2C%20but%20apparently%20there%20is%20a%20file%20size%20limitation.%20I%20received%20the%20error%20below.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EFile%20size%20above%20allowed%20value.%20File%20size%3A6056073%2C%20AllowedFileSize%20(in%20Bytes)%3A%202000000%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482756%22%20slang%3D%22en-US%22%3ERe%3A%20Managing%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482756%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20it's%20coming%20in%20from%20Excel%2C%20I%20would%20just%20consume%20the%20data%20right%20form%20the%20file.%20Then%20replace%20the%20file%20with%20the%20new%20one%20with%20the%20same%20name%20etc.%20This%20way%20your%20App%20just%20reads%20the%20data%20as%20is%2C%20no%20importing%20required.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20assumes%20however%20that%20the%20excel%20file%20is%20in%20some%20kind%20of%20relational%20%2F%20csv%20type%20formatting%20and%20is%20always%20in%20the%20same%20format%20.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482246%22%20slang%3D%22en-US%22%3ERe%3A%20Managing%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482246%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F115528%22%20target%3D%22_blank%22%3E%40Matt%20Coats%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20end%20goal%20is%20to%20create%20a%20front%20end%20via%20PowerApps%20for%20the%20Directors%20that%20allows%20them%20to%20quickly%20filter%20the%20list%20by%20various%20levels%20(which%20are%20fields%20in%20the%20list)%20within%20the%20org.%20I%20simply%20want%20to%20design%20a%20quick%2C%20view%20only%20form%20to%20display%20details%20of%20everyone%20that%20fits%20the%20criteria.%20I'm%20not%20using%20any%20type%20of%20active%20directory.%20The%20data%20in%20the%20list%20is%20coming%20via%20Excel%20file.%20This%20file%20is%20received%20daily%20via%20email%2C%20but%20I%20only%20need%20to%20update%2Frefresh%20my%20SP%20list%20weekly.%20Since%20the%20excel%20file%20has%20nearly%2040k%20rows%20of%20data%2C%20the%20delete%2Fappend%20queries%20that%20I've%20typically%20been%20doing%20for%20similar%20projects%20take%20way%20too%20long.%20So%20I'm%20just%20wondering%20if%20there%20is%20an%20easier%20way%20to%20accomplish%20this.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482245%22%20slang%3D%22en-US%22%3ERe%3A%20Managing%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482245%22%20slang%3D%22en-US%22%3EDoes%20it%20works%20to%20remove%20all%20the%20records%20in%20the%20list%20and%20re-add%20them%3F%20You%20could%20easily%20automate%20this%20with%20a%20simple%20PowerShell%20script%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482196%22%20slang%3D%22en-US%22%3ERe%3A%20Managing%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482196%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F326519%22%20target%3D%22_blank%22%3E%40catgentry%3C%2FA%3E%26nbsp%3BForgive%20me%20as%20I%20dodge%20around%20your%20original%20question%20and%20ask%20about%20your%20end-goal%20instead.%20Assuming%20you%20are%20using%20ADFS%2C%20is%20the%20data%20you%20use%20for%20this%20roster%20also%20reside%20in%20ADFS%3F%20The%20reason%20I%20ask--my%20organization%20recently%20is%20exploring%20dealing%20with%20employee%20directory%20maintenance%20by%20leaning%20on%20Microsoft%20Teams'%20Who%20bot%20instead%20of%20a%20list.%20Who%20isn't%20ideal%20for%20browsing%20employees%2C%20but%20it%20is%20very%20good%20at%20returning%20AD%20information%20about%20specific%20people%20and%20even%20provides%20some%20extra%20information%20you%20can't%20get%20from%20a%20directory%2C%20such%20as%20what%20people%20that%20person%20most%20communicates%20with.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20for%20your%20original%20question--the%20best%20way%20I%20can%20think%20of%20to%20manage%20a%20list%20that%20large%20other%20than%20delete%2Fadd%20would%20be%20to%20set%20up%20a%20delta%20job.%20In%20theory%2C%20you%20could%20do%20this%20with%20a%20tool%20like%20SSRS%20via%20Kingswaysoft%20or%20maybe%20even%20Flow.%20To%20pseudo-code%20the%20process%2C%20you%20basically%20have%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EMatch%20unique%20identifiers%20(i.e.%2C%20employee%20number)%20from%20new%20list%20(the%20most%20recent%20employee%20directory%20data)%20to%20master%20list%20(your%20SharePoint%20list)%3CUL%3E%3CLI%3EIf%20new%20list%20has%20a%20new%20unique%20identifier%20not%20found%20in%20the%20master%20list%2C%20add%20the%20new%20record%20to%20your%20master%20list%3C%2FLI%3E%3CLI%3EIf%20master%20list%20has%20a%20unique%20identifier%20that%20isn't%20found%20in%20the%20new%20list%2C%20delete%20that%20record%20from%20the%20master%20list%3C%2FLI%3E%3CLI%3EIf%20unique%20identifiers%20match%2C%20but%20any%20of%20the%20other%20fields%20in%20don't%20match%20between%20the%20master%20list%20and%20the%20new%20list%2C%20overwrite%20master%20list%20record%20with%20new%20list%20record%20information%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EDelta%20jobs%20should%2C%20in%20theory%2C%20run%20faster%20than%20a%20drop-and-load%20process.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-486507%22%20slang%3D%22en-US%22%3ERe%3A%20Managing%20Large%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-486507%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F326519%22%20target%3D%22_blank%22%3E%40catgentry%3C%2FA%3Ean%20alternative%20approach%20would%20be%20to%20add%20the%20extra%20fields%20to%20Azure%20AD%20and%20then%20connect%20your%20power%20app%20to%20that.%20This%20would%20eliminate%20the%20file%20in%20the%20middle%20problem%20and%20provide%20a%20much%20richer%20experience%20for%20the%20app%20users.%20The%20Org%20Browser%20app%20template%20that%20comes%20with%20PowerApps%20provides%20an%20example%20that%20could%20get%20you%20started%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Deleted
Not applicable

Here is my current situation - 

 

Weekly, I receive an updated copy of our company roster. It's an employee directory, essentially, containing nealry 40,000 rows of data. What would be the most efficient way to update this week weekly with the newest data? For past projects, I just linked my SP site to Access and created some macros that would delete the old and add the new. However, deleting (approx.) 40k records and then adding them again takes quite a bit of time. 

 

Just wondering if anyone else is in a similar situation or has done this before. i.e. weekly refresh of large lists in SharePoint from excel files. Any help is greatly appreciated!

7 Replies
Highlighted

@Deleted Forgive me as I dodge around your original question and ask about your end-goal instead. Assuming you are using ADFS, is the data you use for this roster also reside in ADFS? The reason I ask--my organization recently is exploring dealing with employee directory maintenance by leaning on Microsoft Teams' Who bot instead of a list. Who isn't ideal for browsing employees, but it is very good at returning AD information about specific people and even provides some extra information you can't get from a directory, such as what people that person most communicates with.

 

As for your original question--the best way I can think of to manage a list that large other than delete/add would be to set up a delta job. In theory, you could do this with a tool like SSRS via Kingswaysoft or maybe even Flow. To pseudo-code the process, you basically have this:

 

  • Match unique identifiers (i.e., employee number) from new list (the most recent employee directory data) to master list (your SharePoint list)
    • If new list has a new unique identifier not found in the master list, add the new record to your master list
    • If master list has a unique identifier that isn't found in the new list, delete that record from the master list
    • If unique identifiers match, but any of the other fields in don't match between the master list and the new list, overwrite master list record with new list record information

Delta jobs should, in theory, run faster than a drop-and-load process.

Highlighted
Does it works to remove all the records in the list and re-add them? You could easily automate this with a simple PowerShell script
Highlighted

@Matt Coats 

My end goal is to create a front end via PowerApps for the Directors that allows them to quickly filter the list by various levels (which are fields in the list) within the org. I simply want to design a quick, view only form to display details of everyone that fits the criteria. I'm not using any type of active directory. The data in the list is coming via Excel file. This file is received daily via email, but I only need to update/refresh my SP list weekly. Since the excel file has nearly 40k rows of data, the delete/append queries that I've typically been doing for similar projects take way too long. So I'm just wondering if there is an easier way to accomplish this. 

Highlighted

If it's coming in from Excel, I would just consume the data right form the file. Then replace the file with the new one with the same name etc. This way your App just reads the data as is, no importing required.

This assumes however that the excel file is in some kind of relational / csv type formatting and is always in the same format .

Highlighted

@Chris Webb - I tried to connect my PowerApp to the Excel file instead of the SharePoint list, but apparently there is a file size limitation. I received the error below. 

 

File size above allowed value. File size:6056073, AllowedFileSize (in Bytes): 2000000

Highlighted
Ahhh, bummer. I personally would probably try to come up with a way to import using flow to an azure sql database to use. This way you also won't run into many delegation issues with PowerApps and can make use of more functions etc. You can get a basic one for 5 bucks a month to handle these tasks, and anyone can connect to it in your org since you can embed the sql connection to it. Or you could manually import using the sql tools to import the excel file. Just some thoughts. I wouldn't use SharePoint for it thou.
Highlighted

@Deletedan alternative approach would be to add the extra fields to Azure AD and then connect your power app to that. This would eliminate the file in the middle problem and provide a much richer experience for the app users. The Org Browser app template that comes with PowerApps provides an example that could get you started