Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add use_blob() to write() function to increase performance #881

Closed
wants to merge 10 commits into from

Conversation

ffonseca-dev
Copy link
Contributor

Closes #848

Added use_blob parameter to function write(), and added underlying function write_through_blob() to increase performance of writing to cells.
This function uploads a CSV file, and then runs a TI process which uses this CSV as data source to load data to a cube.

@ffonseca-dev ffonseca-dev marked this pull request as ready for review March 27, 2023 14:11
@MariusWirtz
Copy link
Collaborator

Wow, this is great! Thank you @cwffonseca

I will immediately get to work to review!

TM1py/Services/CellService.py Show resolved Hide resolved
TM1py/Services/CellService.py Show resolved Hide resolved
TM1py/Services/CellService.py Show resolved Hide resolved
TM1py/Services/CellService.py Show resolved Hide resolved

# Create a TI processto load CSV data into the cube
dataload_process_name = 'cube.' + cube_name + '.load.fromfile.' + random_key + 'test'
dataload_process = Process(name=dataload_process_name,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move the process creation to its own method. Perhaps a utility like "create_csv_load_process"

# application_service.delete(path='', application_type='FOLDER', application_name='TM1py')

# Delete CSV file local
os.remove(export_path_to_file)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add a parameter to clean up the applications folder

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this in #882
Yeah. I think we could make this optional. If the function is called in parallel though, it would be a nuisance if a separate thread, process, or application removed the tm1py folder in though...

@MariusWirtz
Copy link
Collaborator

Thanks for the review @rclapp.
I'm on it :)

@MariusWirtz
Copy link
Collaborator

closed in favor of #882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Impement use_blob argument in write and write_dataframe function for better write speed
4 participants