如何使用adl://约定引用本地数据根? [英] How do I reference a local data root using the adl:// convention?

查看:97
本文介绍了如何使用adl://约定引用本地数据根?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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" but I have a template in which I construct the URI.

谢谢您的建议!

Bill Blakey

Bill Blakey

推荐答案

That depends where you keep the data locally. Note that local run cannot access data in Azure. So you either place the data into the so called local data root or some custom place on your local disk.

在第一种情况下,只需使用相对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://约定引用本地数据根?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆