Comments (5)
I think I will need more details, like a reproductible complete test-case, because my testing here shows no problem:
CL-USER> (cl-csv:read-csv-row "C:\\some\\nasty\\windows\\path\\,foo"
:separator #\,
:quote #\"
:escape "\\\"")
("C:\\some\\nasty\\windows\\path\\" "foo")
CL-USER> (cl-csv:read-csv-row "C:\\some\\nasty\\windows\\path\\"
:separator #\,
:quote #\"
:escape "\\\"")
("C:\\some\\nasty\\windows\\path\\")
See the test/ directory for easy self-contained examples using the FROM inline
syntax.
Also, in your case, did you notice that you can actually directly connect pgloader to the MySQL source and load from a database connection?
from pgloader.
I was trying to use CSV because I have to load the data (only) from mysql to postgres and the CSV-source gives me the possibility to configure the table/column mapping between source and target (e.g. 'user.userid' => 'users.id').
I don't think that this is possible with the mysql-source, or at least I did not find any options to specify the table/column-mapping between mysql and postgres. I can specify a specific table, I can say 'data only', and I can cast types by column - but I cannot configure the actual mapping. Or did I miss something?
from pgloader.
You can speficy the mapping using a MySQL View on top of your current data model, then have pgloader only migrate the views. Easier way to do that is create a new schema in MySQL and have all the views in there, as they will be able to refer to the main tables in the main schema.
See the clause MATERIALIZE VIEWS
where you can name the views you want to migrate the content of.
from pgloader.
Nice workflow - thanks for your hints!
For the CSV-Problem - I'll have a look and come back with a more detailed error-explanation.
from pgloader.
Closing this for now as I lost my failing pgloader-script and cannot provide more details to reproduce the csv-reading error.
from pgloader.
Related Issues (20)
- getting error ERROR sqlite: Failed to open sqlite file HOT 1
- Transforming specific column from int(sqlserver) to UUID(postgres)
- Transforming MS-SQL money datatype to PostgreSQL numeric(19, 4) datatype.
- MSSQL: How to speed up data copying?
- MSSQL connection string format HOT 1
- Anonymous code blocks don't work HOT 1
- Mssql: IDENTITY columns not detected in tables outside the default schema. HOT 1
- complain about heavy dependencies HOT 1
- Heap Exhausted when migrating MySQL DB to PostgreSQL DB HOT 3
- Incorrect default cast from MSSQL `int` (auto-increment) to PG `bigserial`
- MySQL to Postgres Data Only with Truncate target table not truncating table before loading. HOT 1
- MySQL's utf8mb3 (formerly utf8) not supported? HOT 2
- Connection problem with postgres when migratin data from SQLite database to Postgres
- MSSQL to PGSQL table and field names case insensitive HOT 1
- MYSQL to Postgres : reset sequence not working
- Pgloader hangs on copying rows when migrating from maria db. HOT 1
- Specify TARGET TABLE with database source type
- Proposal for Read-Only transactions support in Pgloader for PostgreSQL sources
- Not Able to load the binary data using the LOAD file- having the whitespace after quoted data ERROR
- pgloader mssql to postgres creates other tables with view filter
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 pgloader.