Giter Club home page Giter Club logo

azurestoragedriver's Introduction

README

This is a plug-in for LINQPad that enables the execution of queries against Azure Table Storage.

It allows you to add storage accounts as connections in LINQPad. It will list all tables for each account and all columns in each table. Since Azure tables can have mixed schemas, a property was added in version 1.1.0 allowing users to specify the number of rows that should be scanned to determine the schema of each table. For the same reason, any value types are made Nullable<> since it cannot be guaranteed that they will have a value for a given row.

Nuget Build Status

Issues and Feature requests

Issues and feature requests can be made in the projects issues page on GitHub.

Versions

v2.1.2 - 2022-11-13

  • Updated dependency versions:

    • LINQPad.Reference: 1.1.0 -> 1.3.0
    • SonarAnalyzer.CSharp: 8.0.0.9566 -> 8.48.0.56517
    • Microsoft.CodeAnalysis.CSharp: 3.3.1 -> 3.11.0
  • Added explicit reference to Newtonsoft.Json to work around issue #22

v2.1.1 - 2020-02-04

  • Workaround for problem described in #20
    • The .NET Core 3.1 driver was getting .NET Core 3.0 references, which prevented it from compiling the generated code because the driver itself was a reference and therefore needed 3.1 references.
    • As a workaround, the driver is no longer a required reference for the generated code, which is compatible with either .NET Core 3.0 or 3.1, so no matter what runtime LinqPad provides, the code should compile.

v2.1.0 - 2020-01-05

Happy new year! After last month's update, I decided to work on some really old pending PRs, do some cleanup and tackle #19 which came in on the first day of the year.

v2.0.0 - 2019-12-01

It took a while for a new version to come out, but with LINQPad 6 and big changes in the Azure SDK libraries, I thought it was time. And, although functionally not much has changed, I decided that a new distribution channel and total change in the underlying SDK, deserved a new major version.

Note: the Azure Storage SDK used by the LINQPad 5 version is in maintenance mode and it will be deprecated soon according to Microsoft. However, since LINQPad 5 plugins target .NET Framework 4.6, the switch to the package used by the LINQPad 6 plugin is not possible.

v1.1.0 - 2014-08-20

  • Uses latest version of Azure Storage Client Library (4.2.0)
  • Provides a solution to issue #1 by adding a configuration parameter that allows users to specify the number of rows to be scanned to determine the schema of a table (100 by default).

v1.0.1 - 2013-08-15

Corrects issue #4.

v1.0.0-beta - 2010-01-08

This is the first public release. Needs real-world testing.

azurestoragedriver's People

Contributors

caserzer avatar dependabot[bot] avatar espenrl avatar lorenvs avatar madd0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

azurestoragedriver's Issues

Provider does not work well in lprun.exe (cmd line tool)

I get an exception indicating failure in initialization code on line 171 in AzureDriver.cs. I guess the environment in lprun.exe is not the same as running under LINQPad.exe.

# Exception

NullReferenceException: Object reference not set to an instance of an object.
at Madd0.AzureStorageDriver.AzureDriver.<>c__DisplayClass1.b__0(Object sender, SendingRequestEventArgs e) in d:\Projec
ts\GitHub\AzureStorageDriver\Madd0.AzureStorageDriver\AzureDriver.cs:line 171
at System.EventHandler1.Invoke(Object sender, TEventArgs e) at System.Data.Services.Client.DataServiceContext.CreateRequest(Uri requestUri, String method, Boolean allowAnyType, String contentType, Version requestVersion, Boolean sendChunked) at System.Data.Services.Client.DataServiceRequest.CreateResult(Object source, DataServiceContext context, AsyncCallback callback, Object state) at System.Data.Services.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents) at System.Data.Services.Client.DataServiceQuery1.Execute()
at System.Data.Services.Client.DataServiceQuery1.GetEnumerator() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at UserQuery in c:\Users\erl\Documents\LINQPad Queries\PSS\Tempser.linq:line 29

Contains not implemented

from e in ErrorInfo
where e.StatusMessage.Contains("Timeout")
select e

This fails, the inner exception just says not implemented.

FormatException when creating a connection with UseHttps set to false

When you create a connection, by default it sets UseHttps to false. It then stores the connection info in the connections.xml file and does not serialize UseHttps since it's a default value.

Then when you attempt to deserialize UseHttps, you get an empty string which throws a format exception when you try to convert it to a bool. By manually adding false to the connections file, or setting UseHttps to true in the UI, you can get around this error.

Update StorageAccountProperties.UseHttps to pull out the XElement value, and then manually call Bool.TryParse on it to avoid this problem.

Azure Table Query doesn't show all properties when new properties are added

I recently added new properties to an Azure Table. i.e. Old table entries had EventId, EventValue. I added Platform and ContentId values to new rows.

When I run a Linq query in linqpad, it doesn't show the new values. I was able to verify that they are there using Visual Studio. Is there something being cached that is preventing the new data from showing up in the query?

Here's an example query i'm using.

from c in ContentConsumptionEventLog
where c.EventTimestamp > DateTime.Parse("04-25-2018 13:00")
select c

When .NET Core 3.1 installed, "Cannot compile typed context" error

When running LINQPad 6 (have tried both 6.5.5 and 6.6.1) with .NET Core 3.1 installed, I get an error when attempting to interact with connections that use the Azure Storage Driver:

Error: Cannot compile typed context: Assuming assembly reference 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'Madd0.AzureStorageDriver' matches identity 'System.Runtime, Version=4.2.2.0, Culture=neu

(the tooltip is truncated at that point)

If only netcore3.0 is installed, everything works fine.

If netcore3.1 and netcore3.0 are both installed, it fails. If only netcore3.1 is installed, it fails.

Results list seems to be limited to 1000

Azure storage explorer limits the results to 2000, it would be nice to use continuation tokekens, get all the data back into a collection, then use the full linq syntax

Microsoft.Azure.Cosmos.Table 1.0.5 brings in Newtonsoft 10.x, and Linqpad 7 pops up a Warning

The specific warning is :

Warning: LINQPad has identified the following vulnerabilties in NuGet package Newtonsoft.Json 10.0.2:

Level 2 (High): https://github.com/advisories/GHSA-5crp-9r3c-p9vr
Try updating NuGet packages to latest. You can suppress this warning in Edit | Preferences > Advanced > Execution.

I've tried pulling the code and updating newtonsoft to version 13, but, i have no idea how to build / publish / test this :(

There's a newer version of the Microsoft.Azure.Cosmos.Table (1.0.8) , which it fails to install (doubt it'll fix the issue though, as that vulnerability was fixed in the newtosoft v 13, which was released in Mach '21, and the 1.0.8 was done in august '20).

The whole Microsoft.Azure.Cosmos.Table is deprecated as well ...
not sure if it's an easy fix, or worth fixing, but figured i'll post it in case you do want to give it a go .

(oh, and cheers for you work BTW, regardless ๐Ÿ™ )

Connections don't work at all

After creating a connection with this driver, the connection appears in red in the connection list with this identifier:

(Error: String was not recognized as a valid Boolean.)

It doesn't matter if I provider correct credentials or fake values.

I'm using LinqPad 4.45.05. I don't know how to see the AzureStorageDriver version, but I installed it yesterday from within LinqPad.

Generated classes doesn't have all the properties of the table schema

Because the code is only reading the first row of a table, the schema is incompleted. So to have the full schema is necessary to read all the values of the table.

In the SchemaBuilder class the GetModel method has the following statement, that can show what i'm saying.

// Read the first entity to determine the table's schema
var firstRow = dataContext.CreateQuery(table.Name).Take(1).FirstOrDefault();

Can not compile typed context: Assembly 'Madd0.AzureStorageDriver'

When trying to connect to Azure TableStorage from LinqPad6 (using nuget driver) I recieve an error:
Error: Can not compile typed context: Assembly 'Madd0.AzureStorageDriver' with identity 'Madd0.AzureStorageDriver, Version 2.1.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Runtime, Version 4.2.2.0, Culture=neutral, ...
In LinqPad5 the same connection is working and I am able to connect using TableStorage driver.
Are there some prerequisites needed? LinqPad is working by itself. And able to connect to SQL.

I saw closed ticked, but the problem seems not solved... Driver version 2.1.0.0

Add proxy support

Please, add proxy support. On my work I am forced to use corporate proxy.

Malformed OData Request

Getting "Bad Request" when using the following LINQ query:

from t in TestTable
where t.PartitionKey == "Date Test" && t.TestDate < t.Timestamp
select t

Resulting query is: (PartitionKey eq 'Date Test') and (() lt ())

While the LINQ query is valid, OData only supports a subset of criteria and therefore cannot be translated.

Could an exception should be raised in those instances?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.