Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Removes unnecessary columns from SharePoint List imports.
let func =
(SourceTable as table) => Table.RemoveColumns(
    SourceTable, 
    {
      "FileSystemObjectType", 
      "ServerRedirectedEmbedUri", 
      "ServerRedirectedEmbedUrl", 
      "ComplianceAssetId", 
      "OData__UIVersionString", 
      "GUID", 
      "FirstUniqueAncestorSecurableObject", 
      "RoleAssignments", 
      "AttachmentFiles", 
      "ContentType", 
      "GetDlpPolicyTip", 
      "FieldValuesAsHtml", 
      "FieldValuesAsText", 
      "FieldValuesForEdit", 
      "File", 
      "Folder", 
"Created",
      "LikedByInformation", 
      "ParentList", 
      "Properties", 
      "Versions", 
      "Author", 
      "Editor", 
      "ContentTypeId"
    }, MissingField.Ignore
  ) ,
documentation = [
Documentation.Name = " Table.RemoveSPListColumns.pq ",
Documentation.Description = " Removes unnecessary columns from Sharepoint List imports. ",
Documentation.LongDescription = " Removes unnecessary columns from Sharepoint List imports. Easily customizable with row-wise commenting. ",
Documentation.Category = " Table.ColumnOperations ",
Documentation.Source = " ",
Documentation.Version = " 1.0 ",
Documentation.Author = " Imke Feldmann ",
Documentation.Examples = {[Description = " ",
Code = " ",
Result = " "]}]
in
Value.ReplaceType(func, Value.ReplaceMetadata(Value.Type(func), documentation))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment