Yes, as @Thomas Strehl described perfectly, you can use the nrows parameter in the CADataConnector.read_data call to specify the maximum number of rows that the call will return (otherwise the default is 10,000). As well, if your dataset is too large to load it all up at once in your notebook, you can also use the chunksize/iterator parameters in this call to fetch the data in smaller "chunks" , and iterate over the dataset content, processing each window of data, one at a time.
Full documentation on the read_data parameters is here.
For your other problem ("I am not able to write notebook back to Cognos . I am getting a error"), it sounds like from your description you are trying to write the notebook back to CA content store using: CADataConnector.write_data? This won't work as the CADataConnector.write_data() method is for writing pandas tables back into the CA content as data sources (not for writing your notebook back). To save/update your notebook back into the CA content, click on the "Save" icon in the CA Jupyter notebook UI (described here).
------------------------------
Jim Boland
LinkedIn: https://www.linkedin.com/in/jimboland
Website: https://coreinsightz.com
Email: jimboland@coreinsightz.com
------------------------------
Original Message:
Sent: Tue December 05, 2023 09:38 AM
From: Thomas Strehl
Subject: cognos Jupyter Notebook
You can use specifiy cols and rows to read like this:
useCols=['col1','col2', ...,'coln']
df = CADataConnector.read_data(path="........../.../file.csv", nrows=1E6, usecols=useCols)
------------------------------
Thomas Strehl
------------------------------