This commit is contained in:
Florian Mader 2016-12-21 12:01:03 +01:00
Родитель 18e6ccae0f
Коммит 84a7cb1101
3 изменённых файлов: 27 добавлений и 3 удалений

Просмотреть файл

@ -2,9 +2,9 @@
This example demonstrates how you can use U-SQL to analyze data stored in Avro files.
## Deploying
The Avro Extractor requires Microsoft.Analytics.Samples.Formats and an updated version of the Microsoft.Hadoop.Avro library which can be downloaded at (https://github.com/flomader/hadoopsdk/releases).
The Avro Extractor requires Microsoft.Analytics.Samples.Formats and an updated version of the Microsoft.Hadoop.Avro library which can be found [here](https://github.com/flomader/hadoopsdk).
1. Download the latest version of Microsoft.Hadoop.Avro.zip from https://github.com/flomader/hadoopsdk/releases
1. Download the latest version of Microsoft.Hadoop.Avro.zip from [here]( https://github.com/flomader/hadoopsdk/releases).
2. Extract Microsoft.Hadoop.Avro.dll from Microsoft.Hadoop.Avro.zip
3. Clone and open the Microsoft.Analytics.Samples.Formats solution in Visual Studio.
4. Update the reference of the file Microsoft.Hadoop.Avro.dll
@ -20,7 +20,7 @@ The Avro Extractor requires Microsoft.Analytics.Samples.Formats and an updated v
4. register the assemblies which have previously been uploaded to ADLS by submitting 2-RegisterAssemblies.usql
### Upload sample data
1. You can download an Avro sample file which contains twitter data from http://blob.colorslab.io/avro/twitter.avro
1. Get an Avro sample file which contains twitter data from [here](../Samples/Data/Avro/twitter.avro).
2. Use the Azure Data Lake Explorer (in Visual Studio, or the Azure Portal) or any other ADLS client to upload twitter.avro to a directory in Azure Data Lake Store (e.g. /TwitterStream/2016/12/twitter.avro)
3. Check file paths in 3-SimpleAvro.usql and update them if necessary

Двоичные данные
Examples/Samples/Data/Avro/twitter.avro Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,24 @@
{
"type" : "record",
"name" : "GenericFromIRecord0",
"namespace" : "Microsoft.Streaming.Avro",
"fields" : [ {
"name" : "createdat",
"type" : [ "null", "string" ]
}, {
"name" : "topic",
"type" : [ "null", "string" ]
}, {
"name" : "sentimentscore",
"type" : [ "null", "long" ]
}, {
"name" : "eventprocessedutctime",
"type" : [ "null", "string" ]
}, {
"name" : "partitionid",
"type" : [ "null", "long" ]
}, {
"name" : "eventenqueuedutctime",
"type" : [ "null", "string" ]
} ]
}