フィルターのクリア

read Avro file format from matlab issue

5 ビュー (過去 30 日間)
younes
younes 2024 年 4 月 17 日
回答済み: Karanjot 2024 年 5 月 7 日
Hello,
i want to read avro file by using this script:
myReader = matlabavro.DataFileReader('myFile.avro'); %line 1
myReaderData = myReader.next(); %line 2
but matlab show me error related to this part of the scripte Schema.m
catch ME
newException = MException(...
'matlabavro:Schema:getTypes', ...
"Unable to create matlabavro scheme objects for Avro Union types.");
newException = newException.addCause(ME);
throw(newException)
end
can you help me guys
thanks
  1 件のコメント
Kautuk Raj
Kautuk Raj 2024 年 4 月 22 日
You can share the file myFile.avro for better understanding and reproduction of the issue.

サインインしてコメントする。

回答 (1 件)

Karanjot
Karanjot 2024 年 5 月 7 日
Hi younes,
The error you're encountering when trying to read an Avro file in MATLAB suggests that there's an issue with handling Avro Union types in your Avro schema. The MATLAB Avro API is throwing an exception because it's unable to create schema objects for the Union types defined in your Avro file's schema.
I recommend the following:
  1. Check Avro Schema: Ensure that the Avro file's schema, especially Union types, is correctly defined and compatible with MATLAB's Avro API capabilities.
  2. Ensure that you are using the latest version of the MATLAB Interface for Apache Avro.
  3. Simplify Schema: If possible, simplify the Avro schema by modifying or reducing the complexity of Union types.

カテゴリ

Help Center および File ExchangeProgramming Utilities についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by