我正在寻找从中导出数据的能力 SQL Azure Azure表存储到某些平面文件或XML文件,以便我们可以将其导入SQL/MYSQL Server并进行数据分析.
发生的事情是我们每小时从文本API获得大量事务(分区策略是每小时),因为Azure表存储不支持count和Sum.因此,对于数据分析,我们希望将数据导出到Flat Files并导入到SQL Server/MySQL进行分析.
题:
任何util或Tutorial如何将数据从Azure表存储导出到Flat文件?按照Patition分区并快速分区?任何示例代码或实用程序?任何经验证的示例/教程?
MS SQL和Azure Table,任何可以每小时自动提取和加载数据到SQL服务器的工具或实用程序?Microsoft在路线图上提供的任何此类产品或出口工具?
任何支持将受到高度赞赏.
我已经设置了一个天蓝色的网站并上传了所有内容等.
现在我能够访问我的网站链接abc.cloudapp.net,这会影响我的主域名的搜索引擎优化.
有没有办法阻止访问我的网站abc.cloudapp.net,只允许通过abc.com?
谢谢
我使用Azure SQL数据库来存储我的公司记录.但是它们的收费真的更高,而且非常昂贵.我正在使用SQL数据库标准版,所以我想我可以继续使用基本版来最小化开销.标准版和基本版之间有什么区别.请建议任何解决方案.
我正在尝试理解我在ES6课程中观察到的这种行为.请考虑以下代码.这很简单:我有一个父类(Parent)和一个Child继承自它的子类().Parentclass有一个方法getLabel,只需返回该类的label属性.
当我创建子类的实例时,设置其标签并尝试打印它一切正常.
但是,当我通过Object.assign在第一个实例上使用创建另一个子类实例时,即使我明确地更改它,新实例仍会保留第一个实例的标签值.
class Parent {
constructor(label) {
this.getLabel = () => {
return this.label;
};
this.label = label;
}
}
class Child extends Parent {
constructor(label) {
super(label);
this.label = label;
}
}
const c = new Child('Child');
console.log('c getLabel() = ' + c.getLabel());//Prints "Child"
const c1 = Object.assign(new Child('C1'), c);
c1.label = 'Child Modified';
console.log('c1 getLabel() = ' + c1.getLabel());//Prints "Child" again instead of "Child Modified".
Run Code Online (Sandbox Code Playgroud)
我不确定为什么会这样!
我所做的是改变了我 …
如果您阅读有关带有 blob 存储触发器的 Azure WebJobs 的文档,他们会提到这不太可靠:
WebJobs SDK 扫描日志文件以监视新的或更改的 blob。这个过程不是实时的;创建 blob 后几分钟或更长时间可能不会触发函数。此外,存储日志是在“尽力而为”的基础上创建的;无法保证所有事件都会被捕获。在某些情况下,日志可能会丢失。如果您的应用程序无法接受 Blob 触发器的速度和可靠性限制,则建议的方法是在创建 Blob 时创建队列消息,并在处理 Blob 的函数上使用 QueueTrigger 属性而不是 BlobTrigger 属性。
https://github.com/Azure/azure-webjobs-sdk/wiki/Blobs
我假设他们对 Azure Functions 使用相同的功能,但在那里我找不到任何相关信息。有人知道更多吗?这种情况已经改变还是仍然如此?
我正在尝试使用Windows Azure开发多层云应用程序.为了存储我的数据,我选择了Azure存储表和Azure存储Blob.
我的应用程序的不同层使用相同的功能集,但方式不同.例如,他们都必须能够获得blob.我决定创建单类库来访问Windows Azure Blob存储,但我遇到了400错误.
当我直接从我的工作者角色连接到Blob时,它工作正常,但是当我从类库调用类时,它失败了400状态代码(错误请求).这是我的代码:
public class TestClass
{
public static void Test()
{
string s = CloudConfigurationManager.GetSetting("StorageCS");
CloudStorageAccount account = CloudStorageAccount.Parse
(
s
);
CloudBlobClient client = account.CreateCloudBlobClient();
CloudBlobContainer container =
client.GetContainerReference("mycontainer");
container.CreateIfNotExists(BlobContainerPublicAccessType.Blob);
}
}
Run Code Online (Sandbox Code Playgroud)
这是一个只试图访问blob容器的测试类.当我在我的worker角色中使用这个类时,它工作正常.如果我从另一个辅助角色引用此辅助角色并在第二个角色中使用此类,则它可以工作,但如果我将此类移动到外部类库,则会失败.在'container.CreateIfNotExists(BlobContainerPublicAccessType.Blob);'行上抛出异常 这是一个StorageException,带有'400.错误请求'消息.
我正在使用Azure存储模拟器.使用调试器,我检查了CloudStorageAccount.Parse方法是否存在相关连接字符串("UseDevelopmentStorage = true"),无论如何(直接使用表单类库,来自其他工作者角色)类都使用.似乎无法使用类库访问Azure存储?
我们如何创建一个特定大小的空文件?我有一个要求,我需要创建一个空文件(即文件填充零字节).为了做到这一点,这是我目前采取的方法:
这是我目前使用的代码:
const createEmptyFileOfSize = (fileName, size) => {
return new Promise((resolve, reject) => {
try {
//First create an empty file.
fs.writeFile(fileName, Buffer.alloc(0), (error) => {
if (error) {
reject(error);
} else {
let sizeRemaining = size;
do {
const chunkSize = Math.min(sizeRemaining, buffer.kMaxLength);
const dataBuffer = Buffer.alloc(chunkSize);
try {
fs.appendFileSync(fileName, dataBuffer);
sizeRemaining -= chunkSize;
} catch (error) {
reject(error);
}
} while (sizeRemaining > 0);
resolve(true);
}
});
} catch (error) {
reject(error);
}
}); …Run Code Online (Sandbox Code Playgroud) 如何使用 php 从 windows azure 容器中获取所有文件(blob)。
我正在使用下面的代码,它只获取 500 个 blob,我想获取所有文件。
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);
try {
// List blobs.
$blob_list = $blobRestProxy->listBlobs($source_container);
$blobs = $blob_list->getBlobs();
foreach($blobs as $blob)
{
//echo $blob->getName().": ".$blob->getUrl()."<br /><br />";
echo $blob->getUrl()."<br />";
$photo_name=strtolower($blob->getName());
//echo $rs=upload_own_image("raagaimg",$photo_name,$blob->getUrl());
//echo "<br /><br />";
}
}
catch(ServiceException $e){
// Handle exception based on error codes and messages.
// Error codes and messages are here:
// http://msdn.microsoft.com/library/azure/dd179439.aspx
$code = $e->getCode();
$error_message = $e->getMessage();
echo $code.": ".$error_message."<br />";
}
Run Code Online (Sandbox Code Playgroud)
谢谢
塔尼盖维兰
我正在尝试使用存储连接字符串将一些测试值插入到 Azure 表中。当我尝试执行插入操作时,它显示错误,因为无法将 TableStorage.RunnerInputs 转换为 Microsoft.azure.cosmosDB.table.itableentity。我正在参考https://learn.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-dotnet来解决这个问题
*
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
//Create the table client.
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
//Create the CloudTable object that represents the "people" table.
CloudTable table = tableClient.GetTableReference("InputParameters");
table.CreateIfNotExists();
//Create a new customer entity.
RunnerInputs RunnerInput = new RunnerInputs("OnlyDate", "rowkey");
//CloudTable test = null;
RunnerInput.InputDate = "20180213";
//Inputvalue = "20180213";
//Create the TableOperation object that inserts the customer entity.
TableOperation insertOperation = TableOperation.Insert(RunnerInput);
//Execute the insert operation.
table.Execute(insertOperation);
Run Code Online (Sandbox Code Playgroud)
跑者级别
namespace TableStorage
{
public class …Run Code Online (Sandbox Code Playgroud) 我试图了解 Azure Cosmos DB 中物理/逻辑分区与吞吐量可用性之间的关系,但有几个问题。
参考文档:https://learn.microsoft.com/en-us/azure/cosmos-db/partitioning-overview。
根据文档,我的理解如下:
现在我的问题是:
是基于逻辑分区占用的空间,还是基于物理分区中所有逻辑分区消耗的吞吐量,或者完全是其他什么。例如,
对此的任何见解都将受到高度赞赏。
更新
根据评论,我将原始问题分为两部分。问题的第二部分可以在这里找到:Cosmos DB 中物理分区在其逻辑分区之间分割的可用吞吐量如何?。
我正在使用azure AD身份验证来验证我的MVC应用程序中的用户.我在azure上发布了我的应用程序,它工作正常.
但是,当我在本地运行我的应用程序时,它会出现Microsoft的登录页面,当我输入凭据并单击"登录"按钮时,它会显示"抱歉,但我们在登录时遇到问题.我们收到了一个错误的请求." 但同样的应用程序是在azure上,如果我从那里访问它,那么它允许我登录.
为了创建这个应用程序,我使用了链接来添加azure AD身份验证
我正在尝试获取一个容器(如果它存在的话)来创建它。
我的困惑是因为GetBlobContainersAsync返回 aBlobContainerItem并CreateBlobContainerAsync返回 a BlobContainerClient。
当我找到容器时,我怎样才能BlobContainerClient从BlobContainerItem?
这是我到目前为止所拥有的:
var blobServiceClient = new BlobServiceClient(this.ConnectionString);
BlobContainerItem archiveContainer = null;
await foreach (var container in blobServiceClient.GetBlobContainersAsync(prefix: Uploader.ContainerName))
{
if (String.Compare(container.Name, Uploader.ContainerName,
CultureInfo.CurrentCulture, CompareOptions.Ordinal) == 0)
{
archiveContainer = ???
break;
}
}
if (archiveContainer == null)
{
archiveContainer = await blobServiceClient.CreateBlobContainerAsync(Uploader.ContainerName);
}
Run Code Online (Sandbox Code Playgroud) azure ×11
c# ×3
.net ×1
asp.net-mvc ×1
database ×1
dns ×1
ecmascript-6 ×1
javascript ×1
node.js ×1
php ×1
subdomain ×1
url ×1