A
- AccessControlEntry.ConditionToIdentities
- Access.Database
- ActiveDirectory.Domains
- AdobeAnalytics.Cubes
- AdoDotNet.DataSource
- AdoDotNet.Query
- AnalysisServices.Database
- AnalysisServices.Databases
- AzureStorage.BlobContents
- AzureStorage.Blobs
- AzureStorage.DataLake
- AzureStorage.DataLakeContents
- AzureStorage.Tables
B
- BinaryFormat.Binary
- BinaryFormat.Byte
- BinaryFormat.ByteOrder
- BinaryFormat.Choice
- BinaryFormat.Decimal
- BinaryFormat.Double
- BinaryFormat.Group
- BinaryFormat.Length
- BinaryFormat.List
- BinaryFormat.Null
- BinaryFormat.Record
- BinaryFormat.SignedInteger16
- BinaryFormat.SignedInteger32
- BinaryFormat.SignedInteger64
- BinaryFormat.Single
- BinaryFormat.Text
- BinaryFormat.Transform
- BinaryFormat.UnsignedInteger16
- BinaryFormat.UnsignedInteger32
- BinaryFormat.UnsignedInteger64
- BinaryFormat.7BitEncodedSignedInteger
- BinaryFormat.7BitEncodedUnsignedInteger
- Binary data
- Binary.ApproximateLength
- Binary.Buffer
- Binary.Combine
- Binary.Compress
- Binary.Decompress
- Binary.From
- Binary.FromList
- Binary.FromText
- Binary.InferContentType
- Binary.Length
- Binary.Range
- Binary.Split
- Binary.ToList
- Binary.ToText
- Binary.View
- Binary.ViewError
- Binary.ViewFunction
- Byte.From
C
- Cdm.Contents
- Character.FromNumber
- Character.ToNumber
- Combiner.CombineTextByDelimiter
- Combiner.CombineTextByEachDelimiter
- Combiner.CombineTextByLengths
- Combiner.CombineTextByPositions
- Combiner.CombineTextByRanges
- Comparer.FromCulture
- Comparer.Ordinal
- Comparer.OrdinalIgnoreCase
- Controlling byte order
- Csv.Document
- Cube.AddAndExpandDimensionColumn
- Cube.AddMeasureColumn
- Cube.ApplyParameter
- Cube.AttributeMemberId
- Cube.AttributeMemberProperty
- Cube.CollapseAndRemoveColumns
- Cube.Dimensions
- Cube.DisplayFolders
- Cube.MeasureProperties
- Cube.MeasureProperty
- Cube.Measures
- Cube.Parameters
- Cube.Properties
- Cube.PropertyKey
- Cube.ReplaceDimensions
- Cube.Transform
- Currency.From
D
- DateTime.AddZone
- DateTime.Date
- DateTime.FixedLocalNow
- DateTime.From
- DateTime.FromFileTime
- DateTime.FromText
- DateTime.IsInCurrentHour
- DateTime.IsInCurrentMinute
- DateTime.IsInCurrentSecond
- DateTime.IsInNextHour
- DateTime.IsInNextMinute
- DateTime.IsInNextNHours
- DateTime.IsInNextNMinutes
- DateTime.IsInNextNSeconds
- DateTime.IsInNextSecond
- DateTime.IsInPreviousHour
- DateTime.IsInPreviousMinute
- DateTime.IsInPreviousNHours
- DateTime.IsInPreviousNMinutes
- DateTime.IsInPreviousNSeconds
- DateTime.IsInPreviousSecond
- DateTime.LocalNow
- DateTime.Time
- DateTime.ToRecord
- DateTime.ToText
- Date.AddDays
- Date.AddMonths
- Date.AddQuarters
- Date.AddWeeks
- Date.AddYears
- Date.Day
- Date.DayOfWeek
- Date.DayOfWeekName
- Date.DayOfYear
- Date.DaysInMonth
- Date.EndOfDay
- Date.EndOfMonth
- Date.EndOfQuarter
- Date.EndOfWeek
- Date.EndOfYear
- Date.From
- Date.FromText
- Date.IsInCurrentDay
- Date.IsInCurrentMonth
- Date.IsInCurrentQuarter
- Date.IsInCurrentWeek
- Date.IsInCurrentYear
- Date.IsInNextDay
- Date.IsInNextMonth
- Date.IsInNextNDays
- Date.IsInNextNMonths
- Date.IsInNextNQuarters
- Date.IsInNextNWeeks
- Date.IsInNextNYears
- Date.IsInNextQuarter
- Date.IsInNextWeek
- Date.IsInNextYear
- Date.IsInPreviousDay
- Date.IsInPreviousMonth
- Date.IsInPreviousNDays
- Date.IsInPreviousNMonths
- Date.IsInPreviousNQuarters
- Date.IsInPreviousNWeeks
- Date.IsInPreviousNYears
- Date.IsInPreviousQuarter
- Date.IsInPreviousWeek
- Date.IsInPreviousYear
- Date.IsInYearToDate
- Date.IsLeapYear
- Date.Month
- Date.MonthName
- Date.QuarterOfYear
- Date.StartOfDay
- Date.StartOfMonth
- Date.StartOfQuarter
- Date.StartOfWeek
- Date.StartOfYear
- Date.ToRecord
- Date.ToText
- Date.WeekOfMonth
- Date.WeekOfYear
- Date.Year
- DB2.Database
- Decimal.From
- Diagnostics.ActivityId
- Diagnostics.Trace
- DirectQueryCapabilities.From
- Double.From
- Duration.Days
- Duration.From
- Duration.FromText
- Duration.Hours
- Duration.Minutes
- Duration.Seconds
- Duration.ToRecord
- Duration.TotalDays
- Duration.TotalHours
- Duration.TotalMinutes
- Duration.TotalSeconds
- Duration.ToText
E
F
G
H
I
L
- Lines.FromBinary
- Lines.FromText
- Lines.ToBinary
- Lines.ToText
- List.Accumulate
- List.AllTrue
- List.Alternate
- List.AnyTrue
- List.Average
- List.Buffer
- List.Combine
- List.ConformToPageReader
- List.Contains
- List.ContainsAll
- List.ContainsAny
- List.Count
- List.Covariance
- List.Dates
- List.DateTimes
- List.DateTimeZones
- List.Difference
- List.Distinct
- List.Durations
- List.FindText
- List.First
- List.FirstN
- List.Generate
- List.InsertRange
- List.Intersect
- List.IsDistinct
- List.IsEmpty
- List.Last
- List.LastN
- List.MatchesAll
- List.MatchesAny
- List.Max
- List.MaxN
- List.Median
- List.Min
- List.MinN
- List.Mode
- List.Modes
- List.NonNullCount
- List.Numbers
- List.Percentile
- List.PositionOf
- List.PositionOfAny
- List.Positions
- List.Product
- List.Random
- List.Range
- List.RemoveFirstN
- List.RemoveItems
- List.RemoveLastN
- List.RemoveMatchingItems
- List.RemoveNulls
- List.RemoveRange
- List.Repeat
- List.ReplaceMatchingItems
- List.ReplaceRange
- List.ReplaceValue
- List.Reverse
- List.Select
- List.Single
- List.SingleOrDefault
- List.Skip
- List.Sort
- List.Split
- List.StandardDeviation
- List.Sum
- List.Times
- List.Transform
- List.TransformMany
- List.Union
- List.Zip
- Logical.From
- Logical.FromText
What is Azure Data Lake Storage?
Azure Data Lake Storage is a cloud-based storage solution that allows users to store and analyze big data in a cost-effective and scalable way. It provides two types of storage accounts: Gen1 and Gen2. Both storage accounts offer similar functionalities but have different features. Gen1 storage accounts provide a hierarchical namespace, while Gen2 storage accounts provide a flat namespace. This article will focus on the M code for accessing data from both storage account types.
AzureStorage.DataLakeContents Function
The AzureStorage.DataLakeContents function is a custom M function that allows users to access and transform data from Azure Data Lake Storage accounts. The function takes two parameters: the path to the data and the optional options parameter. The path parameter is a string that specifies the path to the data in the Azure Data Lake Storage account. The options parameter is an optional record that specifies additional options for the function. The function returns a table with the contents of the data.
The M code for the AzureStorage.DataLakeContents function is as follows:
let
AzureStorage.DataLakeContents = (path as text, optional options as nullable record) as table =>
let
options_defaults = [
HierarchicalNavigation = true,
IncludeSubfolders = true,
InferDataTypes = true,
QuoteCharacter = """"""""""""",
FirstRowAsHeader = true,
Encoding = null,
Culture = null,
Delimiter = null,
ExtraColumns = null,
SkipLines = 0,
CommentStyle = null,
ColumnsToIgnore = null,
QuoteStyle = QuoteStyle.None,
NullValues = null
],
options_combined = Record.Combine(options_defaults, options),
parameters = [
HierarchicalNavigation = options_combined[HierarchicalNavigation],
IncludeSubfolders = options_combined[IncludeSubfolders],
InferDataTypes = options_combined[InferDataTypes],
QuoteCharacter = options_combined[QuoteCharacter],
FirstRowAsHeader = options_combined[FirstRowAsHeader],
Encoding = options_combined[Encoding],
Culture = options_combined[Culture],
Delimiter = options_combined[Delimiter],
ExtraColumns = options_combined[ExtraColumns],
SkipLines = options_combined[SkipLines],
CommentStyle = options_combined[CommentStyle],
ColumnsToIgnore = options_combined[ColumnsToIgnore],
QuoteStyle = options_combined[QuoteStyle],
NullValues = options_combined[NullValues]
],
data = Csv.Document(
Web.Contents(
"https://{accountName}.dfs.core.windows.net/" & path,
[
Headers = [
#"Authorization" = "Bearer " & AccessToken(),
#"Content-Type" = "text/csv"
],
Query = [
"resource" = "filesystem"
]
]
),
parameters
)
in
data
in
AzureStorage.DataLakeContents
How to Use AzureStorage.DataLakeContents Function
The AzureStorage.DataLakeContents function can be used in Power Query to access and transform data from Azure Data Lake Storage accounts. To use the function, follow these steps:
1. Open Power Query Editor
2. Click on the “Blank Query” button in the “Home” tab
3. In the “Query Settings” pane, click on the “Advanced Editor” button
4. Paste the M code for the AzureStorage.DataLakeContents function into the editor
5. Replace the `{accountName}` placeholder in the M code with the name of the Azure Data Lake Storage account to access
6. Save the M code and close the editor
7. In the “Home” tab, click on the “Close & Load” button to load the data into Power Query
Once the data is loaded into Power Query, users can transform it using the Power Query interface. The AzureStorage.DataLakeContents function can also be combined with other Power Query functions to perform complex data transformations.
The AzureStorage.DataLakeContents function is a powerful M function that allows users to access and transform data from Azure Data Lake Storage accounts. The M code for the function is relatively simple and can be customized to fit specific data transformation needs. By learning how to use this function, users can take advantage of the scalability and cost-effectiveness of Azure Data Lake Storage to perform complex data transformations.