Hello Jose,
My development environment is Dolphin Smalltalk.
To bind Fastbit to smalltalk I used SWIG. This way I was able to bind
the complete C++ API of Fastbit into smalltalk classes.
It's probably a way to go for python binding. SWIG is easy to use , you
don't need hight C++ skills.
Here is a short example of smalltalk code using C++ api (part,query and
bundle interface) :
aPart := FBPart adir: aDirectory bdir: aDirectory2.
aQuery := FBQuery new.
aQuery
setPartition: aPart;
setWhereClause: aWhereClause;
setSelectClause: aSelectClause.
aQuery evaluate.
aBundle := FBBundle create: aQuery.
aVal := StdString new.
aBundle getString: aVal i: 0 j: 0.
aVal c_str.
Alexandre
[email protected] a écrit :
> Send FastBit-users mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of FastBit-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Bulk Data Loading (K. John Wu)
> 2. python bindings for FastBit - in progress (and usable)
> (Jose Nazario)
> 3. Re: python bindings for FastBit - in progress (and usable)
> (K. John Wu)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 25 Feb 2010 12:32:08 -0800
> From: "K. John Wu" <[email protected]>
> Subject: Re: [FastBit-users] Bulk Data Loading
> To: FastBit Users <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi, Teryl,
>
> Here is a web page with some information about data organization
> <http://crd.lbl.gov/~kewu/fastbit/doc/dataLoading.html>.
>
> After you have put your data in the format used by FastBit, say in a
> directory called data_directory, then you can use ibis command line
> tool to generate indexes explicitly
>
> ibis -d data_directory -b -v
>
> or cause indexes to be generated by issuing queries. There are more
> information about the command line tool at this web page
> <http://crd.lbl.gov/~kewu/fastbit/doc/ibisCommandLine.html>.
>
> If you have data_dir1 and data_dir2, then you can use ibis command to
> append data_dir2 to data_dir1 by the following command
>
> ibis -append data_dir2 to data_dir1
>
> This command leaves data_dir2 as is, but append all values in
> data_dir2 to the corresponding files in data_dir1. It also modifies
> the relevant metadata files. However, it does not update the indexes
> unless both data_dir1 and data_dir2 contain the same type of indexes
> for each column.
>
> Hope this helps.
>
> John
>
>
> On 2/25/2010 11:57 AM, Teryl Taylor wrote:
>
>> Hi John,
>>
>> Thanks for the quick response. If I was to put the data in the proper
>> column oriented format. How would I get FastBit to take the
>> column/columns and build the index file? As well as the meta data
>> file? Or is that done on the call to append? And when you say
>> "append" puts two data partitions together, do you mean the columns for
>> two partitions are merged physically (on the hard disk) into a single
>> set of columns or just in memory?
>>
>> Regards,
>>
>> Teryl
>>
>>
>> On Thu, Feb 25, 2010 at 3:46 PM, K. John Wu <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi, Teryl,
>>
>> Thanks for your interest in FastBit.
>>
>> If your data are already in the format usable by FastBit, then there
>> is function called ibis::part::append that can put two data
>> partitions together.
>>
>> Of course, you can always write your own function to extend an
>> existing data partition if your input data is not exactly in the
>> format FastBit likes..
>>
>> John
>>
>>
>>
>> On 2/25/2010 11:41 AM, Teryl Taylor wrote:
>>
>> Hi everyone,
>>
>> I'm new to FastBit and I just had a quick question. I have a
>> bunch of
>> binary data files with integers, floats, and chars in them and I
>> want to
>> be able to bulk load into fastbit at interval times. What
>> would be
>> the best way to do this? I don't really want to convert to CSV
>> files. Can I create column data through my loader program and then
>> just have FastBit create the indexes and metafiles for it?
>> Which API
>> would be the best to use?
>>
>> Thanks for any information you can provide,
>>
>> Cheers,
>>
>> Teryl
>>
>>
>>
>>
>> _______________________________________________
>> FastBit-users mailing list
>> [email protected] <mailto:[email protected]>
>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>
>>
>>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 26 Feb 2010 11:11:48 -0500 (EST)
> From: Jose Nazario <[email protected]>
> Subject: [FastBit-users] python bindings for FastBit - in progress
> (and usable)
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
>
> i know that this has been discussed before but i hadn't seen anyone
> provide them. thanks to Brent Pedersen for some key bugfixes and
> contributions, python bindings to FastBit are now in development (e.g.
> working but no release yet):
>
> http://code.google.com/p/pyfastbit/
>
> built against fastbit-ibis1.1.6 and cython 0.12.1.
>
> they are based on the C API. their status:
>
> - writes work
> - queries work
> - there's a thread lock in the destructors which causes a hang
>
> feedback and improvements most welcome. specifically my C++ skills are
> non-existent, but i'd like to add support for text columns (category,
> blob, text etc) to the C API and thus the Py interface.
>
> thanks to all of the developers and contributors for fastbit, i hope this
> contribution helps.
>
> ________
> jose nazario, ph.d. http://monkey.org/~jose/
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 26 Feb 2010 09:14:22 -0800
> From: "K. John Wu" <[email protected]>
> Subject: Re: [FastBit-users] python bindings for FastBit - in progress
> (and usable)
> To: FastBit Users <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi, Jose,
>
> Thanks for taking the initiative to build a python interface for
> FastBit. Since the C API of FastBit has not been touched for a long
> while, there are definitely room for some updates and we would be
> happy to hear your suggestions.
>
> On the issue of handling string values, the main function to be added
> would be a function to retrieve the string values, likely something
> named fastbit_get_qualified_strings, with the following prototype
>
> const char** fastbit_get_qualified_strings(FastBitQueryHandle query,
> const char *cname);
>
> For row-wise data accesses, there is already a function named
> fastbit_result_set_get_string. It should work for any string valued
> columns.
>
> Do you think this might be enough? Would you have a different suggestion?
>
> currently, the pointers returned by the fastbit_get_qualified_ttts and
> fastbit_result_set_get_string are NOT to be deleted by the user code.
> Instead, the user must call fastbit_destroy_query in order to free
> the memory allocated for those pointers. Does this work OK for
> python? Any comments or suggestions to improve this?
>
> John
>
> On 2/26/2010 8:11 AM, Jose Nazario wrote:
>
>> i know that this has been discussed before but i hadn't seen anyone
>> provide them. thanks to Brent Pedersen for some key bugfixes and
>> contributions, python bindings to FastBit are now in development (e.g.
>> working but no release yet):
>>
>> http://code.google.com/p/pyfastbit/
>>
>> built against fastbit-ibis1.1.6 and cython 0.12.1.
>>
>> they are based on the C API. their status:
>>
>> - writes work
>> - queries work
>> - there's a thread lock in the destructors which causes a hang
>>
>> feedback and improvements most welcome. specifically my C++ skills are
>> non-existent, but i'd like to add support for text columns (category,
>> blob, text etc) to the C API and thus the Py interface.
>>
>> thanks to all of the developers and contributors for fastbit, i hope this
>> contribution helps.
>>
>> ________
>> jose nazario, ph.d. http://monkey.org/~jose/
>> _______________________________________________
>> FastBit-users mailing list
>> [email protected]
>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>
>
>
> ------------------------------
>
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>
>
> End of FastBit-users Digest, Vol 30, Issue 7
> ********************************************
>
>
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users