简体   繁体   English

如何从Azure数据湖分析文件中的dat文件中获取列数

[英]How to fetch the column count from dat file in Azure data lake analytics files

I have different Dat and CSV files. 我有不同的DatCSV文件。 it's containing more than 255 columns and delimiter as '|' 它包含超过255列,并以'|'作为分隔符 and tab. 和标签。 How to fetch the column count. 如何获取列数。 Anyone please share sample U-Sql code 任何人都请共享示例U-Sql代码

I know this was down voted, so I hope it is still OK to supply an answer (although I'm not including a code sample). 我知道这是投反对票,因此我希望提供答案还是可以的(尽管我不包括代码示例)。

Extract just the first row in your file (using FETCH 1 ROWS) into a single column rowset. 仅将文件中的第一行(使用FETCH 1 ROWS)提取到单列行集中。 You should then be able to use String.Split to get a column count. 然后,您应该可以使用String.Split来获取列数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用参数文件将多个文件从 BLOB 导出为 Azure Synapse Analytics 中的 Data Lake Parquet 格式? - How to Export Multiple files from BLOB to Data lake Parquet format in Azure Synapse Analytics using a parameter file? 如何将Azure Blob文件复制到Azure Data Lake Analytics - How to copy azure blob files to azure data lake analytics Azure数据湖分析空输出文件 - Azure data lake analytics empty output file 如何使用 Python 从 Windows 共享网络驱动器获取文件并上传到 Azure Data Lake Storage 位置? - How to fetch files from Windows Shared Network Drive and upload to Azure Data Lake Storage location using Python? 如何使用 Azure 数据工厂将新文件或更新文件从 Azure 数据湖推送到文件夹 - How to push new or updated files from Azure Data lake to File folder using Azure Data Factory 如何将文件从Azure Powershell加载到Azure Data Lake - How to load files from azure powershell to Azure Data Lake 如何从 .NET 在 Azure Data Lake 文件共享中创建文件? - How can I create files in Azure Data Lake File Shares from .NET? U-SQL Azure Data Lake Analytics按日期搜索文件 - U-SQL Azure Data Lake Analytics search files by date 无法从Azure Data Lake Analytics访问Azure Key Vault - Cannot access Azure Key Vault from Azure Data Lake Analytics 使用Azure Data Lake进行分析 - using Azure Data Lake for Analytics
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM