If you required all fields from excel sheet, then use * like below
from [lib://Humanities data/Pupil general info and assessment data.xlsx]
(ooxml, embedded labels, table is [Pupil general info]);
So that if tomorrow, new field added in your file then you don't required to add it over script.
You can unlock the auto generated script by clicking on unlock button.
Thanks for the reply. I tried that for the new tables but it didn't import the new columns from the excel sheets. I unlocked the second auto-generated section and deleted that... However, upon import of the data this screwed everything up - circular references, loads of synthetic keys etc.
The code in the data manager auto-generated section looks like this:
[Pupil general info_temp_4b2a3a0c-bf27-7f05-d6f1-9c7c7b2f]:
[EAL Flag] AS [Pupil general info.EAL Flag],
[Preferred Name] AS [Pupil general info.Preferred Name],
[Surname] AS [Pupil general info.Surname],
[Forename (Firstname)] AS [Pupil general info.Forename (Firstname)],
[Name] AS [Pupil general info.Name],
[Gender] AS [Pupil general info.Gender],
[EAL / SEN Flag]
RESIDENT [Pupil general info];
DROP TABLE [Pupil general info];
[Pupil assessment data_temp_49bf7142-1b67-d70a-b139-30317187]:
[Teacher] AS [Intials-Teacher],
[Subject] AS [Pupil assessment data.Subject],
[Preferred Name] AS [Pupil assessment data.Preferred Name],
[Year group] AS [Pupil assessment data.Year group],
[Surname] AS [Pupil assessment data.Surname],
[Forename (Firstname)] AS [Pupil assessment data.Forename (Firstname)],
RESIDENT [Pupil assessment data];
DROP TABLE [Pupil assessment data];
Then at the bottom of the page after various other table import scripts is this:
RENAME TABLE [Compiled data_temp_7b356be2-df77-32f6-7b1d-dd5c9ad8] to [Compiled data];
RENAME TABLE [Pupil general info_temp_4b2a3a0c-bf27-7f05-d6f1-9c7c7b2f] to [Pupil general info];
RENAME TABLE [Pupil assessment data_temp_49bf7142-1b67-d70a-b139-30317187] to [Pupil assessment data];
RENAME TABLE [Pupil report data_temp_214c91a8-e221-cb42-ef13-3526c096] to [Pupil report data];
RENAME TABLE [Sheet1_temp_fc37c3ab-dc1f-0adb-924c-c65df854] to [Sheet1];
RENAME TABLE [SEN data_temp_7fae213e-4352-33c9-f795-71cb22b1] to [SEN data];
RENAME TABLE [EAL data_temp_14984169-2bae-bc16-52fa-980addcb] to [EAL data];
RENAME TABLE [Sheet1-1_temp_d544a15b-f4da-a6fc-316c-98e365cf] to [Sheet1-1];
Below this is the autocalendar code.
Do I need to change any of this as well?
Thanks for your help.
Remove the auto-generated script (it will be generated once you go to "Data manager" view).
Just unlock and remove that auto-generated script page, then you will see the new fields automatically (after reload - Make sure to give * instead of fields names).
If in-case, you want to the fields information then go to "Data model viewer". so that it will not generate autogenerated script.