Norbert Orzechowicz

Norbert Orzechowicz

@norbert-tech.bsky.social

Problem solver, software architect, also working as a Data Witcher 鈿旓笍, hunting and killing 馃 and 馃in data processing pipelines! Creator of https://flow-php.com

17 followers11 following263 posts

Pinned

Want to learn how I automated the setup of a local development environment for Flow #PHP with the following dependencies: - PHP 8.2/8.3/8.4 - blackfire/xdebug/pcov/zstd/brotli/snappy/lz4 - PostgreSQL - MySQL - Redis - Elasticsearch - Meilisearch - Azureite - Localstack Read 馃У

So many business owners (but also others who have never written a line of code) like to tell software developers how easy, fast, and maybe even redundant their job is getting with AI. So few developers tell the same to them. It looks like a projection, not prophecy 馃

I see two niches in the PHP ecosystem. One of them is data processing, and the second is observability. OpenTelemetry is an amazing concept, but the PHP implementation is not really aligned with how PHP and PHP apps work. Below comes from flow-php/telemetry and #Symfony Bundle

View full thread

Flow on the other hand provides native telemetry integration through: - data frame And I'm also working on adding it into: - flow-php/filesystem (azure / aws bridges) - flow-php/parquet - flow-php/postgresql

I see two niches in the PHP ecosystem. One of them is data processing, and the second is observability. OpenTelemetry is an amazing concept, but the PHP implementation is not really aligned with how PHP and PHP apps work. Below comes from flow-php/telemetry and #Symfony Bundle

View full thread

Now I'm working on flow-php/symfony-telemetry-bundle that will connect all dots together, registering in service container a Telemetry instance that if passed to flow libraries will provide telemetry from all those libraries out of the box.

I see two niches in the PHP ecosystem. One of them is data processing, and the second is observability. OpenTelemetry is an amazing concept, but the PHP implementation is not really aligned with how PHP and PHP apps work. Below comes from flow-php/telemetry and #Symfony Bundle

View full thread

flow-php/telemetry - contracts, telemetry abstraction. Why not OTEL? Mostly due to a lot of magic, AOP approach and implicit behaviors. OTEL seems to be ported from Java where AOP, not really aligned with how systems are designed in php.

Flow Telemetry doesn't rely on global state, there are no singletons. Yet it follows OTEL specification. flow-php/telemetry-otlp-bridge helps with serialization telemetry objects to open telemetry protocol.

Recently I have been working on a php telemetry library that is fully compatible with open telemetry protocol and does not use global state/singletons. I'm almost done with first draft, but of course I had to step into another rabbit hole... Async http client.

Its a second time where I could really use an async client contract. First time was when I was building azure blob SDK for Flow Filesystem library. I have to decide now, I could use an existing contract github.com/php-http/ht... or create my own 馃

github.comGitHub - php-http/httplug: HTTPlug, the HTTP client abstraction for PHPHTTPlug, the HTTP client abstraction for PHP. Contribute to php-http/httplug development by creating an account on GitHub.

There is something tempting about owning all those contracts and having control over everything, but on the other hand, it adds work - not much, as this would be 2 interfaces and 3 implementations (Symfony/Guzzle/curl) but still. What would you do? 馃

Need to extract filtered data from PostgreSQL with pagination? Pass your WHERE parameters directly and Flow handles pagination correctly. The extractor auto-detects your parameter positions. If you use $1, $2 for filters, pagination params start at $3. #PHP #PostgreSQL #ETL

Flow #PHP now supports onComplete callbacks for Symfony streamed responses. After streaming finishes, you get a Report with row counts, execution time, and memory stats. #PHP #DataEngineering #Symfony

Flow #PHP 0.30.0 is out! github.com/flow-php/fl... flow-php/postgresql - is a dedicated Flow PHP Client for #PostgreSQL focused on parsing/query building. It's focused and optimized for PostgreSQL, powerful DSL makes building even the most complex queries programmatically.

github.comRelease 0.30.0 路 flow-php/flow[0.30.0] - 2026-01-06 Added #2130 - Allow preserving existing values during DBAL upsert - @stloyd #2129 - Schema::isSame to use it for early exit merge operation when schema is the same - @norbert...
View full thread

Flow #PHP 0.30.0 is out! github.com/flow-php/fl... flow-php/postgresql - is a dedicated Flow PHP Client for #PostgreSQL focused on parsing/query building. It's focused and optimized for PostgreSQL, powerful DSL makes building even the most complex queries programmatically.

github.comRelease 0.30.0 路 flow-php/flow[0.30.0] - 2026-01-06 Added #2130 - Allow preserving existing values during DBAL upsert - @stloyd #2129 - Schema::isSame to use it for early exit merge operation when schema is the same - @norbert...

flow-php/pg-query - a php extension based on libpg providing parser / ast / deparser - thanks to it, flow-php/postgresql can parse and existing query string and turn it into query builder or perform advanced manipulations / static analysis!

Building SQL queries with optional filters is messy. If-statements everywhere. String concatenation. Easy to mess up. Flow PHP now has a fluent condition builder for PostgreSQL queries. Build WHERE clauses incrementally. Add conditions when they exist, skip when they don't.

From time to time I'm getting a feedback that Flow #PHP DSL is "ugly". I disagree! it's just different than what most devs are used to. Flow DSL is based on underscore, lower case functions that under the hood are creating objects. Yes, Flow is object oriented!

The reason for using functions like df() instead of new DataFrame is readability. ETL pipelines are often complex chains of transformations. Those code samples are identical, one creates objects through factories hidden behind simple functions, other is using constructors

Neither of them is good or bad, is a matter of preference, I come from Apache Spark, I do prefer DSL over constructors, because I believe that in a bigger picture DSL improves code readability. Which one and why do you prefer?

Data processing in #PHP is still in it's early stages. Don't believe me? Look at your system and tell me how it's handling imports/exports. Is it perhaps hand written importer/exporter? Any chance it's using file_get_contents? What stops you from using a Data Frame?

#1 Did you ever had to make a tradeoffs between using a query builder and using a database specific features like CTE in #postgresql? Not any more flow-php/postresql is a brand new library that just joined Flow #PHP Ecosystem! flow-php/postgresql comes with 3 building blocks 馃憞

View full thread

#1 Did you ever had to make a tradeoffs between using a query builder and using a database specific features like CTE in #postgresql? Not any more flow-php/postresql is a brand new library that just joined Flow #PHP Ecosystem! flow-php/postgresql comes with 3 building blocks 馃憞

View full thread

#6 And this is only a beginning! What's comming next is going to make extracting data from postgresql a piece of cake. We are working on dedicated Flow PostgreSQL extract that would let you process PostgreSQL data based on any custom query string!

#1 Did you ever had to make a tradeoffs between using a query builder and using a database specific features like CTE in #postgresql? Not any more flow-php/postresql is a brand new library that just joined Flow #PHP Ecosystem! flow-php/postgresql comes with 3 building blocks 馃憞

View full thread

#4 Last but not least, PostgreSql Client interface! with built in support for Row Mappers 馃く It comes with a simple Constructor Mapper available out of the box but we are already working on providing bridges for: - cuyz/valinor - crell/serde

#1 Did you ever had to make a tradeoffs between using a query builder and using a database specific features like CTE in #postgresql? Not any more flow-php/postresql is a brand new library that just joined Flow #PHP Ecosystem! flow-php/postgresql comes with 3 building blocks 馃憞

#2 Parser Thanks to awesome github.com/pganalyze/l... our parser can break any valid postgresql query string into AST. It works with a single or multiple queries statements. Super helpful for adjusting programmatically any query (for example for pagination or validation)

github.comGitHub - pganalyze/libpg_query: C library for accessing the PostgreSQL parser outside of the server environmentC library for accessing the PostgreSQL parser outside of the server environment - pganalyze/libpg_query

I'm pushing release of next Flow PHP version by a week (maybe 2). There are two things I would like to include in the next release: - support for PHP 8.5 (and migrating codebase to 8.3) - first release of flow-php/postgresql library

flow-php/postgresql library is an evolution of flow-php/pg-query that started as a simple parsers and already evolved into whole postgresql library that comes with query builders for pretty much anything available in postgresql syntax until version 17 馃く

flow-php/pg-query quickly escalated from "I just want to parse sql to AST" into "why not build a proper query builder?" 馃槄 So there is, #PHP Query Builder for #PostgreSQL inspired by JOOQ (API will change, this is just PoC)