¿ªÔÆÌåÓý

Import database tables from Y!Groups


 

In beta@ Jim Poston wrote:

Sorry if I missed it: is import in the works for databases?
/g/beta/message/5784

I've decided to expand upon this topic here, as it is more of a "how to". If we come up with bug reports or feature requests those should be posted back in the thread at beta@ so Mark will see them.

One thing I noticed when moving some databases from a Y!group to its reincarnation as group@ is that the Exported CSV (probably TSV too) from the Y!Group includes a header row containing the column names. Here I'm using the trailing @ to signify a group on Groups.io, my apologies in advance to anyone who had the temerity to name their group "group".

When importing to the group@ that column heading row is matched up to the column names in the group@ table - so you need to have columns that match the names of those in the Y!group. Columns in the CSV that don't match any columns in the group@ table are discarded during import. I found it useful to open the CSV in a text editor to copy/paste the column names into the Edit Table form at group@ so that I'd get them to match exactly.

The column type in a group@ table seems to control how both the add row and the import functions treat the content for that column. But my only test so far was a column of type "Date" - which imported as gibberish when fed a CSV containing dates in the YYYY-MM-DD format.

On the other hand, importing that column as "Single Line Text", and then changing the type to "Date" after completing the import did not turn them to gibberish. But I don't think it turned them to an internal Date representation either: I think the table just shows the text that it imported despite the subsequent change of field type.

-- Shal


 

Thanks, Shal. Good to know what works and what doesn't. I plan to do some more testing of the databases and will report in if I find any other gotchas.

Duane


 

Duane,

I plan to do some more testing of the databases and will report in if I
find any other gotchas.
As reported in the thread on beta@, I did find that MM/DD/YYYY format does import as a date when the column Type is set to Date. But only exactly that format, with leading zeros required. That may be useful, as Excel will let you convert general dates formats to that.
/g/beta/message/5790

-- Shal