Member since
12-25-2018
13
Posts
0
Kudos Received
0
Solutions
07-18-2019
08:28 PM
Hi, I have a NiFi instance running on a Docker container and, and I'd like to get some information about it through its API. To do so, I have followed the steps indicated here: https://community.hortonworks.com/questions/96383/how-to-get-the-access-token-by-invoking-nifi-rest.html, using this command: curl 'http://<my_nifi_ip>:<my_nifi_port>/nifi/nifi-api/access/token' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'username=<my_user>&password=<my_password>' --compressed But, when launching this command, it redirects me to the login page of NiFi <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="/login.html">here</a>.</p> </body></html> How can I solve my problem to get the token? Thank you for your help. Regards.
... View more
Labels:
- Labels:
-
Apache NiFi
04-24-2019
05:36 PM
Hi @Matt Burgess, I have deleted the "AttributeToJSON" processor I indicated you and now PutCassandraRecord processor doesn't return any error, so this problem has disappeared. Without it, anyway, and setting only this structure: In AttributesToJson I take the field register_date (which is null until that date), because this is the only field I want to put in the database. Then, with UpdateAttribute, I configure register_date as ${now():toNumber()} . At last, I use PutCassandraRecord. I'm obtaining in my database the following record: -294294420. What does this number mean? What if I want to obtain the date in a format of "yyyy-MM-dd", which is the format I was expecting to see? However, I do not understand very well the solution you are proposing (English is not my first language so it will possibly has something to do with that). Which is the structure you are proposing me, and how could I configure the UpdateRecord Processor, to achieve the objective that I have proposed in the previous paragraph? Many thanks for your help.
... View more
04-24-2019
03:51 PM
The error I'm obtaining now is "Expected 4 byte long for date (13)".
... View more
04-24-2019
03:44 PM
Hi @Matt Burgess. Thanks for your response, but it is still failing :(. My three blocks are: UpdateAttribute, to give to register_date the value you have indicate, AttributestoJSON and, at last, PutCassandraRecord. Am I doing anything wrong? Thanks for your attention.
... View more
04-24-2019
09:38 AM
Hi, I have a Cassandra table where one of its fields is "register_date", which is a date type field. I'm facing several problems to insert this date in Cassandra from NiFi. I'm using UpdateAttribute processor to generate the field, with this content: ${now():format("yyyyMMdd")} When the flow file arrives to PutCassandraRecord processor I get the following error: "Expected 4 byte long for date". What am I doing wrong? Thanks for your help 🙂
... View more
Labels:
- Labels:
-
Apache NiFi
12-26-2018
02:16 AM
Hi, I've a table countries with the following structure: CREATE TABLE countries(
id INT,
code CHAR(2),
name STRING,
continent CHAR(2),
wikipedia_link STRING,
keywords STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','; My objective is deleting the wikipedia_link column with the following command: ALTER TABLE countries DROP COLUMN wikipedia_link But, when viewing the contents of the table, I realise that, now, the column keywords contains the wikipedia links for each country, instead of the values of the keyword for each country. It seems that only the column is being removed, but not the content of it -my objective is removing both- . To sum up: only the header is being removed, and the following one (keywords) is being shifted to the left. I've tried, too, altering the columns of the table with this command: ALTER TABLE countries REPLACE COLUMNS (
id INT,
code CHAR(2),
name STRING,
continent CHAR(2),
keywords STRING)
But the result is the same: I'm still seeing the values of wikipedia link for each country in the column "keywords". Any idea on how to solve this problem? Regards!
... View more
Labels:
- Labels:
-
Apache Hive