Hi, I am pretty much new in lakefs, could anyone p...
# help
r
Hi, I am pretty much new in lakefs, could anyone plz help me out, how to set S3 end points credentials into code. Requirement: Need to upload one dataframe in csv format into the lakefs repository. Thanks in advance.
b
Hi, Did you tried https://docs.lakefs.io/integrations/python.html#working-with-the-client-api Or the issue is on the lakeFS side?
Assume you are using Python - passing the credentials created when you setup your lakeFS to the
Configuration
class should enable you the same access as the admin user
If you are using the s3a endpoint - it depends on the package you use.
r
Hi Barak, I am referring boto(python) document. Here is my code snippet. In the code snippet , i want to save df in lakefs repository.
I am able to upload file from my local path to lakeFS repository but here I want to upload this df value in lakeFS repository
b
Where is you lakefs deployed? the endpoint looks like the example
r
Yeah its true. I have kept it like this for posting it here otherwise i am using my actual access id & key. And also it is deployed in the docker
b
Are you using the lakefs compose for the above - I'm asking because accessing the s3a endpoint to lakefs requires the s3.* record configured in lakefs. https://docs.lakefs.io/deploy/docker.html As described in the prerequisites section.
r
Ok , so i have done it in other way. Please refer the image
In the first part, I have uploaded the file which is in local. But the next thing I want to save this df value directly into the lakefs repository
b
Option one, you can use the API to save the rendered data using boto. Option two, use the s3 option in the df - use the df storage option to configure the credentials and endpoint to lakefs (https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html) For both options you will need to configure s3.* dns record for lakefs first. When lakeFS accepts accepts a request it will identify if it is s3 or api request based on the host configured for the s3 gateway.