Comments (2)
I was using flow-php/parquet
But I just saw that, there is a saveMode on main repo.
I will check the code bellow
data_frame()
->read(from_parquet(__DIR__ . '/orders_flow.parquet'))
->select('created_at', 'total_price', 'discount')
->withEntry('created_at', ref('created_at')->cast('date')->dateFormat('Y/m'))
->withEntry('revenue', ref('total_price')->minus(ref('discount')))
->select('created_at', 'revenue')
->groupBy('created_at')
->aggregate(sum(ref('revenue')))
->sortBy(ref('created_at')->desc())
->withEntry('daily_revenue', ref('revenue_sum')->round(lit(2))->numberFormat(lit(2)))
->drop('revenue_sum')
->write(to_output(truncate: false))
->withEntry('created_at', ref('created_at')->toDate('Y/m'))
->saveMode(overwrite())
->write(to_parquet(__DIR__ . '/daily_revenue.parquet'))
->run();
in case it didn't work I reopen the issue :)
from flow.
hey @eerison
let me answer your question:
is it possible to edit the file?
No, parquet files are immutable, they can't be directly edited. Instead, if you want to modify the file, you should read it, modify it on the fly, and save it somewhere else.
The saveMode in flow is going to let you overwrite existing file, bot not modify it.
Note: in case it isn't the correct place to open this issue, could you move to the main repo please.
no worries, here is fine, you can also join ourbdiscord server where you can get your answers faster 😊 you can find link on the website header https://flow-php.com
from flow.
Related Issues (20)
- Allowed memory size exhausted HOT 12
- Keep getting unknown scheme "C" HOT 2
- Ramsey UUID dependency fails
- AWS S3 client credentials should be left optional
- lib-parquet: how to convert numeric dates HOT 6
- AWS Redshift parquet file: handle negative numbers HOT 3
- Parquet Encryption
- Filesystem - AWS Adapter HOT 5
- Sorting by column works in opposite way when external sort exceeds allowed memory HOT 4
- Use a generic hashing abstraction across the whole project
- Use a generic unique values generators across the whole project
- Add onEach scalar function HOT 1
- Add `array_to_row` helper function HOT 1
- Make jawira/case-converter mandatory dependency
- External Sort - Cache Implementation - Memory Consumption
- Add `regex` scalar function to extract values from strings
- Automate CSVLoader rows normalization
- Autom JSONLoader rows normalization
- Json Loader - write each row in new line
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flow.