Paxiom serializers for formats like Excel, jsonstat, jsonstat2, sdmx
$ dotnet add package PCAxis.SerializersThis repository contains the serialization components required for serializing PCAxis data represented in PAXIOM from .px-files or CNNM-enabled databases. It enables the conversion from PAXIOM to various formats.
dotnet add package PCAxis.Serializers
using System;
using System.IO;
using PCAxis.Paxiom;
using PCAxis.Serializers;
namespace MyPxConverter
{
class Program
{
static void Main(string[] args)
{
if (args.Length == 0)
{
Console.WriteLine("Please provide the PX filename as an argument.");
return;
}
string pxFileName = args[0];
string baseFileName = Path.GetFileNameWithoutExtension(pxFileName);
string outputFileName = $"{baseFileName}.parquet";
try
{
// Initialize and build the PX file model
var builder = new PXFileBuilder(pxFileName);
var selection = Selection.SelectAll(builder.Model.Meta);
builder.BuildForPresentation(selection);
// Serialize to Parquet
using (var stream = new FileStream(outputFileName, FileMode.Create))
{
var parquetSer = new ParquetSerializer();
parquetSer.Serialize(builder.Model, stream);
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
}
}
We welcome contributions to this project. Please see CONTRIBUTING.md for details.
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
For support, feature requests, and bug reporting, please open an issue on the GitHub project page.