Closed (fixed)
Project:
Data
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Jun 2010 at 14:48 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alex_b commentedI'll have to take a close look at the field API to decide what's going to make sense in Data in Drupal 7.
Comment #2
cosomo commentedThe grouped fields should be integrated into cck3. So perhaps this is a replacement for data? So there should only be the way of "feeding" multiply fields via RSS/CSV etc. But I think this would be an issue for your Feeds-project.
Comment #3
alex_b commentedData is a very weird animal with a colorful bag of functionalities that don't necessarily need to live on within Data for Drupal 7:
1. A table editor (hum, I'm still not sure whether I should have ever built this :)
2. A CRUD API for manipulating tables.
3. A schema manager with the ability to harmonize Drupal schema info with the actual table schema by either adjusting the Drupal schema or the table (much of the functionality is from Schema module, only the UI lives in Data).
4. A CRUD API for manipulating data in tables (competes with nodeapi; this is the piece that very likely may be able to move to Field API).
5. Automatic Views integration for 'Data managed' tables (this is sth that other modules like Table Wizard do, too. Not too much of rocket science, though).
6. Integration modules with Drupal API's like node's or taxonomy's.
Some of the advantages of Data:
- It's fast on run time.
- You can build storage for random, flat data very fast (this is where building a CCK content type becomes arduous).
Some of the disadvantages of Data:
- it sucks for certain types of multi-dimensional data (related data is usually fine, but suckage starts when there is a notion of 'records', that are a logical unit, spreading across tables).
- there is no CRUD *UI* for data in tables.
- its CRUD API competes with nodeapi, the difference being speed.
- the integration with Feeds is a little odd as Feeds allocates data tables on the fly. This is awesome if you understand Data, but confusing if you don't.
My next actions are to evaluate Field API in Drupal 7 and see to what extent we can transfer Data functionality (most importantly (4)) to a FieldAPI based approach.
Comment #4
alex_b commentedjmiccolis pointed out offline that entity API is a related candidate to evaluate on the path to Drupal 7: yes, it is.
Comment #5
mfer commentedDoesn't data seem more like entities than fields? Is the idea to attach the stuff made accessible by the data module to nodes, users, and other entities? Or, to be exposed as top level objects?
If you go the entity route you may want to look at the commerce product module for an example of dealing with CRUD. Specifically see the controller include and crud functions. See http://github.com/rszrama/drupalcommerce/blob/master/modules/product/com... and http://github.com/rszrama/drupalcommerce/blob/master/modules/product/inc...
Comment #6
phayes commentedI would imagine that each data table & record will be a 'fieldable' entity. Each column for each table would be a 'field' that makes use of the field API.
Comment #7
roam2345 commentedsubscribe
Comment #8
blue56 commentedI would really like to see the Data module ported to Drupal 7. Here are some reasons why:
1) Simply showing raw table data in Drupal 7 is hard without the Data module. Views integration is important.
2) Third party software doesn't integrate well with Drupal 7's field concept. Eg. using Navicat to access data.
3) Speed. The field system is flexible but not fast.
4) The possiblty to show denormalized data. Not everything fits well into contenttypes.
Comment #9
rfay+1 for D7 and data module.
Comment #10
Anonymous (not verified) commentedI see a use for Data module to quickly import CSV feeds, store as flat data. Then use a custom node processor module to turn that data into proper nodes. Feeds node processor isn't flexible enough to alllow data pre-processing on-the-fly, so I would use flat Data as an in-between step. This gives me fast feed imports separated from slow node-creation.
Comment #11
xandeadx commentedsubscr
Comment #12
lolandese commentedSuscribe
Comment #13
pvhee commented+1 for D7 version of drupal
Comment #14
podaroksubscribe
Comment #15
panhead490 commented+1 for D7 version of drupal
Comment #16
Anonymous (not verified) commented+1 for D7 version of drupal
Data + Feeds is fast, and keeps clutter off the backend.
Comment #17
mschuyler commented+1 for D7 version.
Comment #18
dasjoi would recommend review if entities with entity api suffice your needs before asking for a data d7 version
http://drupal.org/project/entity
Comment #19
Anonymous (not verified) commented-edit- never mind
Comment #20
Traphic commented+1 for D7
Comment #21
fishclic commentedSubscribe.
Comment #22
luthien commentedI'm currently using Table Wizard to expose external DB fields to Views. The tw module is going to be deprecated and they suggested to use the Data module instead.
I tried out the Data module but I don't see a way of exposing the external DB fields.
The Data module maintainers are not confirming if there will be a D7 version.
Does anyone knows how to achieve this functionality and/or this will be a new feature for Data if they decide to create a D7 version?
Comment #23
lolandese commentedChanged titel for better recognition in dashboard.
Comment #24
mcaudy commented@luthien: Data creates Views integration by "adopting" tables that you create manually in the Drupal database (or which have been created by other contrib modules)
Once you have created your table, go to admin/build/data/overview and click on the "adopt tables" link.
It will take you to a page where you can choose what table you want to adopt.
This will autogenerate Views integration code for your table. If you create a new View, you should see an option for creating a "View type" based on your tables data.
Comment #25
luthien commentedthanks for the info about the Data module. Basically, Data module is not a replacement for the tw module, which allows us to expose external DB fields to Views. There are several posts that mentions to use Data module once tw is deprecated but it looks like it does not works for this particular case scenario.
Comment #26
groovehunter commented+1 for a port!
Comment #27
hperrett commented+1 for port to DX7
Comment #28
mrfelton commented+1 for a D7 port. Thanks!
Comment #29
geek-merlinsub
Comment #30
jerdavisWith the change in ownership of this module could we get an update from the new maintainers as to what the intentions are for D7?
Comment #31
AndrzejG commented+1 for D7
Comment #32
ngstigator commentedsubscribe
Comment #33
joostvdl commentedsubscribe
Comment #34
joostvdl commentedCan someone give a timeschedule for a D7 release?
Comment #35
mrsinguyen commentedsubscribe
Comment #36
Todd Young commented+5 for D7 port (I'm from Chicago - we vote early & often...)
Comment #37
rcross commented+1 - would be very keen to see some feedback from the new maintainers on their plans here.
Comment #38
astutonet+1 for D7 version
Comment #39
jstubbs commented+1 for D7 version
Comment #40
ace11 commented+1 for D7 version
Comment #41
kika commentedsubscribe
Comment #42
SeanBannister commentedsub
Comment #43
sebas5384 commented+1 for D7 version
Comment #44
Avalanche commented+1
Comment #45
gfxguru commentedhow bout a migrate from 6? I think this would be a great module.
+1 sub
Comment #46
mgiffordHas anyone tried to run this through Coder?
Comment #47
likewhoa commentedsubscribing and setting proper title for better tracking.
Comment #48
tdurocher commentedSubscribing
Comment #49
dvales commentedI need the "adopt" data module feature in Drupal 7. I'm using the webform mysql view module and need a way of notifying drupal of the view that is created. Is there an equivalent way of doing so? Is entity the solution and if so what it the process
THanks
Comment #50
MarkRennes commented+1
Drupal is a great content management system, if by content we mean material whose structure can be appreciated by an intelligent agent (natural language text, images, etc.). But the world - especially of business - is full of so-called "structured" data. Very often, we need to combine a structured approach: where we can ask precise questions or queries and get a precise answer, because the semantics of the data are explicit as tables and their attributes / columns. Such database querying is at the heart of many business processes. Those same processes can of course already benefit from Drupal exploitation for their less-structured content.
Get the structured data and querying aspect right, and Drupal will have another competitive advantage - for use cases like learning management (teaching, learning and assessment) and multimedia applications.
How has it been possible for a new version of Drupal, D7, to be produced without the architects seeing the essential need for Data or Table View functionality? These would ideally be combined, so that Data can integrate tables managed by other applications rather as Table View does. Is such a scenario being considered for Drupal 8 core?
I'm not a competent PHP coder - sorry! - but will happily contribute on requirements specification, documentation, etc.
Comment #51
Avalanche commented@MarkRennes
I don't want to fault the programmers, I think those of us involved in this field (beyond just simple make it look pretty design) are transitioning into a new realm. Well, maybe not "new" for those that have been grappling with this idea for the past 20+ years in academia and data industry. My point being, I think web developers in general are facing the need to deal with mounds of structured data. The work I do, at least, requires data mashups. I'm a one man shop, so definitely having tools like Data and Feeds is very helpful for me. Like, I know what I need and want, but I don't necessarily know how to program it from the ground up as a properly trained and experienced database admin might.
So I whole heartily agree with you - I would love to see more data functionality built into the core of Drupal.
Comment #52
Anonymous (not verified) commentedAs suggested before, the way forward is using Entity API. To help you along, you can look at the Model module, which is a "template" for everything you need to setup your own entity.
By adapting the Model project (turned it to my own custom module), I was able to create an entity with 20 "properties" (table columns) in a single flat table - the same thing Data does on D6. You can attach extra fields with core Fields API (for flexibility), but it's not required.
Custom entities can be used with Feeds through a custom "FeedsCustomProcessor.inc" file, in a
hook_feeds_plugins().You'll have to study Entity API, try it out, and it's indeed quite technical. But it works. If there is going to be a Data for D7 module, it should be based on the Entity API.
And as a bonus, custom entities can easily integrate with Views via the EntityFieldQuery module or index content through Search API.
Comment #53
mefisto75 commentedtracking
Comment #54
MarkRennes commentedThank you @morningtime.
Using entities, I can build - painfully - the equivalent of one table. But what if I need the equivalent of two (or more) tables which are related on a primary-foreign key? So far as I can see, I cannot (using an entities-based approach) meet one of Codd's original two integrity constraints, which is referential integrity: which I take to be fundamental to the proper structuring and exploitation of (structured) data.
Am I wrong?
Comment #55
Anonymous (not verified) commentedAlthough I didn't study Codd, I think you can. The Drupal Schema API lets you create foreign keys on your tables in the .install file? And for example, if you do a delete() action on entity type A, you can call the delete function for the referenced entity type B in hook_{entity_A}_delete(). I'm sure there is a way with Drupal.
Comment #56
Canadaka commentedSubscribing
Comment #57
mohammed j. razemI think it's a higher priority than "minor" the ease of manipulation, feeds integration and views integration. It's much better and easier than Entity API.
This is a highly recommended port to D7.
Comment #58
sachbearbeiter commentedsub
Comment #59
MarkRennes commented@morningtime:
No doubt you CAN enforce foreign keys. That's still infinitely harder than the end-user ease-of-use that I for one - spoilt no doubt as I am by years of good experiences with Microsoft Access in a desktop environment - would like to see. I'm with Mohammed J. Razem et al: why not a straight port of the data module? Anybody?
Comment #60
andypostsubscribe
Comment #61
btopro commentedsub
Comment #62
seanrLOL, Todd you just made my day with the vote early and often comment - I'm also from Chicago.
I also need to figure out how to replicate this functionality in D7. I'm trying to convert some perl scripts loading flatfiles into Drupal modules using database tables. This is a sample of the data:
Doesn't make any sense to me to use nodes for that - too much overhead for such simple data.
Comment #63
kylesmith commentedsubscribing
I agree with MarkRennes and aceinthehole that structured data is an important function needed by Drupal.
As with seanr, I want to display data in database tables. I could do it with nodes and Views, but it would require hundreds of nodes for simple data.
Comment #64
gmclelland commentedNo need to subscribe. Click the green follow button at the top of the page instead.
Comment #65
dasjofinally ... unsubscribe :)
Comment #66
basicmagic.net commentedsubscribe
Comment #67
joachim commented> I would imagine that each data table & record will be a 'fieldable' entity. Each column for each table would be a 'field' that makes use of the field API.
That would sort of be doable... but surely you'd need to create a different field storage backend module that puts the field data into the DB table in question rather than make a new table per field.
Comment #68
joachim commentedI've made some progress on this.
I've started with the Coder Upgrade conversions, and then worked through the core data module and data_ui. I've not touched data_node & co.
Here's a sequence of patches from my local git branch for the D7 port, and the summary of my commits in the patch:
cc87239 Applied Coder upgrade coding standards conversion.
fb5547d Applied Coder upgrade Core API conversion.
b75046f Upgraded for changes to CTools.
34ca3f9 Fixed incorrect menu path.
899e019 Replaced obsolete schema_invoke() for upgraded Schema module.
af776f8 Added file list to info file; removed obsolete data_include().
5d9f63d Upgraded for FormAPI #markup elements.
2debfc4 Commented out hook_schema_alter() for the time being.
a3d2e7b Fixed adding a field to a table.
96aa7e7 Fixed warning on empty field labels.
06c5481 Fixed for changes to Database API functions.
What works so far:
- adopting a table
- viewing its schema
- adding a field
- changing primary keys & field labels
- Views fields and filters
Comment #69
joachim commentedNewer version of the above patch with a small UI fix and tentatively uncommenting hook_schema_alter() which now seems to work without blowing up!
> I would imagine that each data table & record will be a 'fieldable' entity. Each column for each table would be a 'field' that makes use of the field API.
I've made some progress towards that here: #1342294: add a module to create entity types and entities from tables
(UPDATE: these are now fieldable!)
Comment #70
joachim commentedFurther fixes.
Turns out my tentative uncommenting of hook_schema_alter() was rather premature.
I've taken a new approach which works, though I recommend enabling CTools first, then Data, rather than together (or try it on a test site and see if you can make it work! :)
I've contacted the maintainer of this module about co-maintaining, so I can get this ongoing work into git and available as a dev release.
Comment #71
yareckon commented+1 on joachim getting co-maintainership. I think this is a big important suite that needs some love.
Comment #72
rfayAgreed - @joachim if you're willing and open an issue requesting it we'll all RTBC it :-)
Comment #73
joachim commentedDone. #1348546: Data: request for co-maintainership.
Comment #74
MatNk commentedHi
First : big thanks to you to port data module on D7.
I tryed to patch but it doesn't work. I'm not familiar with Terminal... sorry.
Could we have a version. tar or. Zip patched module?
Thanks
Comment #75
likewhoa commented@MatNk run these commands.
cd sites/all/modules && git clone --branch 6.x-1.x http://git.drupal.org/project/data.git && cd data && wget http://drupal.org/files/827000-3.data_.port-d7.patch && patch -p1 <827000-3.data_.port-d7.patch && rm -iv 827000-3.data_.port-d7.patch@joachim gj man!
Comment #76
febbraro commented@joachim I have made you a maintainer as per #1348546: Data: request for co-maintainership thanks and feel free to get this going....
Comment #77
joachim commentedOk I've made a 7.x-1.x branch and merged my local branch into it, so the changes from my patch above are visible as a sequence of commits -- which should help anyone looking at the changes I've made.
I've made a dev snapshot release which will be available as soon as the d.org bot makes it :)
I'll apply the fix for #1056470: Data contains multiple SQL injection and XSS vulnerabilities and also #1342294: add a module to create entity types and entities from tables and make an alpha release.
Comment #78
joachim commentedClosing this, as I reckon further porting work is best handled in separate issues.
Please bear in mind that help is still very much needed with the porting of this module, in particular CTools support and the submodules for nodes, search, and taxonomy.
Comment #79
joachim commentedFollow-on issue: #1363554: deprecate data_node, data_taxonomy on D7, upgrade path?.