What are you trying to achieve?
We are trying to use the template for convert a dataset to be compatible to DirectLake.
When running the Direct Lake migration notebook that we;ve dowloaded and uploaded in Fabric, we are getting the following error when calling this function :
File /nfs4/pyenv-ffe65603-f014-4ba4-8d2f-4676a65c2464/lib/python3.10/site-packages/sempy/_utils/_log.py:273, in mds_log..get_wrapper..log_decorator_wrapper(*args, *kwargs)
270 raise
272 try:
--> 273 result = func(args, **kwargs)
275 # The invocation for get_message_dict moves after the function
276 # so it can access the state after the method call
277 message.update(extractor.get_completion_message_dict(result, arg_dict))
File ~/cluster-env/trident_env/lib/python3.10/site-packages/pandas/core/indexing.py:1656, in _iLocIndexer._getitem_axis(self, key, axis)
1653 raise TypeError("Cannot index by location index with a non-integer key")
1655 # validate the location
-> 1656 self._validate_integer(key, axis)
1658 return self.obj._ixs(key, axis=axis)
File ~/cluster-env/trident_env/lib/python3.10/site-packages/pandas/core/indexing.py:1589, in _iLocIndexer._validate_integer(self, key, axis)
1587 len_axis = len(self.obj._get_axis(axis))
1588 if key >= len_axis or key < -len_axis:
-> 1589 raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
What have you tried so far?
We've tried to see if this is coming from a configuration on our side (the only thing we've done before running this was defining the workpace and semantic models name). Would love to know if this is coming from our side or the library itself.
What are you trying to achieve? We are trying to use the template for convert a dataset to be compatible to DirectLake. When running the Direct Lake migration notebook that we;ve dowloaded and uploaded in Fabric, we are getting the following error when calling this function :
migration.create_pqt_file(dataset = dataset_name, workspace = workspace_name)
IndexError Traceback (most recent call last) Cell In[28], line 1 ----> 1 migration.create_pqt_file(dataset = dataset_name, workspace = workspace_name)
File /nfs4/pyenv-ffe65603-f014-4ba4-8d2f-4676a65c2464/lib/python3.10/site-packages/sempy/_utils/_log.py:273, in mds_log..get_wrapper..log_decorator_wrapper(*args, *kwargs)
270 raise
272 try:
--> 273 result = func(args, **kwargs)
275 # The invocation for get_message_dict moves after the function
276 # so it can access the state after the method call
277 message.update(extractor.get_completion_message_dict(result, arg_dict))
File /nfs4/pyenv-ffe65603-f014-4ba4-8d2f-4676a65c2464/lib/python3.10/site-packages/sempy_labs/migration/_create_pqt_file.py:89, in create_pqt_file(dataset, workspace, file_name) 87 for table_name in dfP["Table Name"].unique(): 88 tName = '#"' + table_name + '"' ---> 89 sourceExpression = dfT.loc[ 90 (dfT["Name"] == table_name), "Source Expression" 91 ].iloc[0] 92 refreshPolicy = dfT.loc[(dfT["Name"] == table_name), "Refresh Policy"].iloc[ 93 0 94 ] 95 sourceType = dfP.loc[(dfP["Table Name"] == table_name), "Source Type"].iloc[ 96 0 97 ]
File ~/cluster-env/trident_env/lib/python3.10/site-packages/pandas/core/indexing.py:1103, in _LocationIndexer.getitem(self, key) 1100 axis = self.axis or 0 1102 maybe_callable = com.apply_if_callable(key, self.obj) -> 1103 return self._getitem_axis(maybe_callable, axis=axis)
File ~/cluster-env/trident_env/lib/python3.10/site-packages/pandas/core/indexing.py:1656, in _iLocIndexer._getitem_axis(self, key, axis) 1653 raise TypeError("Cannot index by location index with a non-integer key") 1655 # validate the location -> 1656 self._validate_integer(key, axis) 1658 return self.obj._ixs(key, axis=axis)
File ~/cluster-env/trident_env/lib/python3.10/site-packages/pandas/core/indexing.py:1589, in _iLocIndexer._validate_integer(self, key, axis) 1587 len_axis = len(self.obj._get_axis(axis)) 1588 if key >= len_axis or key < -len_axis: -> 1589 raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
What have you tried so far? We've tried to see if this is coming from a configuration on our side (the only thing we've done before running this was defining the workpace and semantic models name). Would love to know if this is coming from our side or the library itself.