Jan-21-2022, 06:34 PM
(This post was last modified: Jan-21-2022, 06:34 PM by BrandonKastning.
Edit Reason: formatting & spelling
)
Admins/Moderators: I attempted to edit my OP and I received a message too long error as included in below screenshots! I was forced to post a reply. Please understand!
**** Update: 01/21/2022 @ Approx. 10:35 ****
Without knowing the best way to approach this; I decided to use LibreCalc and create a 5 column CSV and use copy and paste from .TXT (in BlueFish using the line numbers to keep track).
Then using the CSV to MariaDB/MySQL Payload Python Script Below (This one I have specified column "fulltext_contents" to be datatype[dtype] "LONGTEXT"; I was receiving errors after row 1 on LibreCalc CSV when testing:
Then I was frustrated and decided to start manually copy and pasting directly into SQL using HeidiSQL again.
While it's *keeping* proper formatting if I open the HeidiSQL cell dialog box and paste and then click check/okay/save. All seems fine.
Then I compared row #1 (the one that worked before needing to specify LONGTEXT on fulltext_contents column) from CSV -> SQL using Python and SQL Alchemy vs. Manual Data Entry (Copy and Paste) from .TXT using BlueFish and the following screenshots is what happened.
I'm confused at how to proceed properly. It seems row 1 entries from LibreCalc, saved as a CSV and then imported using Python and SQL Alchemy created a "perfect entry". Perfect, meaning it kept formatting exactly like in Text, UTF-8 (.TXT).
However, that perfect formatting didn't continue as I continued with entries below row 1 on LibreCalc (CSV) file.
You can see how it doesn't keep the formatting on the entire text file in row 2 and requires me to "scroll endlessly to the right with zero maintained text formatting". -- So... virtually pointless.
My manual Data Entry directly into SQL using HeidiSQL seems fruitful; however, there are spacing issues between lines that are *not* there on LibreCalc CSV row 1 (as seen in screenshots). Comparing the both leaves me scratching my head.
Moving forward with manual entry into SQL vs. LibreCalc CSV is providing me with gapped formatting in spacing.
And continuing with what I was doing with Entries pasted into LibreCalc CSV stopped working as seen on row 2.
Does anyone know what's happening here and what's the best practices to achieve LibreCalc CSV -> SQL (row 1) 's perfect formatting for *ALL* entries? And is there a way to do this without pasting into LibreCalc (perhaps a different way of loading my paste's into a CSV a different method perhaps that wouldn't fail by unknown reasons to me).
Thank you all for this forum!
Here are the screen shots:
free picture upload
Perfect Formatting:
share picture
Not Perfect Formatting (Almost -- Double Spaces?):
Failed Editing Message (Too Long):
picture to url
**** Update: 01/21/2022 @ Approx. 10:35 ****
Without knowing the best way to approach this; I decided to use LibreCalc and create a 5 column CSV and use copy and paste from .TXT (in BlueFish using the line numbers to keep track).
Then using the CSV to MariaDB/MySQL Payload Python Script Below (This one I have specified column "fulltext_contents" to be datatype[dtype] "LONGTEXT"; I was receiving errors after row 1 on LibreCalc CSV when testing:
import pandas as pd import mysql.connector from sqlalchemy import create_engine from sqlalchemy.dialects.mysql import LONGTEXT dtype = { "fulltext_contents": LONGTEXT } myd = pd.read_csv('UMD_WA_1889_CSV2.csv') engine = create_engine('mysql+mysqlconnector://brandon:[email protected]/Exodus_J3x_Dev_Bronson') myd.to_sql(name='UMD_WA_1889_CSV2', con=engine, if_exists='replace', index=False, dtype=dtype)What you will notice is a comparison between CSV -> SQL (And the Text *Formatting* being wrong). Row 1 worked perfect. Then the rest was failing. And then once I viewed it using HeidiSQL it alters somehow and scrolls (i.e without wordwrap persay). ?
Then I was frustrated and decided to start manually copy and pasting directly into SQL using HeidiSQL again.
While it's *keeping* proper formatting if I open the HeidiSQL cell dialog box and paste and then click check/okay/save. All seems fine.
Then I compared row #1 (the one that worked before needing to specify LONGTEXT on fulltext_contents column) from CSV -> SQL using Python and SQL Alchemy vs. Manual Data Entry (Copy and Paste) from .TXT using BlueFish and the following screenshots is what happened.
I'm confused at how to proceed properly. It seems row 1 entries from LibreCalc, saved as a CSV and then imported using Python and SQL Alchemy created a "perfect entry". Perfect, meaning it kept formatting exactly like in Text, UTF-8 (.TXT).
However, that perfect formatting didn't continue as I continued with entries below row 1 on LibreCalc (CSV) file.
You can see how it doesn't keep the formatting on the entire text file in row 2 and requires me to "scroll endlessly to the right with zero maintained text formatting". -- So... virtually pointless.
My manual Data Entry directly into SQL using HeidiSQL seems fruitful; however, there are spacing issues between lines that are *not* there on LibreCalc CSV row 1 (as seen in screenshots). Comparing the both leaves me scratching my head.
Moving forward with manual entry into SQL vs. LibreCalc CSV is providing me with gapped formatting in spacing.
And continuing with what I was doing with Entries pasted into LibreCalc CSV stopped working as seen on row 2.
Does anyone know what's happening here and what's the best practices to achieve LibreCalc CSV -> SQL (row 1) 's perfect formatting for *ALL* entries? And is there a way to do this without pasting into LibreCalc (perhaps a different way of loading my paste's into a CSV a different method perhaps that wouldn't fail by unknown reasons to me).
Thank you all for this forum!
Here are the screen shots:
free picture upload
Perfect Formatting:
share picture
Not Perfect Formatting (Almost -- Double Spaces?):
Failed Editing Message (Too Long):
picture to url
“And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Juda, the Root of David, hath prevailed to open the book,...” - Revelation 5:5 (KJV)
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo