Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving the Properties Field using the Avro Extractor #144

Open
NoraBo opened this issue Sep 10, 2018 · 2 comments
Open

Retrieving the Properties Field using the Avro Extractor #144

NoraBo opened this issue Sep 10, 2018 · 2 comments

Comments

@NoraBo
Copy link

NoraBo commented Sep 10, 2018

How could we query the Properties field of type map in U-SQL statement when using the Avro extractor as shown below:

The Properties field is required to differentiate between different type of records being stored.

@rs =
EXTRACT
EnqueuedTimeUtc string,
SequenceNumber long,
Offset string,
Body byte[]

FROM @input_file
**USING new Microsoft.Analytics.Samples.Formats.ApacheAvro.AvroExtractor**(@"
    {
""type"": ""record"",
""name"": ""EventData"",
""namespace"": ""Microsoft.ServiceBus.Messaging"",
""fields"": [
	{
		""name"": ""SequenceNumber"",
		""type"": ""long""
	},
	{
		""name"": ""Offset"",
		""type"": ""string""
	},
	{
		""name"": ""EnqueuedTimeUtc"",
		""type"": ""string""
	},
	{
		""name"": ""SystemProperties"",
		""type"": {
			""type"": ""map"",
			""values"": [
				""long"",
				""double"",
				""string"",
				""bytes""
			]
		}
	},
	{
		""name"": ""**Properties**"",
		""type"": {
			""type"": ""map"",
			""values"": [
				""long"",
				""double"",
				""string"",
				""bytes"",
				""null""
			]
		}
	},
	{
		""name"": ""Body"",
		""type"": [
			""null"",
			""bytes""
		]
	}
]

}
");

@NoraBo
Copy link
Author

NoraBo commented Sep 18, 2018

Could you please let me know if you have any update on the above request?

@flmader
Copy link

flmader commented Jan 2, 2019

Please take a look at #147. This PR should solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants