<jupyter_start><jupyter_text>Elastic engine demo<jupyter_code>import datalabframework as dlf
from datalabframework import utils
dlf.project.info()
metadata = dlf.params.metadata()
utils.pretty_print(metadata)
# just the resources, some pretty printing
utils.pretty_print(metadata['resources'])
import datalabframework as dlf
engine = dlf.engines.get('spark-local')
# dlf.data.metadata('keywords_elk')
res = engine.read(".keywords_search")
res.show()
dlf.project.repository()
type(res)
df = engine.read(".keywords")
df.show()
utils.pretty_print(dlf.data.metadata("keywords_elk"))
engine.write(df, ".keywords_elk", mode='append')<jupyter_output>--- Logging error ---
Traceback (most recent call last):
  File "/home/thuc/miniconda3/envs/p36/lib/python3.6/logging/__init__.py", line 993, in emit
    msg = self.format(record)
  File "/home/thuc/miniconda3/envs/p36/lib/python3.6/logging/__init__.py", line 839, in format
    return fmt.format(record)
  File "/home/thuc/miniconda3/envs/p36/lib/python3.6/logging/__init__.py", line 579, in format
    s = self.formatMessage(record)
  File "/home/thuc/miniconda3/envs/p36/lib/python3.6/logging/__init__.py", line 548, in formatMessage
    return self._style.format(record)
  File "/home/thuc/miniconda3/envs/p36/lib/python3.6/logging/__init__.py", line 391, in format
    return self._fmt % record.__dict__
KeyError: 'dlf_session'
Call stack:
  File "/home/thuc/miniconda3/envs/p36/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "/home/thuc/miniconda3/envs/p36/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/thuc/min[...]
{'fraction_non_alphanumeric': 0.14502427184466019, 'fraction_numerical': 0.03398058252427184, 'mean_word_length': 4.847517730496454, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '111304', 'license': 'MIT', 'n_tokens_mistral': 634, 'n_tokens_neox': 601, 'n_words': 108, 'path': 'demos/elastic/elastic.ipynb', 'repo_name': 'tuananh-vn/datalabframework-demos', 'size': '1648'}