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

Generated insert from Data Transfer/Export resultset ignores "Data rows per statement" #4751

Closed
braiam opened this issue Dec 7, 2018 · 4 comments

Comments

@braiam
Copy link

braiam commented Dec 7, 2018

When exporting a resultset and defining SQL insert as the transfer type, in the Settings (third screen) there's an Exporter settings, in which one of the parameters is Data rows per statement, which, no matter the value, always generates one statement per row. I would expect that if set the value to >1, insert statements would have >1 rows worth of data per statement.

@serge-rider
Copy link
Member

What is your database?
Most databases just doesn't support multi-row syntax - this option is ignored for them (perhaps we should disable it in UI for such databases).

@braiam
Copy link
Author

braiam commented Dec 11, 2018

The target database is MariaDB which does allow multi-row inserts.

@serge-rider
Copy link
Member

Then I can't reproduce this. This is what data export (SQL format) generates for my test MariDB server:

INSERT INTO sakila.actor (first_name,last_name,last_update,data_name,time_name,Column1) VALUES 
('PENELOPE','GUINESS','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('NICK','WAHLBERG','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('ED','CHASE','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('JENNIFER','DAVIS','2006-02-15 07:34:38.000',NULL,NULL,NULL)
,('JOHNNY','LOLLOBRIGIDA','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('BETTE','NICHOLSON','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('GRACE','MOSTEL','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('MATTHEW','JOHANSSON','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('JOE','SWANK','2006-02-15 07:34:33.000',NULL,NULL,NULL)
,('CHRISTIAN','GABLE','2006-02-15 07:34:33.000',NULL,NULL,NULL)

Note: it is the configuration of source database.

@braiam
Copy link
Author

braiam commented Dec 13, 2018

@serge-rider When I read "Exporter settings" I expect the source to be irrelevant, or it's a misnomer of the window?

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

No branches or pull requests

3 participants