Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

batch_insert and CompositeType #111

Open
sarral opened this issue Jan 5, 2013 · 3 comments
Open

batch_insert and CompositeType #111

sarral opened this issue Jan 5, 2013 · 3 comments

Comments

@sarral
Copy link

sarral commented Jan 5, 2013

What is the syntax to batch_insert into a Composite RowKey?

On regular Insert the key is array of values. No problem there.

I've tried: serialize( array(1,2)) as KEY

CF CompisiteType (LongInt,LongInt)

It does insert into '0' RowKey.

@thobbs
Copy link
Owner

thobbs commented Jan 31, 2013

What are you using for your $column_family->insert_format? Here's an example of batch_insert using ARRAY_FORMAT: https://github.com/thobbs/phpcassa/blob/master/examples/alternate_formats.php#L57

@sarral
Copy link
Author

sarral commented Jan 31, 2013

Insert format is ARRAY_FORMAT.
I'm using 1.0.a.5 version

Thank you for the refrence.
I'll give it another try. It seems pretty straight forward. Don't know why I had issues.

@sarral
Copy link
Author

sarral commented Feb 1, 2013

Example shows batch_insert() on a NON-Composite RowKey type. No Help. I have this figured out.

I can't figure out how to batch insert into a CompositeType RowKey (LongType,IntegerType).

I've tried to make the key:

  1. KEY = '12334:123'
  2. KEY = array(12334,123)
  3. KEY = '12334,123'
  4. KEY = serialize( array(12334,123) )
    .... all with no luck.

I don't know why my text is bold.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants