Binary.InferContentType

Updated on

Binary.InferContentType is a Power Query M function that infers the MIME-type of a binary value and returns a record containing the content type and other relevant information. The function returns a record with fields for content type, encoding, potential delimiter, and potential positions.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Binary.InferContentType( source as binary ) as record

Description

Returns a record with field Content.Type that contains the inferred MIME-type. If the inferred content type is text/*, and an encoding code page is detected, then additionally returns field Content.Encoding that contains the encoding of the stream. If the inferred content type is text/csv, and the format is delimited, additionally returns field Csv.PotentialDelimiter containing a table for analysis of potential delimiters. If the inferred content type is text/csv, and the format is fixed-width, additionally returns field Csv.PotentialPositions containing a list for analysis of potential fixed width column positions.

Other functions related to Binary.InferContentType are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/binary-infercontenttype

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy