-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
CSV import/export #5174
Comments
Forgot to mention - we'll most probably use petl for CSV processing. Our team already has some experience with this lib plus it offers good memory efficiency. |
How should we handle the selection of exported fields? For example, cost_price should not be always exposed. |
Any update on it? I am facing a problem to upload 100,000 products in 2 days? Is that possible to upload those as CSV directly to database? |
@benmandakh2609 No update so far, this task is scheduled to be worked on in our next core team sprint which starts at the end of January. |
I also need csv import export feature. Currently using woocommerce but can't switch to saleor due to this. |
any progress? I;d love to start importing products in order to use saleor but this is a blocker for us and I'm not keen on developing it myself if its in the pipeline in any case |
We had to pause development on CSV to focus on permission groups that were started earlier. I think as soon as we release them we'll get back to CSVs. |
Is there a way we can help with this? |
When can we expect csv import/export feature?. Planning to start using saleor. |
Anyone programmatically updating DB with python for updating products? I have a dictionary data type that I want to upload. |
I'd love to see this feature as I'm right now also planning to move from Solidus to Saleor. |
Hey! Any progress on the tool? When can we expect it? Will be very helpful. |
I started on an importer. Not CSV because I figured that would be a little limiting, but it's something. I no longer have the time nor drive to finish it, but it might be somewhat useful to someone. Sorry to hijack this issue, but it's related and might help someone while waiting for something more official or complete. |
Any progress on this ? |
Hi @robertology, Do you have any idea about the performance? like products imported per minute? |
You're getting 10 per minute with my thing? I would expect much better than that, but I never ran it with 1000 items, so I don't really know how it would actually do. But if you want to discuss more, probably best to open an issue on my repo to avoid bloating/derailing this one. |
If you are looking for an intermediate solution, you can run a script that reads from a csv and creates products via graphql API, it is a reliable solution and it is fairly scalable, 10k products would not be a problem |
Do you have a solution for Products import in Saleor ? (In python via GraphQL or directly in Saleor plugin's or application's) |
We started to add bulk mutations for data import, and this is the recommended approach now: https://docs.saleor.io/docs/3.x/developer/bulks/bulk-orders. CSV import won't be further developed in Saleor. |
Implement CSV import/export for products.
Export
Proposed API:
Description
Mutation triggers a Celery task that takes given queryset of products and exports them to a file. As a result of the mutation, we return a
Job
object that informs about the status of the operation. Once the task is finished,Job
will contain a link to download the CSV file (or a dashboard view with the report and download link). We will send this link in an email to the user who requested the operation.Job objects could be used in the dashboard to render a list of scheduled jobs, query their status or access past exports, but we'll need to agree if this in the scope of this PR.
Parms:
My idea is to use
scope
,filter
andids
to determine which products to export.filter
would be of the same shape as filter used in theproducts
query, so we can filter out some products first on the list and then export them.ids
is to allow exporting only selected set of productids
. There is also the ability to export all products in the database. Thescope
param would determine which of these three export options to use.Permissions:
MANAGE_PRODUCTS
(or specific permission only for import/export - needs to be discussed)Import
Description
Mutation passes the uploaded file to a task that reads and parses the file. For each row, we create necessary model instances, create connections between them and save them in the database. Once the task is finished we send an email to the staff user who requested the operation with a report about the number of successful/failed rows and/or errors that occurred.
Params:
updateExisting
- if true and there is a product/variant ID in CSV that already exists in the database, the import will override these products with data from CSV. If false, lines that refer to existing products will be skipped.updateStock
- whether to update stock quantities with values from the CSV file. This is to guard against overriding the inventory accidentally with quantities that may be outdated in the file.Permissions: same as
exportProducts
mutation.Notes
This is a draft and I'm open to suggestions, so we end up with API that we all agree with. The details of the shape of the proposed API is also to be adjusted if I missed something.
The text was updated successfully, but these errors were encountered: