问题描述
我有一个U-SQL脚本,可以对其参数化以在不同的环境中运行,有时会混合并匹配存储在blob(wasb://)存储和adls(adl://)中的文件-通常我正在阅读从blob文件写入adls文件.
I have a U-SQL script that I parameterize to run on different environments, mixing and matching sometimes files stored in blob (wasb://) storage and adls (adl://) - usually I am reading from blob files and writing to adls files.
因此,在Azure环境中,我可以使用最终看起来像这样的变量来构建字符串:
So in the Azure environment I can build a string using variables that ends-up looking like this:
adl://adlsname.azuredatalakestore.net/00000000000000000000000000000000/change/hedges/inbound/filename.ext
(其中"adlsname"是我的实际ADLS名称)
(where "adlsname" is my actual ADLS name)
问题:当我想使用脚本针对(Local-machine)在本地测试 时,如何构建URI的第一部分?我尝试过:
QUESTION: when I want to use my script to test locally against (Local-machine), how do I build that first part of the URI? I've tried:
adl://Local-machine.azuredatalakestore.net/...
adl://Local-machine.azuredatalakestore.net/ ...
,但这是一种错误的格式,当我在本地提交时会出错.我知道我只能说"/00000000000000000000000000000000/change/hedges/inbound/filename.ext"但我有一个用于构造URI的模板.
but that is an incorrect format that errors when I submit it locally. I know I can just say "/00000000000000000000000000000000/change/hedges/inbound/filename.ext" butI have a template in which I construct the URI.
谢谢您的建议!
Bill Blakey
Bill Blakey
推荐答案
在第一种情况下,只需使用相对URI而不是绝对URI(我希望您可以将其模板化).
In the first case, just use the relative URI instead of the absolute URI (I would expect that you can templatize that).
在第二种情况下,您可以使用本地文件路径,例如c:\ path \ todata \ 000000000000 \ ...
In the second case, you can use local file paths, e.g., c:\path\todata\000000000000\...
这篇关于如何使用adl://约定引用本地数据根?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!