PCAxis.Serializers 1.4.1
PCAxis.Serializers
This 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.
Supported Formats
- Csv
- DecimalJson
- Excel
- Html5Table
- Json
- Xml
- Json-stat v1 & v2 (https://json-stat.org/format/)
- Parquet (https://parquet.apache.org)
- SDMX (https://sdmx.org/)
- Xslx (https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/f780b2d6-8252-4074-9fe3-5d7bc4830968)
Getting Started
Prerequisites
- .NET Core 3.1 or later.
Installation
dotnet add package PCAxis.Serializers
Example Usage
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);
}
}
}
}
Contributing
We welcome contributions to this project. Please see CONTRIBUTING.md for details.
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Support and Feedback
For support, feature requests, and bug reporting, please open an issue on the GitHub project page.
See Also
- PxWeb Project Website
- PxWeb on GitHub
- For the C# Serializers, see PxWeb issue #163.
No packages depend on PCAxis.Serializers.
.NET Standard 2.0
- ClosedXML (>= 0.97.0)
- Newtonsoft.Json (>= 13.0.3)
- PCAxis.Core (>= 1.2.5)
- PCAxis.Metadata (>= 1.0.3)
- PCAxis.Query (>= 1.0.9)
- Parquet.Net (>= 4.25.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- log4net (>= 3.0.3)
| Version | Downloads | Last updated |
|---|---|---|
| 1.9.3 | 0 | 2025-08-29 |
| 1.9.2 | 0 | 2025-08-27 |
| 1.9.1 | 0 | 2025-08-11 |
| 1.9.0 | 0 | 2025-06-02 |
| 1.8.0-rc.1 | 0 | 2025-03-21 |
| 1.7.0 | 0 | 2025-03-17 |
| 1.7.0-rc.2 | 0 | 2025-03-17 |
| 1.7.0-rc.1 | 0 | 2025-03-17 |
| 1.6.0 | 0 | 2025-02-27 |
| 1.6.0-rc.1 | 0 | 2025-02-27 |
| 1.5.0 | 0 | 2025-02-04 |
| 1.5.0-rc.2 | 0 | 2025-02-04 |
| 1.5.0-rc.1 | 0 | 2025-01-30 |
| 1.4.1 | 2 | 2025-03-24 |
| 1.4.0 | 0 | 2025-01-13 |
| 1.3.1 | 0 | 2024-06-14 |
| 1.3.0 | 0 | 2024-05-08 |
| 1.2.4 | 0 | 2024-05-07 |
| 1.2.3 | 0 | 2023-12-05 |
| 1.2.2 | 0 | 2023-11-03 |
| 1.2.2-rc | 0 | 2023-10-27 |
| 1.2.1-rc | 0 | 2023-10-27 |
| 1.2.0-rc | 0 | 2023-09-28 |
| 1.1.2 | 0 | 2023-06-14 |
| 1.1.1 | 0 | 2023-04-17 |
| 1.1.0 | 0 | 2023-01-13 |
| 1.0.10-rc | 0 | 2022-12-21 |
| 1.0.9-rc | 0 | 2022-12-20 |
| 1.0.8-rc | 0 | 2022-12-19 |
| 1.0.7-rc | 0 | 2022-12-12 |
| 1.0.6-rc | 0 | 2022-11-21 |
| 1.0.5-rc | 0 | 2022-11-18 |
| 1.0.4 | 0 | 2022-10-12 |
| 1.0.3 | 0 | 2022-09-23 |
| 1.0.2 | 0 | 2022-09-06 |
| 1.0.1 | 0 | 2022-08-27 |
| 1.0.0 | 0 | 2022-08-22 |
| 1.0.0-beta | 0 | 2022-08-19 |