Skip to content

Releases: powabase/supabase-fdw-ntp

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 29 Oct 12:23

NTP Energy Market WASM FDW v0.3.1

Binary: 328 KB | SHA256: 5dbad078536e0e202dc10a750790cbefde12b4a81b86fb07b6c61e4386ba1d1b

Tables

4 production-ready foreign tables for German energy market data:

  1. renewable_energy_timeseries - Solar and wind generation (9 endpoints, 10 columns)
  2. electricity_market_prices - Spot market, premiums, negative price indicators (4 endpoints, 5 columns)
  3. redispatch_events - Grid intervention events (1 endpoint, 9 columns)
  4. grid_status_timeseries - Minute-by-minute grid stability monitoring (1 endpoint, 3 columns)

Total: 15 API endpoints consolidated into 4 queryable tables


Quick Start

-- Create foreign server with OAuth2 credentials
CREATE SERVER ntp_server
  FOREIGN DATA WRAPPER wasm_wrapper
  OPTIONS (
    fdw_package_url 'https://github.com/powabase/supabase-fdw-ntp/releases/download/v0.3.1/supabase_fdw_ntp.wasm',
    fdw_package_name 'powabase:supabase-fdw-ntp',
    fdw_package_version 'v0.3.1',
    fdw_package_checksum '5dbad078536e0e202dc10a750790cbefde12b4a81b86fb07b6c61e4386ba1d1b',
    api_base_url 'https://ds.netztransparenz.de',
    oauth2_token_url 'https://identity.netztransparenz.de/users/connect/token',
    oauth2_client_id 'YOUR_CLIENT_ID',
    oauth2_client_secret 'YOUR_CLIENT_SECRET',
    oauth2_scope 'ntpStatistic.read_all_public'
  );

-- Create schema
CREATE SCHEMA ntp;

-- Example: Renewable Energy table
CREATE FOREIGN TABLE ntp.renewable_energy_timeseries (
  timestamp_utc TIMESTAMPTZ NOT NULL,
  product_type TEXT NOT NULL,
  data_category TEXT NOT NULL,
  interval_minutes SMALLINT,
  tso_50hertz_mw DOUBLE PRECISION,
  tso_amprion_mw DOUBLE PRECISION,
  tso_tennet_mw DOUBLE PRECISION,
  tso_transnetbw_mw DOUBLE PRECISION,
  total_germany_mw DOUBLE PRECISION GENERATED ALWAYS AS (
    COALESCE(tso_50hertz_mw, 0) + COALESCE(tso_amprion_mw, 0) +
    COALESCE(tso_tennet_mw, 0) + COALESCE(tso_transnetbw_mw, 0)
  ) STORED,
  has_missing_data BOOLEAN GENERATED ALWAYS AS (
    tso_50hertz_mw IS NULL OR tso_amprion_mw IS NULL OR
    tso_tennet_mw IS NULL OR tso_transnetbw_mw IS NULL
  ) STORED
)
SERVER ntp_server
OPTIONS (
  object 'renewable_energy_timeseries',
  product_type 'solar',
  data_category 'forecast'
);

-- Query example: Solar forecast for today
SELECT
  timestamp_utc,
  total_germany_mw,
  tso_50hertz_mw,
  tso_amprion_mw
FROM ntp.renewable_energy_timeseries
WHERE product_type = 'solar'
  AND data_category = 'forecast'
  AND timestamp_utc >= CURRENT_DATE
ORDER BY timestamp_utc
LIMIT 24;

📖 Full Setup: See QUICKSTART.md for complete installation instructions and all 4 table schemas.


Features

  • 15 API Endpoints consolidated into 4 tables
  • OAuth2 Authentication with token caching (1-hour lifetime)
  • German Locale Support (CSV parsing, DD.MM.YYYY dates, comma decimals)
  • Query Routing - WHERE clause filters determine API endpoint selection
  • 11 ETL Transformations for data normalization
  • JOIN Support - Full PostgreSQL JOIN capabilities validated
  • Security Hardened - 6 critical fixes (bounds checking, safe conversions, explicit errors)
  • 119 Unit Tests - Comprehensive test coverage

Documentation


Built with: Rust 1.70+, cargo-component 0.21.1, wasm32-unknown-unknown | Validated: Zero WASI CLI imports ✅

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 19:38

NTP Energy Market WASM FDW v0.3.0

Binary: 326 KB | SHA256: f4e5315cbb087ffa021865a093d1dac378fe10b0064901cbf04bd67958367ee9

Tables

4 production-ready foreign tables for German energy market data:

  1. renewable_energy_timeseries - Solar and wind generation (9 endpoints, 10 columns)
  2. electricity_market_prices - Spot market, premiums, negative price indicators (4 endpoints, 5 columns)
  3. redispatch_events - Grid intervention events (1 endpoint, 9 columns)
  4. grid_status_timeseries - Minute-by-minute grid stability monitoring (1 endpoint, 3 columns)

Total: 15 API endpoints consolidated into 4 queryable tables


Quick Start

-- Create foreign server with OAuth2 credentials
CREATE SERVER ntp_server
  FOREIGN DATA WRAPPER wasm_wrapper
  OPTIONS (
    fdw_package_url 'https://github.com/powabase/supabase-fdw-ntp/releases/download/v0.3.0/supabase_fdw_ntp.wasm',
    fdw_package_name 'powabase:supabase-fdw-ntp',
    fdw_package_version 'v0.3.0',
    fdw_package_checksum 'f4e5315cbb087ffa021865a093d1dac378fe10b0064901cbf04bd67958367ee9',
    api_base_url 'https://ds.netztransparenz.de',
    oauth2_token_url 'https://identity.netztransparenz.de/users/connect/token',
    oauth2_client_id 'YOUR_CLIENT_ID',
    oauth2_client_secret 'YOUR_CLIENT_SECRET',
    oauth2_scope 'ntpStatistic.read_all_public'
  );

-- Create schema
CREATE SCHEMA ntp;

-- Example: Renewable Energy table
CREATE FOREIGN TABLE ntp.renewable_energy_timeseries (
  timestamp_utc TIMESTAMPTZ NOT NULL,
  product_type TEXT NOT NULL,
  data_category TEXT NOT NULL,
  interval_minutes SMALLINT,
  tso_50hertz_mw DOUBLE PRECISION,
  tso_amprion_mw DOUBLE PRECISION,
  tso_tennet_mw DOUBLE PRECISION,
  tso_transnetbw_mw DOUBLE PRECISION,
  total_germany_mw DOUBLE PRECISION GENERATED ALWAYS AS (
    COALESCE(tso_50hertz_mw, 0) + COALESCE(tso_amprion_mw, 0) +
    COALESCE(tso_tennet_mw, 0) + COALESCE(tso_transnetbw_mw, 0)
  ) STORED,
  has_missing_data BOOLEAN GENERATED ALWAYS AS (
    tso_50hertz_mw IS NULL OR tso_amprion_mw IS NULL OR
    tso_tennet_mw IS NULL OR tso_transnetbw_mw IS NULL
  ) STORED
)
SERVER ntp_server
OPTIONS (
  object 'renewable_energy_timeseries',
  product_type 'solar',
  data_category 'forecast'
);

-- Query example: Solar forecast for today
SELECT
  timestamp_utc,
  total_germany_mw,
  tso_50hertz_mw,
  tso_amprion_mw
FROM ntp.renewable_energy_timeseries
WHERE product_type = 'solar'
  AND data_category = 'forecast'
  AND timestamp_utc >= CURRENT_DATE
ORDER BY timestamp_utc
LIMIT 24;

📖 Full Setup: See QUICKSTART.md for complete installation instructions and all 4 table schemas.


Features

  • 15 API Endpoints consolidated into 4 tables
  • OAuth2 Authentication with token caching (1-hour lifetime)
  • German Locale Support (CSV parsing, DD.MM.YYYY dates, comma decimals)
  • Query Routing - WHERE clause filters determine API endpoint selection
  • 11 ETL Transformations for data normalization
  • JOIN Support - Full PostgreSQL JOIN capabilities validated
  • Security Hardened - 6 critical fixes (bounds checking, safe conversions, explicit errors)
  • 119 Unit Tests - Comprehensive test coverage

Documentation


Built with: Rust 1.70+, cargo-component 0.21.1, wasm32-unknown-unknown | Validated: Zero WASI CLI imports ✅

Full Changelog: v0.2.4...v0.3.0

v0.2.4

Choose a tag to compare

@github-actions github-actions released this 26 Oct 11:19

NTP Energy Market WASM FDW v0.2.4

Binary: 306 KB | SHA256: 283b0e04c4a1201850287955bd14213ef3c61c1b49c893eeaf27ab4097d58bc0

Tables

4 production-ready foreign tables for German energy market data:

  1. renewable_energy_timeseries - Solar and wind generation (9 endpoints, 10 columns)
  2. electricity_market_prices - Spot market, premiums, negative price indicators (4 endpoints, 5 columns)
  3. redispatch_events - Grid intervention events (1 endpoint, 9 columns)
  4. grid_status_timeseries - Minute-by-minute grid stability monitoring (1 endpoint, 3 columns)

Total: 15 API endpoints consolidated into 4 queryable tables


Quick Start

-- Create foreign server with OAuth2 credentials
CREATE SERVER ntp_server
  FOREIGN DATA WRAPPER wasm_wrapper
  OPTIONS (
    fdw_package_url 'https://github.com/powabase/supabase-fdw-ntp/releases/download/v0.2.4/supabase_fdw_ntp.wasm',
    fdw_package_name 'powabase:supabase-fdw-ntp',
    fdw_package_version 'v0.2.4',
    fdw_package_checksum '283b0e04c4a1201850287955bd14213ef3c61c1b49c893eeaf27ab4097d58bc0',
    api_base_url 'https://ds.netztransparenz.de',
    oauth2_token_url 'https://identity.netztransparenz.de/users/connect/token',
    oauth2_client_id 'YOUR_CLIENT_ID',
    oauth2_client_secret 'YOUR_CLIENT_SECRET',
    oauth2_scope 'ntpStatistic.read_all_public'
  );

-- Create schema
CREATE SCHEMA ntp;

-- Example: Renewable Energy table
CREATE FOREIGN TABLE ntp.renewable_energy_timeseries (
  timestamp_utc TIMESTAMPTZ NOT NULL,
  product_type TEXT NOT NULL,
  data_category TEXT NOT NULL,
  interval_minutes SMALLINT,
  tso_50hertz_mw DOUBLE PRECISION,
  tso_amprion_mw DOUBLE PRECISION,
  tso_tennet_mw DOUBLE PRECISION,
  tso_transnetbw_mw DOUBLE PRECISION,
  total_germany_mw DOUBLE PRECISION GENERATED ALWAYS AS (
    COALESCE(tso_50hertz_mw, 0) + COALESCE(tso_amprion_mw, 0) +
    COALESCE(tso_tennet_mw, 0) + COALESCE(tso_transnetbw_mw, 0)
  ) STORED,
  has_missing_data BOOLEAN GENERATED ALWAYS AS (
    tso_50hertz_mw IS NULL OR tso_amprion_mw IS NULL OR
    tso_tennet_mw IS NULL OR tso_transnetbw_mw IS NULL
  ) STORED
)
SERVER ntp_server
OPTIONS (
  object 'renewable_energy_timeseries',
  product_type 'solar',
  data_category 'forecast'
);

-- Query example: Solar forecast for today
SELECT
  timestamp_utc,
  total_germany_mw,
  tso_50hertz_mw,
  tso_amprion_mw
FROM ntp.renewable_energy_timeseries
WHERE product_type = 'solar'
  AND data_category = 'forecast'
  AND timestamp_utc >= CURRENT_DATE
ORDER BY timestamp_utc
LIMIT 24;

📖 Full Setup: See QUICKSTART.md for complete installation instructions and all 4 table schemas.


Features

  • 15 API Endpoints consolidated into 4 tables
  • OAuth2 Authentication with token caching (1-hour lifetime)
  • German Locale Support (CSV parsing, DD.MM.YYYY dates, comma decimals)
  • Query Routing - WHERE clause filters determine API endpoint selection
  • 11 ETL Transformations for data normalization
  • JOIN Support - Full PostgreSQL JOIN capabilities validated
  • Security Hardened - 6 critical fixes (bounds checking, safe conversions, explicit errors)
  • 119 Unit Tests - Comprehensive test coverage

Documentation


Built with: Rust 1.70+, cargo-component 0.21.1, wasm32-unknown-unknown | Validated: Zero WASI CLI imports ✅

Full Changelog: v0.2.3...v0.2.4

v0.2.3

Choose a tag to compare

@github-actions github-actions released this 26 Oct 10:54

NTP Energy Market WASM FDW v0.2.3

Binary: 306 KB | SHA256: 53ad310590cd2658c386e8fdc9d235fab6cda19e74d6a46bf35ec3fc0407cfcf

Tables

4 production-ready foreign tables for German energy market data:

  1. renewable_energy_timeseries - Solar and wind generation (9 endpoints, 10 columns)
  2. electricity_market_prices - Spot market, premiums, negative price indicators (4 endpoints, 5 columns)
  3. redispatch_events - Grid intervention events (1 endpoint, 9 columns)
  4. grid_status_timeseries - Minute-by-minute grid stability monitoring (1 endpoint, 3 columns)

Total: 15 API endpoints consolidated into 4 queryable tables


Quick Start

-- Create foreign server with OAuth2 credentials
CREATE SERVER ntp_server
  FOREIGN DATA WRAPPER wasm_wrapper
  OPTIONS (
    fdw_package_url 'https://github.com/powabase/supabase-fdw-ntp/releases/download/v0.2.3/supabase_fdw_ntp.wasm',
    fdw_package_name 'powabase:supabase-fdw-ntp',
    fdw_package_version 'v0.2.3',
    fdw_package_checksum '53ad310590cd2658c386e8fdc9d235fab6cda19e74d6a46bf35ec3fc0407cfcf',
    api_base_url 'https://ds.netztransparenz.de',
    oauth2_token_url 'https://identity.netztransparenz.de/users/connect/token',
    oauth2_client_id 'YOUR_CLIENT_ID',
    oauth2_client_secret 'YOUR_CLIENT_SECRET',
    oauth2_scope 'ntpStatistic.read_all_public'
  );

-- Create schema
CREATE SCHEMA ntp;

-- Example: Renewable Energy table
CREATE FOREIGN TABLE ntp.renewable_energy_timeseries (
  timestamp_utc TIMESTAMPTZ NOT NULL,
  product_type TEXT NOT NULL,
  data_category TEXT NOT NULL,
  interval_minutes SMALLINT,
  tso_50hertz_mw DOUBLE PRECISION,
  tso_amprion_mw DOUBLE PRECISION,
  tso_tennet_mw DOUBLE PRECISION,
  tso_transnetbw_mw DOUBLE PRECISION,
  total_germany_mw DOUBLE PRECISION GENERATED ALWAYS AS (
    COALESCE(tso_50hertz_mw, 0) + COALESCE(tso_amprion_mw, 0) +
    COALESCE(tso_tennet_mw, 0) + COALESCE(tso_transnetbw_mw, 0)
  ) STORED,
  has_missing_data BOOLEAN GENERATED ALWAYS AS (
    tso_50hertz_mw IS NULL OR tso_amprion_mw IS NULL OR
    tso_tennet_mw IS NULL OR tso_transnetbw_mw IS NULL
  ) STORED
)
SERVER ntp_server
OPTIONS (
  object 'renewable_energy_timeseries',
  product_type 'solar',
  data_category 'forecast'
);

-- Query example: Solar forecast for today
SELECT
  timestamp_utc,
  total_germany_mw,
  tso_50hertz_mw,
  tso_amprion_mw
FROM ntp.renewable_energy_timeseries
WHERE product_type = 'solar'
  AND data_category = 'forecast'
  AND timestamp_utc >= CURRENT_DATE
ORDER BY timestamp_utc
LIMIT 24;

📖 Full Setup: See QUICKSTART.md for complete installation instructions and all 4 table schemas.


Features

  • 15 API Endpoints consolidated into 4 tables
  • OAuth2 Authentication with token caching (1-hour lifetime)
  • German Locale Support (CSV parsing, DD.MM.YYYY dates, comma decimals)
  • Query Routing - WHERE clause filters determine API endpoint selection
  • 11 ETL Transformations for data normalization
  • JOIN Support - Full PostgreSQL JOIN capabilities validated
  • Security Hardened - 6 critical fixes (bounds checking, safe conversions, explicit errors)
  • 119 Unit Tests - Comprehensive test coverage

Documentation


Built with: Rust 1.70+, cargo-component 0.21.1, wasm32-unknown-unknown | Validated: Zero WASI CLI imports ✅

Full Changelog: v0.2.2...v0.2.3

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 26 Oct 09:44

NTP Energy Market WASM FDW v0.2.2

Binary: 306 KB | SHA256: 5fdabfbbc08c37def58a8073c11f615f6f8d2580375137c03eaa0b433cfdf72e

Tables

4 production-ready foreign tables for German energy market data:

  1. renewable_energy_timeseries - Solar and wind generation (9 endpoints, 10 columns)
  2. electricity_market_prices - Spot market, premiums, negative price indicators (4 endpoints, 5 columns)
  3. redispatch_events - Grid intervention events (1 endpoint, 9 columns)
  4. grid_status_timeseries - Minute-by-minute grid stability monitoring (1 endpoint, 3 columns)

Total: 15 API endpoints consolidated into 4 queryable tables


Quick Start

-- Create foreign server with OAuth2 credentials
CREATE SERVER ntp_server
  FOREIGN DATA WRAPPER wasm_wrapper
  OPTIONS (
    fdw_package_url 'https://github.com/powabase/supabase-fdw-ntp/releases/download/v0.2.2/supabase_fdw_ntp.wasm',
    fdw_package_name 'powabase:supabase-fdw-ntp',
    fdw_package_version 'v0.2.2',
    fdw_package_checksum '5fdabfbbc08c37def58a8073c11f615f6f8d2580375137c03eaa0b433cfdf72e',
    api_base_url 'https://ds.netztransparenz.de',
    oauth2_token_url 'https://identity.netztransparenz.de/users/connect/token',
    oauth2_client_id 'YOUR_CLIENT_ID',
    oauth2_client_secret 'YOUR_CLIENT_SECRET',
    oauth2_scope 'ntpStatistic.read_all_public'
  );

-- Create schema
CREATE SCHEMA ntp;

-- Example: Renewable Energy table
CREATE FOREIGN TABLE ntp.renewable_energy_timeseries (
  timestamp_utc TIMESTAMPTZ NOT NULL,
  product_type TEXT NOT NULL,
  data_category TEXT NOT NULL,
  interval_minutes SMALLINT,
  tso_50hertz_mw DOUBLE PRECISION,
  tso_amprion_mw DOUBLE PRECISION,
  tso_tennet_mw DOUBLE PRECISION,
  tso_transnetbw_mw DOUBLE PRECISION,
  total_germany_mw DOUBLE PRECISION GENERATED ALWAYS AS (
    COALESCE(tso_50hertz_mw, 0) + COALESCE(tso_amprion_mw, 0) +
    COALESCE(tso_tennet_mw, 0) + COALESCE(tso_transnetbw_mw, 0)
  ) STORED,
  has_missing_data BOOLEAN GENERATED ALWAYS AS (
    tso_50hertz_mw IS NULL OR tso_amprion_mw IS NULL OR
    tso_tennet_mw IS NULL OR tso_transnetbw_mw IS NULL
  ) STORED
)
SERVER ntp_server
OPTIONS (
  object 'renewable_energy_timeseries',
  product_type 'solar',
  data_category 'forecast'
);

-- Query example: Solar forecast for today
SELECT
  timestamp_utc,
  total_germany_mw,
  tso_50hertz_mw,
  tso_amprion_mw
FROM ntp.renewable_energy_timeseries
WHERE product_type = 'solar'
  AND data_category = 'forecast'
  AND timestamp_utc >= CURRENT_DATE
ORDER BY timestamp_utc
LIMIT 24;

📖 Full Setup: See QUICKSTART.md for complete installation instructions and all 4 table schemas.


Features

  • 15 API Endpoints consolidated into 4 tables
  • OAuth2 Authentication with token caching (1-hour lifetime)
  • German Locale Support (CSV parsing, DD.MM.YYYY dates, comma decimals)
  • Query Routing - WHERE clause filters determine API endpoint selection
  • 11 ETL Transformations for data normalization
  • JOIN Support - Full PostgreSQL JOIN capabilities validated
  • Security Hardened - 6 critical fixes (bounds checking, safe conversions, explicit errors)
  • 119 Unit Tests - Comprehensive test coverage

Documentation


Built with: Rust 1.70+, cargo-component 0.21.1, wasm32-unknown-unknown | Validated: Zero WASI CLI imports ✅

Full Changelog: v0.2.1...v0.2.2

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 26 Oct 09:12

NTP Energy Market WASM FDW v0.2.1

Binary: 304 KB | SHA256: b9bc0fff69f049e32993c6a47b848409a6dce432e4e62d65f09772e798cd8c2d

Tables

4 production-ready foreign tables for German energy market data:

  1. renewable_energy_timeseries - Solar and wind generation (9 endpoints, 10 columns)
  2. electricity_market_prices - Spot market, premiums, negative price indicators (4 endpoints, 5 columns)
  3. redispatch_events - Grid intervention events (1 endpoint, 9 columns)
  4. grid_status_timeseries - Minute-by-minute grid stability monitoring (1 endpoint, 3 columns)

Total: 15 API endpoints consolidated into 4 queryable tables


Quick Start

-- Create foreign server with OAuth2 credentials
CREATE SERVER ntp_server
  FOREIGN DATA WRAPPER wasm_wrapper
  OPTIONS (
    fdw_package_url 'https://github.com/powabase/supabase-fdw-ntp/releases/download/v0.2.1/supabase_fdw_ntp.wasm',
    fdw_package_name 'powabase:supabase-fdw-ntp',
    fdw_package_version 'v0.2.1',
    fdw_package_checksum 'b9bc0fff69f049e32993c6a47b848409a6dce432e4e62d65f09772e798cd8c2d',
    api_base_url 'https://ds.netztransparenz.de',
    oauth2_token_url 'https://identity.netztransparenz.de/users/connect/token',
    oauth2_client_id 'YOUR_CLIENT_ID',
    oauth2_client_secret 'YOUR_CLIENT_SECRET',
    oauth2_scope 'ntpStatistic.read_all_public'
  );

-- Create schema
CREATE SCHEMA ntp;

-- Example: Renewable Energy table
CREATE FOREIGN TABLE ntp.renewable_energy_timeseries (
  timestamp_utc TIMESTAMPTZ NOT NULL,
  product_type TEXT NOT NULL,
  data_category TEXT NOT NULL,
  interval_minutes SMALLINT,
  tso_50hertz_mw DOUBLE PRECISION,
  tso_amprion_mw DOUBLE PRECISION,
  tso_tennet_mw DOUBLE PRECISION,
  tso_transnetbw_mw DOUBLE PRECISION,
  total_germany_mw DOUBLE PRECISION GENERATED ALWAYS AS (
    COALESCE(tso_50hertz_mw, 0) + COALESCE(tso_amprion_mw, 0) +
    COALESCE(tso_tennet_mw, 0) + COALESCE(tso_transnetbw_mw, 0)
  ) STORED,
  has_missing_data BOOLEAN GENERATED ALWAYS AS (
    tso_50hertz_mw IS NULL OR tso_amprion_mw IS NULL OR
    tso_tennet_mw IS NULL OR tso_transnetbw_mw IS NULL
  ) STORED
)
SERVER ntp_server
OPTIONS (
  object 'renewable_energy_timeseries',
  product_type 'solar',
  data_category 'forecast'
);

-- Query example: Solar forecast for today
SELECT
  timestamp_utc,
  total_germany_mw,
  tso_50hertz_mw,
  tso_amprion_mw
FROM ntp.renewable_energy_timeseries
WHERE product_type = 'solar'
  AND data_category = 'forecast'
  AND timestamp_utc >= CURRENT_DATE
ORDER BY timestamp_utc
LIMIT 24;

📖 Full Setup: See QUICKSTART.md for complete installation instructions and all 4 table schemas.


Features

  • 15 API Endpoints consolidated into 4 tables
  • OAuth2 Authentication with token caching (1-hour lifetime)
  • German Locale Support (CSV parsing, DD.MM.YYYY dates, comma decimals)
  • Query Routing - WHERE clause filters determine API endpoint selection
  • 11 ETL Transformations for data normalization
  • JOIN Support - Full PostgreSQL JOIN capabilities validated
  • Security Hardened - 6 critical fixes (bounds checking, safe conversions, explicit errors)
  • 119 Unit Tests - Comprehensive test coverage

Documentation


Built with: Rust 1.70+, cargo-component 0.21.1, wasm32-unknown-unknown | Validated: Zero WASI CLI imports ✅

Full Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 22:00

NTP Energy Market WASM FDW v0.2.0

Binary: 300 KB | SHA256: 6240813ec8bc8a18a85d316e380e5b3ccf84db13c49416d21e09dab42647a7f6

Tables

4 production-ready foreign tables for German energy market data:

  1. renewable_energy_timeseries - Solar and wind generation (9 endpoints, 10 columns)
  2. electricity_market_prices - Spot market, premiums, negative price indicators (4 endpoints, 5 columns)
  3. redispatch_events - Grid intervention events (1 endpoint, 9 columns)
  4. grid_status_timeseries - Minute-by-minute grid stability monitoring (1 endpoint, 3 columns)

Total: 15 API endpoints consolidated into 4 queryable tables


Quick Start

-- Create foreign server with OAuth2 credentials
CREATE SERVER ntp_server
  FOREIGN DATA WRAPPER wasm_wrapper
  OPTIONS (
    fdw_package_url 'https://github.com/powabase/supabase-fdw-ntp/releases/download/v0.2.0/supabase_fdw_ntp.wasm',
    fdw_package_name 'powabase:supabase-fdw-ntp',
    fdw_package_version 'v0.2.0',
    fdw_package_checksum '6240813ec8bc8a18a85d316e380e5b3ccf84db13c49416d21e09dab42647a7f6',
    api_base_url 'https://ds.netztransparenz.de',
    oauth2_token_url 'https://identity.netztransparenz.de/users/connect/token',
    oauth2_client_id 'YOUR_CLIENT_ID',
    oauth2_client_secret 'YOUR_CLIENT_SECRET',
    oauth2_scope 'ntpStatistic.read_all_public'
  );

-- Create schema
CREATE SCHEMA ntp;

-- Example: Renewable Energy table
CREATE FOREIGN TABLE ntp.renewable_energy_timeseries (
  timestamp_utc TIMESTAMPTZ NOT NULL,
  product_type TEXT NOT NULL,
  data_category TEXT NOT NULL,
  interval_minutes SMALLINT,
  tso_50hertz_mw DOUBLE PRECISION,
  tso_amprion_mw DOUBLE PRECISION,
  tso_tennet_mw DOUBLE PRECISION,
  tso_transnetbw_mw DOUBLE PRECISION,
  total_germany_mw DOUBLE PRECISION GENERATED ALWAYS AS (
    COALESCE(tso_50hertz_mw, 0) + COALESCE(tso_amprion_mw, 0) +
    COALESCE(tso_tennet_mw, 0) + COALESCE(tso_transnetbw_mw, 0)
  ) STORED,
  has_missing_data BOOLEAN GENERATED ALWAYS AS (
    tso_50hertz_mw IS NULL OR tso_amprion_mw IS NULL OR
    tso_tennet_mw IS NULL OR tso_transnetbw_mw IS NULL
  ) STORED
)
SERVER ntp_server
OPTIONS (
  object 'renewable_energy_timeseries',
  product_type 'solar',
  data_category 'forecast'
);

-- Query example: Solar forecast for today
SELECT
  timestamp_utc,
  total_germany_mw,
  tso_50hertz_mw,
  tso_amprion_mw
FROM ntp.renewable_energy_timeseries
WHERE product_type = 'solar'
  AND data_category = 'forecast'
  AND timestamp_utc >= CURRENT_DATE
ORDER BY timestamp_utc
LIMIT 24;

📖 Full Setup: See QUICKSTART.md for complete installation instructions and all 4 table schemas.


Features

  • 15 API Endpoints consolidated into 4 tables
  • OAuth2 Authentication with token caching (1-hour lifetime)
  • German Locale Support (CSV parsing, DD.MM.YYYY dates, comma decimals)
  • Query Routing - WHERE clause filters determine API endpoint selection
  • 11 ETL Transformations for data normalization
  • JOIN Support - Full PostgreSQL JOIN capabilities validated
  • Security Hardened - 6 critical fixes (bounds checking, safe conversions, explicit errors)
  • 119 Unit Tests - Comprehensive test coverage

Documentation


Built with: Rust 1.70+, cargo-component 0.21.1, wasm32-unknown-unknown | Validated: Zero WASI CLI imports ✅

Full Changelog: https://github.com/powabase/supabase-fdw-ntp/commits/v0.2.0